/**
 * JollyKite PWA - Main Stylesheet
 * Wind monitoring application for kitesurfing
 * Material Design 3 Theme
 */

/* ============================================
   MATERIAL DESIGN 3 - COLOR SYSTEM
   ============================================ */
:root {
    /* Primary - Ocean Teal (preserves beach theme) */
    --md-sys-color-primary: #006A6A;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #6FF7F7;
    --md-sys-color-on-primary-container: #002020;

    /* Secondary */
    --md-sys-color-secondary: #4A5F5F;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #CCE8E8;
    --md-sys-color-on-secondary-container: #051F1F;

    /* Tertiary - Blue Accent */
    --md-sys-color-tertiary: #4D5F7F;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #D6E3FF;
    --md-sys-color-on-tertiary-container: #071C38;

    /* Error */
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;

    /* Surface & Background */
    --md-sys-color-surface: rgba(250, 253, 252, 0.95);
    --md-sys-color-on-surface: #191C1C;
    --md-sys-color-surface-variant: #DAE5E4;
    --md-sys-color-on-surface-variant: #3F4948;
    --md-sys-color-outline: #6F7978;
    --md-sys-color-outline-variant: #BEC9C8;

    /* Surface Containers - M3 Elevation System */
    --md-sys-color-surface-container-lowest: rgba(255, 255, 255, 0.95);
    --md-sys-color-surface-container-low: rgba(240, 244, 243, 0.95);
    --md-sys-color-surface-container: rgba(234, 240, 239, 0.95);
    --md-sys-color-surface-container-high: rgba(228, 234, 233, 0.95);
    --md-sys-color-surface-container-highest: rgba(222, 228, 227, 0.95);

    /* Inverse Colors */
    --md-sys-color-inverse-surface: #2D3131;
    --md-sys-color-inverse-on-surface: #EFF1F0;
    --md-sys-color-inverse-primary: #4DDADA;

    /* Gradients for Ocean Theme */
    --ocean-gradient: linear-gradient(180deg, #006A6A 0%, #004D4D 100%);
    --wave-gradient: linear-gradient(180deg, rgba(111, 247, 247, 0.3) 0%, rgba(0, 106, 106, 0.1) 100%);

    /* Elevation & Shadows - M3 Style */
    --md-sys-elevation-1: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-2: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
    --md-sys-elevation-3: 0 4px 8px 3px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.3);
    --md-sys-elevation-4: 0 6px 10px 4px rgba(0, 0, 0, 0.15), 0 2px 3px rgba(0, 0, 0, 0.3);
    --md-sys-elevation-5: 0 8px 12px 6px rgba(0, 0, 0, 0.15), 0 4px 4px rgba(0, 0, 0, 0.3);

    /* M3 Shape System */
    --md-sys-shape-corner-none: 0px;
    --md-sys-shape-corner-extra-small: 4px;
    --md-sys-shape-corner-small: 8px;
    --md-sys-shape-corner-medium: 12px;
    --md-sys-shape-corner-large: 16px;
    --md-sys-shape-corner-extra-large: 28px;
    --md-sys-shape-corner-full: 9999px;

    /* M3 Motion - Easing */
    --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
    --md-sys-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
    --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --md-sys-motion-easing-legacy: cubic-bezier(0.4, 0, 0.2, 1);

    /* M3 Motion - Duration */
    --md-sys-motion-duration-short1: 50ms;
    --md-sys-motion-duration-short2: 100ms;
    --md-sys-motion-duration-short3: 150ms;
    --md-sys-motion-duration-short4: 200ms;
    --md-sys-motion-duration-medium1: 250ms;
    --md-sys-motion-duration-medium2: 300ms;
    --md-sys-motion-duration-medium3: 350ms;
    --md-sys-motion-duration-medium4: 400ms;
    --md-sys-motion-duration-long1: 450ms;
    --md-sys-motion-duration-long2: 500ms;
    --md-sys-motion-duration-long3: 550ms;
    --md-sys-motion-duration-long4: 600ms;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

body {
    font-family: 'Roboto', 'Poppins', sans-serif;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    color: var(--md-sys-color-on-surface);
    background: var(--ocean-gradient);
    overflow-x: hidden;
    position: relative;
}

/* M3 Ocean Background with Waves */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        var(--wave-gradient),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%236FF7F7" fill-opacity="0.15" d="M0,160L48,144C96,128,192,96,288,106.7C384,117,480,171,576,181.3C672,192,768,160,864,138.7C960,117,1056,107,1152,112C1248,117,1344,139,1392,149.3L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    animation: waves 25s var(--md-sys-motion-easing-standard) infinite;
    z-index: -2;
}

/* Animated Kites Background */
.kite-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.flying-kite {
    position: absolute;
    opacity: 0.15;
}

.flying-kite svg {
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
}

.kite-1 {
    top: 10%;
    left: 10%;
    animation: floatKite1 30s ease-in-out infinite;
}

.kite-2 {
    top: 20%;
    right: 15%;
    animation: floatKite2 35s ease-in-out infinite;
    animation-delay: 5s;
}

.kite-3 {
    top: 5%;
    left: 50%;
    animation: floatKite3 40s ease-in-out infinite;
    animation-delay: 10s;
}

.kite-4 {
    bottom: 40%;
    right: 30%;
    animation: floatKite1 45s ease-in-out infinite;
    animation-delay: 15s;
}

.kite-5 {
    top: 35%;
    left: 25%;
    animation: floatKite2 38s ease-in-out infinite;
    animation-delay: 20s;
}

/* Kite Animations */
@keyframes floatKite1 {
    0%, 100% {
        transform: translate(0, 0) rotate(-5deg) scale(1);
    }
    25% {
        transform: translate(50px, -30px) rotate(5deg) scale(1.1);
    }
    50% {
        transform: translate(100px, 20px) rotate(-3deg) scale(0.95);
    }
    75% {
        transform: translate(30px, -20px) rotate(3deg) scale(1.05);
    }
}

@keyframes floatKite2 {
    0%, 100% {
        transform: translate(0, 0) rotate(3deg) scale(1);
    }
    25% {
        transform: translate(-40px, 40px) rotate(-8deg) scale(0.9);
    }
    50% {
        transform: translate(-80px, -30px) rotate(6deg) scale(1.15);
    }
    75% {
        transform: translate(-20px, 10px) rotate(-2deg) scale(1);
    }
}

@keyframes floatKite3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(60px, 50px) rotate(10deg) scale(1.2);
    }
    66% {
        transform: translate(-40px, 30px) rotate(-7deg) scale(0.85);
    }
}

/* Clouds */
.cloud {
    position: absolute;
    opacity: 0.4;
    fill: white;
}

.cloud-1 {
    top: 15%;
    animation: drift 60s linear infinite;
}

.cloud-2 {
    top: 25%;
    animation: drift 80s linear infinite;
    animation-delay: 20s;
}

@keyframes drift {
    from {
        left: -200px;
    }
    to {
        left: 100%;
    }
}

@keyframes waves {
    0%, 100% { transform: translateY(0) scaleX(1); }
    50% { transform: translateY(-20px) scaleX(1.05); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 20px 20px 30px;
    animation: fadeInDown 1s ease;
}

/* Title and Tagline */
.site-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #00E0FF 0%, #157CFF 50%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 10px 0;
    animation: shimmer 3s ease-in-out infinite;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 10px;
    font-weight: 300;
}

/* Dashboard and Cards */
.wind-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 40px 0;
    animation: fadeIn 1.5s var(--md-sys-motion-easing-standard);
}

/* M3 Card Component - Elevated Style */
.card {
    background: var(--md-sys-color-surface-container);
    backdrop-filter: blur(20px);
    border-radius: var(--md-sys-shape-corner-extra-large);
    padding: 24px;
    border: none;
    box-shadow: var(--md-sys-elevation-2);
    transition: all var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
    animation: slideUp var(--md-sys-motion-duration-long4) var(--md-sys-motion-easing-emphasized-decelerate);
    position: relative;
    overflow: hidden;
}

/* M3 State Layer - Hover Effect */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--md-sys-color-primary);
    opacity: 0;
    transition: opacity var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
    pointer-events: none;
    z-index: 0;
}

.card:hover::before {
    opacity: 0.08;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--md-sys-elevation-3);
}

/* Ensure card content is above state layer */
.card > * {
    position: relative;
    z-index: 1;
}

.compass-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.compass-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 20px auto;
}

/* Map Styles */
#windMap {
    height: 500px;
    width: 100%;
    border-radius: 15px;
    margin: 20px 0;
    z-index: 1;
    cursor: default !important;
    /* Static background image of the map area */
    background: url('../images/map-background.png') center center / cover no-repeat;
}

.leaflet-container {
    cursor: default !important;
}

.leaflet-grab,
.leaflet-grab * {
    cursor: default !important;
}

.leaflet-container.leaflet-touch-drag {
    -ms-touch-action: none;
    touch-action: none;
}

.map-container {
    position: relative;
}

.wind-arrow-icon {
    transition: transform 1s ease-in-out;
}

/* Map Overlay */
.map-overlay-speed {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    min-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.overlay-speed-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A3A52;
    line-height: 1;
    text-align: center;
}

.overlay-speed-unit {
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    margin-top: 5px;
}

.overlay-speed-condition {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

/* Live Indicator */
.live-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 1001;
    font-size: 0.85rem;
    color: #1A3A52;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* Wind Speed Display */
.wind-speed-display {
    text-align: center;
    margin-bottom: 20px;
}

.speed-value {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s ease-in-out infinite;
}

.speed-unit {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Wind Details */
.wind-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.detail-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.detail-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 1.8rem;
    font-weight: 600;
}

/* Info Section */
.info-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeIn 2s ease;
}

/* Price Grid */
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.price-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.price-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.price-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
}

/* Telegram Button */
.telegram-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #00a8e8 0%, #0077be 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 168, 232, 0.3);
    margin: 20px 0;
}

.telegram-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 168, 232, 0.5);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Wind Conditions */
.wind-condition {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.condition-perfect { background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%); }
.condition-good { background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%); }
.condition-light { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.condition-no-wind { background: linear-gradient(135deg, #f87171 0%, #ef4444 100%); }

/* Wind Description Block */
.wind-description-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 25px 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    animation: pulseGlow 3s ease-in-out infinite;
}

.wind-description-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

.wind-description-text {
    text-align: left;
    flex: 1;
}

.wind-description-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #fff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wind-description-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Wind Arrow Styles */
.wind-arrow-container {
    pointer-events: none;
}

/* Forecast Section */
.forecast-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px 15px;
    margin: 25px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeIn 2s ease;
}

.forecast-slider {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px 15px 15px;
    margin-top: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    min-height: 140px;
}

.forecast-timeline {
    display: flex;
    min-width: 100%;
    height: 100px;
    position: relative;
    gap: 2px;
}

.forecast-hour-slot {
    flex: 1;
    min-width: 60px;
    position: relative;
    border-radius: 8px;
    margin: 0 1px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 2px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.forecast-hour-slot:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.forecast-hour-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.forecast-hour-wind-icon {
    font-size: 1.2rem;
    text-align: center;
    margin: 3px 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.forecast-hour-speed {
    font-size: 0.85rem;
    font-weight: 700;
    color: #FFFFFF;
    text-align: center;
    margin: 2px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.forecast-hour-dir {
    font-size: 0.7rem;
    color: #FFFFFF;
    text-align: center;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Wind Strength Colors */
.wind-calm {
    background: linear-gradient(180deg, #9CA3AF 0%, #6B7280 100%);
}

.wind-light {
    background: linear-gradient(180deg, #34D399 0%, #10B981 100%);
}

.wind-moderate {
    background: linear-gradient(180deg, #60A5FA 0%, #3B82F6 100%);
}

.wind-fresh {
    background: linear-gradient(180deg, #FBBF24 0%, #F59E0B 100%);
}

.wind-strong {
    background: linear-gradient(180deg, #F87171 0%, #EF4444 100%);
}

.wind-gale {
    background: linear-gradient(180deg, #A855F7 0%, #9333EA 100%);
}

.forecast-loading {
    text-align: center;
    padding: 30px;
}

.forecast-details {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin: 15px -5px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-details.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.forecast-hours {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.forecast-hour {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.75rem;
}

.forecast-hour-time {
    font-weight: 600;
    margin-bottom: 5px;
    color: #87CEEB;
}

.forecast-hour-wind {
    color: #ffffff;
    font-weight: 500;
}

.forecast-hour-dir {
    opacity: 0.7;
    font-size: 0.7rem;
    margin-top: 2px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 4px 8px rgba(0, 160, 255, 0.3));
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 4px 12px rgba(124, 58, 237, 0.4));
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.6;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.9;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes windParticle {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

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

.animate-fadeInDown {
    animation: fadeInDown 1s ease;
}

.animate-shimmer {
    animation: shimmer 3s ease-in-out infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Убираем padding у основного контейнера на мобильных */
    .max-w-7xl {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Убираем обрамление у карточек на мобильных */
    #currentWindSection,
    #mapSection,
    #offlineNotice,
    .bg-white\/15 {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* Убираем border-radius у карт на мобильных */
    .card {
        border-radius: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .wind-dashboard {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .card {
        overflow-x: hidden;
    }

    /* Для контейнера карты разрешаем overflow чтобы стрелка была видна */
    .card:has(.map-container) {
        overflow: visible;
    }

    .map-container {
        margin-left: -50%;
        width: 170%;
    }

    #windMap {
        width: 100%;
        border-radius: 0 !important;
    }

    .compass-container {
        width: 200px;
        height: 200px;
    }

    .price-grid {
        grid-template-columns: 1fr;
    }

    .forecast-slider {
        padding: 20px 10px 10px;
        min-height: 120px;
    }

    .forecast-hour-slot {
        min-width: 45px;
        padding: 6px 1px;
    }

    .forecast-hour-time {
        font-size: 0.65rem;
    }

    .forecast-hour-wind-icon {
        font-size: 1rem;
    }

    .forecast-hour-speed {
        font-size: 0.75rem;
    }

    .forecast-hour-dir {
        font-size: 0.6rem;
    }

    /* Убираем padding у header на мобильных */
    header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Footer остается с небольшим padding для читаемости */
    footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================
   MATERIAL DESIGN 3 - COMPONENT OVERRIDES
   ============================================ */

/* M3 Button Components */
button, .button {
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    font-family: 'Roboto', 'Poppins', sans-serif;
    font-weight: 500;
    letter-spacing: 0.1px;
    transition: all var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

/* M3 Filled Button (Primary) */
#notificationButton {
    background: var(--md-sys-color-primary) !important;
    color: var(--md-sys-color-on-primary) !important;
    border-radius: var(--md-sys-shape-corner-full) !important;
    box-shadow: var(--md-sys-elevation-1);
    padding: 12px 24px !important;
    font-size: 0.95rem !important;
}

#notificationButton:hover {
    box-shadow: var(--md-sys-elevation-2);
    transform: translateY(-1px);
}

#notificationButton:active {
    box-shadow: var(--md-sys-elevation-1);
    transform: translateY(0);
}

/* M3 Telegram Button */
.telegram-button {
    background: var(--md-sys-color-tertiary) !important;
    color: var(--md-sys-color-on-tertiary) !important;
    border-radius: var(--md-sys-shape-corner-full) !important;
    box-shadow: var(--md-sys-elevation-2) !important;
    padding: 14px 28px !important;
}

.telegram-button:hover {
    box-shadow: var(--md-sys-elevation-3) !important;
}

/* M3 Typography Updates */
.site-title {
    font-family: 'Roboto', 'Dancing Script', cursive;
    color: var(--md-sys-color-primary-container);
    text-shadow: 2px 2px 12px rgba(0, 106, 106, 0.3);
}

.tagline {
    color: var(--md-sys-color-primary-container);
    opacity: 0.95;
}

/* M3 Info Section */
.info-section {
    background: var(--md-sys-color-surface-container-low);
    backdrop-filter: blur(20px);
    border-radius: var(--md-sys-shape-corner-extra-large);
    border: none;
    box-shadow: var(--md-sys-elevation-1);
    color: var(--md-sys-color-on-surface);
}

.info-section h2,
.info-section h3 {
    color: var(--md-sys-color-primary);
}

/* M3 Detail Items */
.detail-item {
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--md-sys-shape-corner-medium);
    color: var(--md-sys-color-on-surface);
    transition: all var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-standard);
}

.detail-item:hover {
    background: var(--md-sys-color-surface-container-high);
    box-shadow: var(--md-sys-elevation-1);
}

.detail-label {
    color: var(--md-sys-color-on-surface-variant);
}

.detail-value {
    color: var(--md-sys-color-primary);
}

/* M3 Price Items */
.price-item {
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-large);
    transition: all var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
    color: var(--md-sys-color-on-surface);
}

.price-item:hover {
    background: var(--md-sys-color-surface-container-high);
    box-shadow: var(--md-sys-elevation-2);
}

.price-value {
    color: var(--md-sys-color-tertiary);
}

/* M3 Wind Speed Display */
.speed-value {
    background: linear-gradient(45deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* M3 Map Overlay */
.map-overlay-speed {
    background: var(--md-sys-color-surface-container-highest);
    backdrop-filter: blur(20px);
    border-radius: var(--md-sys-shape-corner-large);
    box-shadow: var(--md-sys-elevation-3);
    border: none;
}

.overlay-speed-value {
    color: var(--md-sys-color-primary);
}

.overlay-speed-unit {
    color: var(--md-sys-color-on-surface-variant);
}

/* M3 Live Indicator */
.live-indicator {
    background: var(--md-sys-color-surface-container-highest);
    border-radius: var(--md-sys-shape-corner-full);
    color: var(--md-sys-color-on-surface);
    box-shadow: var(--md-sys-elevation-2);
    border: none;
}

/* M3 Forecast Section */
.forecast-section {
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-sys-shape-corner-extra-large);
    box-shadow: var(--md-sys-elevation-1);
    border: none;
    color: var(--md-sys-color-on-surface);
}

.forecast-section h3 {
    color: var(--md-sys-color-primary);
}

.forecast-slider {
    background: var(--md-sys-color-surface-container-low);
    border-radius: var(--md-sys-shape-corner-large);
}

/* M3 Forecast Hour Slots - Enhanced */
.forecast-hour-slot {
    border-radius: var(--md-sys-shape-corner-medium);
    transition: all var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized);
}

.forecast-hour-slot:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-2);
}

/* M3 Wind Description Block */
.wind-description-block {
    background: var(--md-sys-color-surface-container-high);
    backdrop-filter: blur(20px);
    border-radius: var(--md-sys-shape-corner-extra-large);
    border: none;
    box-shadow: var(--md-sys-elevation-2);
    color: var(--md-sys-color-on-surface);
}

.wind-description-title {
    color: var(--md-sys-color-primary);
    background: none;
    -webkit-text-fill-color: var(--md-sys-color-primary);
}

.wind-description-subtitle {
    color: var(--md-sys-color-on-surface-variant);
}

/* M3 Footer */
footer {
    color: var(--md-sys-color-primary-container);
    opacity: 0.9;
}

/* M3 Ripple Effect Base */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation var(--md-sys-motion-duration-long4) var(--md-sys-motion-easing-standard);
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* M3 Enhanced Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   KITE SIZE RECOMMENDATION - M3 REDESIGN
   ============================================ */

/* Container for kite size recommendation */
.kite-recommendation-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Recommendation header text */
.kite-recommendation-header {
    text-align: center;
    color: var(--md-sys-color-on-surface);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Grid of kite cards - M3 responsive grid */
.kite-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 8px;
}

/* Individual kite card - M3 Filled Card style */
.kite-card {
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 16px 12px;
    text-align: center;
    transition: all var(--md-sys-motion-duration-short4) var(--md-sys-motion-easing-emphasized);
    box-shadow: var(--md-sys-elevation-1);
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* Optimal kite - highlighted with primary color */
.kite-card--optimal {
    background: var(--md-sys-color-primary-container);
    box-shadow: var(--md-sys-elevation-3);
    transform: scale(1.05);
    border: 2px solid var(--md-sys-color-primary);
}

/* Good kite */
.kite-card--good {
    background: var(--md-sys-color-surface-container-high);
    border: 2px solid var(--md-sys-color-tertiary);
}

/* Acceptable kite */
.kite-card--acceptable {
    background: var(--md-sys-color-surface-container);
    opacity: 0.9;
}

/* Too light or too strong */
.kite-card--too-light,
.kite-card--too-strong {
    background: var(--md-sys-color-surface-container-low);
    opacity: 0.6;
}

/* No wind */
.kite-card--none {
    background: var(--md-sys-color-surface-container-lowest);
    opacity: 0.4;
}

/* Kite size number */
.kite-card__size {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 8px;
}

.kite-card--optimal .kite-card__size {
    color: var(--md-sys-color-on-primary-container);
}

/* Icon */
.kite-card__icon {
    font-size: 1.8rem;
    margin: 8px 0;
    line-height: 1;
}

/* Recommended weight */
.kite-card__weight {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    margin: 8px 0;
    line-height: 1;
}

.kite-card--optimal .kite-card__weight {
    color: var(--md-sys-color-primary);
}

/* Suitability label */
.kite-card__label {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 8px;
    line-height: 1.2;
    letter-spacing: 0.4px;
}

.kite-card--optimal .kite-card__label {
    color: var(--md-sys-color-on-primary-container);
    font-weight: 500;
}

/* Hover effect for kite cards */
.kite-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--md-sys-elevation-2);
}

.kite-card--optimal:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--md-sys-elevation-4);
}

/* Loading state */
.kite-loading {
    text-align: center;
    padding: 32px 20px;
    color: var(--md-sys-color-on-surface-variant);
}

.kite-loading__spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--md-sys-color-outline-variant);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.kite-loading__text {
    font-size: 0.95rem;
}

/* Error state */
.kite-error {
    text-align: center;
    padding: 32px 20px;
    color: var(--md-sys-color-error);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .kite-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .kite-card {
        padding: 12px 8px;
    }

    .kite-card__size {
        font-size: 1.8rem;
    }

    .kite-card__icon {
        font-size: 1.3rem;
    }

    .kite-card__weight {
        font-size: 1.1rem;
    }

    .kite-card__label {
        font-size: 0.65rem;
    }
}

/* ============================================
   SETTINGS MENU
   ============================================ */

/* Menu button (fixed top-right) */
.menu-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 900;
    width: 48px;
    height: 48px;
    border-radius: var(--md-sys-shape-corner-full);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    cursor: pointer;
    box-shadow: var(--md-sys-elevation-2);
    transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-button:hover {
    box-shadow: var(--md-sys-elevation-3);
    transform: scale(1.05);
}

.menu-button:active {
    transform: scale(0.95);
}

.menu-button svg {
    width: 24px;
    height: 24px;
}

/* Settings menu container */
.settings-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.settings-menu.active {
    pointer-events: auto;
}

/* Overlay (backdrop) */
.settings-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-standard);
}

.settings-menu.active .settings-menu__overlay {
    opacity: 1;
}

/* Menu panel (slide-in from right) */
.settings-menu__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: #1e293b;
    box-shadow: var(--md-sys-elevation-5);
    transform: translateX(100%);
    transition: transform var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-menu.active .settings-menu__panel {
    transform: translateX(0);
}

/* Header */
.settings-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.settings-menu__header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.settings-menu__close {
    width: 40px;
    height: 40px;
    border-radius: var(--md-sys-shape-corner-full);
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ffffff;
    transition: background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-menu__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-menu__close svg {
    width: 24px;
    height: 24px;
}

/* Content area (scrollable) */
.settings-menu__content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Settings sections */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: #ffffff;
}

/* Language selector */
.language-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.language-option {
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--md-sys-shape-corner-medium);
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    font-family: inherit;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-option.active {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.2);
    color: #ffffff;
}

/* Units selector */
.units-selector {
    display: flex;
    gap: 0.75rem;
}

.unit-option {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--md-sys-shape-corner-medium);
    background: transparent;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.unit-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.unit-option.active {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.2);
}

.unit-name {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.unit-option.active .unit-name {
    color: #ffffff;
}

.unit-symbol {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.unit-option.active .unit-symbol {
    color: #ffffff;
}

/* Notification button in menu */
.notification-button {
    width: 100%;
    padding: 1rem;
    border-radius: var(--md-sys-shape-corner-medium);
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    font-family: inherit;
}

.notification-button.enabled {
    background: #0ea5e9;
    color: #ffffff;
}

.notification-button.disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.notification-button:hover {
    box-shadow: var(--md-sys-elevation-1);
}

.notification-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* Footer with version */
.settings-menu__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    flex-shrink: 0;
}

.app-version {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Rider settings section */
.rider-setting {
    margin-bottom: 1.5rem;
}

.rider-setting:last-child {
    margin-bottom: 0;
}

.rider-setting-label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Board type selector */
.board-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.board-type-option {
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--md-sys-shape-corner-medium);
    background: transparent;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.board-type-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.board-type-option.active {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.2);
}

.board-type-icon {
    font-size: 2rem;
    line-height: 1;
}

.board-type-name {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.board-type-option.active .board-type-name {
    color: #ffffff;
    font-weight: 500;
}

/* Rider weight input */
.rider-weight-input {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weight-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--md-sys-shape-corner-medium);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    font-family: inherit;
}

.weight-input:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.weight-input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

/* Hide number input spinners */
.weight-input::-webkit-inner-spin-button,
.weight-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.weight-input[type=number] {
    -moz-appearance: textfield;
}

/* Weight adjustment buttons */
.weight-buttons {
    display: flex;
    gap: 0.5rem;
}

.weight-button {
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--md-sys-shape-corner-medium);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
    display: flex;
    align-items: center;
    justify-content: center;
}

.weight-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.weight-button:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile optimizations for settings menu */
@media (max-width: 768px) {
    .settings-menu__panel {
        max-width: 100%;
    }

    .menu-button {
        width: 44px;
        height: 44px;
    }

    .settings-menu__header {
        padding: 1rem;
    }

    .settings-menu__content {
        padding: 1rem;
    }

    .settings-section {
        margin-bottom: 1.5rem;
    }

    .weight-button {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* ============================================
   KITE SIZE SLIDER - HORIZONTAL SCROLL WITH FADE
   ============================================ */

/* Slider container */
.kite-slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Header text */
.kite-slider-header {
    text-align: center;
    color: var(--md-sys-color-on-surface);
    font-size: 1rem;
    font-weight: 500;
    padding: 0 1rem;
}

/* Wrapper with fade effects */
.kite-slider-wrapper {
    position: relative;
    width: 100%;
}

/* Horizontal scroll container */
.kite-slider {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 1rem 0;
}

.kite-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Track containing cards */
.kite-slider-track {
    display: flex;
    gap: 1rem;
    padding: 0 2rem;
    min-width: min-content;
}

/* Fade effects at edges */
.kite-slider-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-standard);
    z-index: 10;
}

.kite-slider-fade--left {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,0.95), transparent);
}

.kite-slider-fade--right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,0.95), transparent);
}

.kite-slider-fade--visible {
    opacity: 1;
}

/* Individual kite card */
.kite-slider-card {
    flex: 0 0 auto;
    width: 140px;
    background: var(--md-sys-color-surface-container-high);
    border-radius: var(--md-sys-shape-corner-large);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all var(--md-sys-motion-duration-medium2) var(--md-sys-motion-easing-emphasized);
    box-shadow: var(--md-sys-elevation-1);
    position: relative;
    border: 2px solid transparent;
    cursor: default;
}

/* Optimal kite - highlighted */
.kite-slider-card--optimal {
    background: var(--md-sys-color-primary-container);
    box-shadow: var(--md-sys-elevation-3);
    transform: scale(1.05);
    border-color: var(--md-sys-color-primary);
}

/* Hover effect */
.kite-slider-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--md-sys-elevation-2);
}

.kite-slider-card--optimal:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: var(--md-sys-elevation-4);
}

/* Badge with icon at top */
.kite-slider-card__badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--md-sys-elevation-2);
}

/* Kite size number */
.kite-slider-card__size {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.kite-slider-card--optimal .kite-slider-card__size {
    color: var(--md-sys-color-on-primary-container);
}

/* Recommended weight */
.kite-slider-card__weight {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--md-sys-color-primary);
    margin: 0.5rem 0;
}

.kite-slider-card--optimal .kite-slider-card__weight {
    color: var(--md-sys-color-primary);
}

/* Suitability label */
.kite-slider-card__label {
    font-size: 0.75rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 0.5rem;
    line-height: 1.2;
}

.kite-slider-card--optimal .kite-slider-card__label {
    color: var(--md-sys-color-on-primary-container);
    font-weight: 500;
}

/* Optimal tag */
.kite-slider-card__optimal-tag {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 4px 12px;
    border-radius: var(--md-sys-shape-corner-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--md-sys-elevation-2);
}

/* Loading state */
.kite-slider-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--md-sys-color-on-surface-variant);
}

.kite-slider-loading__spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--md-sys-color-outline-variant);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.kite-slider-loading__text {
    font-size: 0.95rem;
}

/* Error state */
.kite-slider-error {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--md-sys-color-error);
    font-size: 1rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .kite-slider-track {
        gap: 0.75rem;
        padding: 0 1rem;
    }

    .kite-slider-card {
        width: 120px;
        padding: 1rem 0.75rem;
    }

    .kite-slider-card__size {
        font-size: 1.875rem;
    }

    .kite-slider-card__weight {
        font-size: 1rem;
    }

    .kite-slider-card__badge {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .kite-slider-fade {
        width: 40px;
    }
}