* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #163568;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: white;
    font-size: 3rem;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px;
}

.calendar-tile {
    aspect-ratio: 1;
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    color: #163568;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.calendar-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, transparent, rgba(255, 255, 255, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-tile.unlocked {
    cursor: pointer;
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    color: #163568;
}

.calendar-tile.unlocked:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.calendar-tile.unlocked:hover::before {
    opacity: 1;
}

.calendar-tile.locked {
    background: linear-gradient(145deg, #cccccc, #999999);
    color: #666666;
    cursor: not-allowed;
}

.calendar-tile.opened {
    background: linear-gradient(145deg, #90EE90, #66BB6A);
    color: white;
    cursor: pointer;
}

.calendar-tile.opened:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#modal-day {
    color: white;
    font-size: 2rem;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#modal-caption {
    color: white;
    font-size: 1.5rem;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

.close {
    position: absolute;
    top: -10px;
    right: 10px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: #ffd700;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .calendar-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    .calendar-tile {
        font-size: 2rem;
    }

    #modal-day {
        font-size: 1.5rem;
    }
}

/* Auth Styles */
.hidden {
    display: none !important;
}

.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
}

.auth-container h2 {
    color: #163568;
    margin-bottom: 20px;
}

.auth-container p {
    color: #666;
    margin-bottom: 30px;
}

.auth-button {
    background: #163568;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(22, 53, 104, 0.4);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 53, 104, 0.6);
    background: #1a3f7a;
}

.user-bar {
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.logout-button {
    background: white;
    color: #163568;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.logout-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.4);
}
