* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100%;
    position: fixed;
    width: 100%;
    margin: 0;
    padding: 0;
    overscroll-behavior: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    overflow: hidden;
    height: 100%;
    width: 100%;
    position: fixed;
    -webkit-overflow-scrolling: touch;
    touch-action: none;
    overscroll-behavior: none;
    margin: 0;
    padding: 0;
}

/* Wind Speed Gradient Bar */
.wind-speed-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 50px;
    max-height: 50px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wind-speed-gradient {
    width: 100%;
    height: 30px;
    background: linear-gradient(to right,
            rgba(100, 200, 255, 0.2) 0%,
            rgba(100, 200, 255, 0.4) 25%,
            rgba(100, 255, 150, 0.6) 50%,
            rgba(255, 200, 100, 0.7) 75%,
            rgba(255, 100, 100, 0.8) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.wind-speed-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    height: 20px;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
}

/* Map */
#map {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 50px;
    z-index: 1;
    touch-action: pan-x pan-y pinch-zoom;
}

/* Model Selector */
.model-selector {
    position: fixed;
    top: 70px;
    left: 20px;
    z-index: 1002;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.model-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #64748b;
}

.model-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.model-btn svg {
    width: 24px;
    height: 24px;
}

.model-dropdown {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: white;
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 100px;
}

.model-dropdown.active {
    display: flex;
}

.model-option {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
    text-align: center;
    border: 2px solid transparent;
}

.model-option:hover {
    background: #f1f5f9;
    border-color: #8b5cf6;
}

.model-option.active {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-color: #8b5cf6;
}

/* Layer Selector */
.layer-selector {
    position: fixed;
    top: 124px;
    left: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layer-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #64748b;
}

.layer-btn svg {
    width: 24px;
    height: 24px;
}

.layer-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.layer-btn.active {
    border-width: 3px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.layer-btn-waves {
    color: #3b82f6;
}

.layer-btn-waves.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
}

.layer-btn-rain {
    color: #10b981;
}

.layer-btn-rain.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: white;
}

#windBtn.active {
    background: linear-gradient(135deg, #64748b, #475569);
    border-color: #64748b;
    color: white;
}

/* Timeline Bar */
.timeline-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 50px;
    max-height: 50px;
    background: white;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.timeline-track {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    overflow: visible;
}

.timeline-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    --slider-thumb-gradient: linear-gradient(135deg, rgb(100, 200, 255), rgb(70, 180, 235));
    background: rgb(100, 200, 255);
    opacity: 0.75;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    touch-action: pan-x;
}

.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--slider-thumb-gradient);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.timeline-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--slider-thumb-gradient);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.timeline-slider::-moz-range-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.timeline-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    transform: translateX(-50%);
    will-change: opacity;
}

.timeline-dates {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    height: 20px;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-date {
    text-align: center;
    min-width: 60px;
}

.timeline-date.today {
    color: #3b82f6;
    font-weight: 700;
}

/* Surf Location Markers */
.surf-marker {
    background: transparent;
    border: none;
}

.surf-marker-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.surf-marker-dot:hover {
    transform: scale(1.5);
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.6);
}

.surf-popup {
    font-family: 'Inter', sans-serif;
}

.surf-popup .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
}

.surf-popup .leaflet-popup-content {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.surf-popup .leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wind-speed-labels {
        padding: 0 1rem;
        font-size: 0.75rem;
    }

    .timeline-track {
        padding: 0 1rem;
    }

    .timeline-dates {
        padding: 0 1rem;
        font-size: 0.65rem;
    }

    .timeline-date {
        min-width: 40px;
    }

    .model-selector {
        top: 60px;
        left: 10px;
    }

    .model-btn {
        width: 40px;
        height: 40px;
    }

    .model-btn svg {
        width: 20px;
        height: 20px;
    }

    .layer-selector {
        top: 110px;
        left: 10px;
    }

    .layer-btn {
        width: 40px;
        height: 40px;
    }

    .layer-btn svg {
        width: 20px;
        height: 20px;
    }
}