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

/* Default styles (Light mode) */
body {
    font-family: 'IBM Plex Mono', monospace;
    background-color: #ffffff;
    color: #000000;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header Styles */
header {
    background-color: #f6f6f6;
    border-bottom: 1px solid #e0e0e0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-title {
    font-size: 0.875rem;
    color: #666666;
}

.prompt {
    color: #bb86fc;
    font-weight: bold;
}

.josie {
    color: #bb86fc;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #bb86fc;
}

/* Controls Container */
.controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 0.75rem;
}

.nav-link {
    color: #bb86fc;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #bb86fc;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: #bb86fc;
    color: #ffffff;
}

.filter-controls label {
    font-size: 0.875rem;
    color: #000000;
}

#year-filter {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#year-filter:hover {
    border-color: #bb86fc;
    background-color: rgba(187, 134, 252, 0.05);
}

#year-filter:focus {
    outline: none;
    border-color: #bb86fc;
    background-color: rgba(187, 134, 252, 0.05);
}

#year-filter option {
    background-color: #ffffff;
    color: #000000;
}

/* Map Container */
#map {
    flex: 1;
    width: 100%;
    background-color: #ffffff;
}

/* Custom Marker Styles */
.custom-marker {
    background: transparent;
    border: none;
}

.custom-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s ease;
}

.custom-marker:hover svg {
    transform: scale(1.1);
}

/* Leaflet Popup Customization */
.leaflet-popup-content-wrapper {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.leaflet-popup-content {
    margin: 0.75rem;
}

.leaflet-popup-tip {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
}

.popup-content h3 {
    margin-bottom: 0.5rem;
    color: #bb86fc;
    font-size: 1rem;
    font-weight: 700;
}

.popup-content p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #000000;
}

.popup-content strong {
    color: #bb86fc;
    font-weight: 700;
}

.popup-content .flight-route {
    font-size: 0.875rem;
    color: #000000;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.popup-content .flight-info {
    font-size: 0.75rem;
    color: #666666;
    margin: 0.25rem 0;
}

.popup-content .flight-info strong {
    color: #bb86fc;
    font-weight: 700;
}

/* Leaflet Controls Customization */
.leaflet-control-zoom a {
    background-color: #ffffff;
    color: #bb86fc;
    border: 1px solid #e0e0e0;
}

.leaflet-control-zoom a:hover {
    background-color: rgba(187, 134, 252, 0.1);
    color: #000000;
}

.leaflet-control-attribution {
    background-color: rgba(255, 255, 255, 0.9);
    color: #666666;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
}

.leaflet-control-attribution a {
    color: #bb86fc;
    text-decoration: none;
}

.leaflet-control-attribution a:hover {
    color: #000000;
    text-decoration: underline;
}

/* Leaflet Marker Popup Close Button */
.leaflet-popup-close-button {
    color: #bb86fc;
    font-size: 1.25rem;
    font-weight: bold;
}

.leaflet-popup-close-button:hover {
    color: #000000;
}

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

    .filter-controls {
        width: 100%;
        justify-content: space-between;
    }

    #year-filter {
        flex: 1;
        max-width: 200px;
    }

    header h1 {
        font-size: 1.25rem;
    }

    .header-title {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.75rem;
    }

    .filter-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    #year-filter {
        max-width: 100%;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #ffffff;
    }

    header {
        background-color: #1a1a1a;
        border-bottom: 1px solid #333333;
    }

    .header-title {
        color: #a0a0a0;
    }

    .filter-controls label {
        color: #e0e0e0;
    }

    #year-filter {
        background-color: #1a1a1a;
        color: #e0e0e0;
        border-color: #333333;
    }

    #year-filter option {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    #map {
        background-color: #121212;
    }

    .leaflet-popup-content-wrapper {
        background-color: #1a1a1a;
        color: #e0e0e0;
        border-color: #333333;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    }

    .leaflet-popup-tip {
        background-color: #1a1a1a;
        border-color: #333333;
    }

    .popup-content p {
        color: #e0e0e0;
    }

    .leaflet-control-zoom a {
        background-color: #1a1a1a;
        border-color: #333333;
    }

    .leaflet-control-zoom a:hover {
        color: #ffffff;
    }

    .leaflet-control-attribution {
        background-color: rgba(26, 26, 26, 0.9);
        color: #a0a0a0;
    }

    .leaflet-control-attribution a:hover {
        color: #ffffff;
    }

    .leaflet-popup-close-button:hover {
        color: #ffffff;
    }

    .custom-marker svg {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    }

    .nav-link {
        border-color: #bb86fc;
        color: #bb86fc;
    }

    .nav-link:hover {
        background-color: #bb86fc;
        color: #121212;
    }

    .popup-content .flight-route {
        color: #e0e0e0;
    }

    .popup-content .flight-info {
        color: #a0a0a0;
    }
}
