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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #e63946 0%, #0f3460 50%, #3498db 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 3px solid #f4d03f;
    position: relative;
    overflow: hidden;
}

.app-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='14' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='2'/%3E%3Cline x1='16' y1='30' x2='44' y2='30' stroke='rgba(255,255,255,0.08)' stroke-width='2'/%3E%3Ccircle cx='30' cy='30' r='4' fill='none' stroke='rgba(255,255,255,0.08)' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.app-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

.nav-link.active {
    color: #1a1a2e;
    background: #f4d03f;
    border-color: #f4d03f;
}

/* Main */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Hero */
.calendar-hero {
    text-align: center;
    padding: 2rem 1rem;
}

.calendar-hero h2 {
    font-size: 1.8rem;
    color: #f4d03f;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Controls */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: rgba(15, 52, 96, 0.4);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 0.25rem;
}

.btn-view {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.btn-view.active {
    background: #3498db;
    color: #fff;
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
    background: rgba(22, 33, 62, 0.8);
    color: #e0e0e0;
    font-size: 0.85rem;
    cursor: pointer;
}

.filter-controls select:focus {
    outline: none;
    border-color: #3498db;
}

/* Events List View */
.events-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.2rem;
    color: #3498db;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(52, 152, 219, 0.3);
    margin-bottom: 1rem;
}

.event-card {
    background: rgba(22, 33, 62, 0.6);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(52, 152, 219, 0.15);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.event-card.weekly {
    border-left: 4px solid #2ecc71;
}

.event-card.monthly {
    border-left: 4px solid #3498db;
}

.event-card.major {
    border-left: 4px solid #e63946;
}

.event-card.special {
    border-left: 4px solid #f4d03f;
}

.event-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-badge.weekly {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.event-badge.monthly {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.4);
}

.event-badge.major {
    background: rgba(230, 57, 70, 0.2);
    color: #e63946;
    border: 1px solid rgba(230, 57, 70, 0.4);
}

.event-badge.special {
    background: rgba(244, 208, 63, 0.2);
    color: #f4d03f;
    border: 1px solid rgba(244, 208, 63, 0.4);
}

.event-name {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
    padding-right: 5rem;
}

.event-date {
    color: #f4d03f;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.event-time {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.event-venue {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9rem;
}

.event-address {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.event-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.detail-item {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.event-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.event-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.highlight-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(244, 208, 63, 0.1);
    color: #f4d03f;
    border: 1px solid rgba(244, 208, 63, 0.3);
    border-radius: 12px;
}

.event-link {
    display: inline-block;
    color: #3498db;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.event-link:hover {
    color: #5dade2;
    text-decoration: underline;
}

.no-events {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

/* Calendar Grid View */
.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.calendar-month {
    background: rgba(22, 33, 62, 0.4);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(52, 152, 219, 0.15);
}

.month-title {
    text-align: center;
    font-size: 1.2rem;
    color: #f4d03f;
    margin-bottom: 1rem;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 0.5rem;
}

.weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.4rem 0;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day {
    min-height: 70px;
    padding: 0.3rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day.empty {
    background: transparent;
}

.day.today {
    border: 2px solid #f4d03f;
    background: rgba(244, 208, 63, 0.08);
}

.day.today .day-number {
    color: #f4d03f;
    font-weight: 800;
}

.day.has-events {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.day.today.has-events {
    border: 2px solid #f4d03f;
    background: rgba(244, 208, 63, 0.1);
}

.day.weekend {
    background: rgba(46, 204, 113, 0.05);
}

.day.weekend.has-events {
    background: rgba(52, 152, 219, 0.1);
}

.day-number {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.day-event {
    font-size: 0.6rem;
    padding: 1px 3px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

.day-event.weekly {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.day-event.monthly {
    background: rgba(52, 152, 219, 0.3);
    color: #7ec8e3;
}

.day-event.major {
    background: rgba(230, 57, 70, 0.3);
    color: #ff6b7a;
}

.day-event.special {
    background: rgba(244, 208, 63, 0.3);
    color: #f4d03f;
}

/* Calendar Tooltip */
.cal-tooltip {
    position: absolute;
    z-index: 1000;
    background: #16213e;
    border: 1px solid rgba(52, 152, 219, 0.4);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    max-width: 320px;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.cal-tooltip-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(52, 152, 219, 0.3);
}

.cal-tooltip-date {
    color: #f4d03f;
    font-weight: 600;
}

.cal-tooltip-time {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.3rem;
}

/* Legend */
.calendar-legend {
    margin-top: 2rem;
    padding: 1.25rem;
    background: rgba(22, 33, 62, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(52, 152, 219, 0.15);
}

.calendar-legend h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.weekly {
    background: #2ecc71;
}

.legend-dot.monthly {
    background: #3498db;
}

.legend-dot.major {
    background: #e63946;
}

.legend-dot.special {
    background: #f4d03f;
}

/* Disclaimer */
.calendar-disclaimer {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(230, 57, 70, 0.08);
    border: 1px solid rgba(230, 57, 70, 0.2);
    border-radius: 12px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.calendar-disclaimer strong {
    color: #e63946;
}

.source-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(230, 57, 70, 0.15);
}

.source-links h4 {
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.source-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.source-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.8rem;
}

.source-links a:hover {
    text-decoration: underline;
    color: #5dade2;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .header-nav {
        margin-left: 0;
    }

    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .view-toggle {
        justify-content: center;
    }

    .filter-controls {
        justify-content: center;
    }

    .calendar-hero h2 {
        font-size: 1.4rem;
    }

    .day {
        min-height: 50px;
    }

    .day-event {
        font-size: 0.5rem;
    }

    .event-name {
        padding-right: 0;
    }

    .event-badge {
        position: static;
        display: inline-block;
        margin-bottom: 0.5rem;
    }

    .legend-items {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    border-radius: 2px;
}
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .header-nav { display: none; width: 100%; flex-direction: column; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }
    .header-nav.active { display: flex; }
    .nav-link { text-align: center; padding: 0.75rem 1rem; font-size: 1rem; }
    .header-content { flex-wrap: wrap; }
    .app-title { font-size: 1.4rem; }
}
@media (max-width: 480px) {
    .app-header { padding: 1rem; }
    .app-title { font-size: 1.2rem; }
    .nav-link { font-size: 0.9rem; padding: 0.6rem 0.75rem; }
}
