/* Calendar Styles */
#calendar {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--gradient-dark);
    color: white;
    border-radius: 10px 10px 0 0;
    margin: -2rem -2rem 2rem -2rem;
}

.calendar-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-light);
    margin-bottom: 1px;
}

.calendar-day {
    background: var(--primary-black);
    color: white;
    padding: 0.8rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-light);
}

.calendar-date {
    background: white;
    min-height: 80px;
    padding: 0.5rem;
    position: relative;
    cursor: default;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.calendar-date:hover {
    background: var(--bg-rice);
}

.calendar-date.empty {
    background: #f9f9f9;
}

.calendar-date.has-class {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-black);
}

.calendar-date.has-class:hover {
    background: var(--bg-rice);
    border-color: var(--accent-orange);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(204, 65, 37, 0.2);
}

.class-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--accent-orange);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Class Modal */
.class-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 2000;
}

.class-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: var(--secondary-gray);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--accent-orange);
}

.modal-content h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-black);
    margin-bottom: 1.5rem;
}

.class-detail {
    padding: 1rem;
    border-left: 3px solid var(--accent-orange);
    background: var(--bg-rice);
    margin-bottom: 1rem;
}

.class-detail strong {
    color: var(--primary-black);
    display: block;
    margin-bottom: 0.3rem;
}

.class-detail small {
    color: var(--text-light);
    font-style: italic;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-rice);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-orange);
}

/* Today Highlight */
.calendar-date.today {
    background: var(--accent-orange);
    color: white;
    font-weight: bold;
}

.calendar-date.today.has-class:hover {
    background: var(--accent-orange);
    opacity: 0.9;
}

/* Selected Date */
.calendar-date.selected {
    border-color: var(--accent-orange);
    background: rgba(204, 65, 37, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calendar-date {
        min-height: 60px;
        font-size: 0.9rem;
        padding: 0.3rem;
    }
    
    .calendar-day {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .class-indicator {
        width: 6px;
        height: 6px;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

/* Calendar Navigation */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav button {
    background: var(--primary-black);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-nav button:hover {
    background: var(--accent-orange);
}

.calendar-month {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    color: var(--primary-black);
}

/* Week View Option */
.view-toggle {
    text-align: center;
    margin-bottom: 1rem;
}

.view-toggle button {
    background: white;
    border: 2px solid var(--accent-orange);
    color: var(--accent-orange);
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-toggle button.active {
    background: var(--accent-orange);
    color: white;
}

.view-toggle button:hover {
    background: var(--accent-orange);
    color: white;
}