/**
 * Rezmo.io - Global Radio Visualization Platform
 *
 * Stylesheet for the Rezmo.io web application, a Radio Garden-inspired
 * platform for exploring radio stations around the world on a 3D globe.
 *
 * Architecture:
 * - CSS Custom Properties for theming and consistency
 * - Mobile-first responsive design
 * - Accessibility considerations (reduced motion, focus states)
 * - Component-based organization
 *
 * Color Palette:
 * - Primary: #4ade80 (Green) - Station markers, active states
 * - Secondary: #22d3ee (Cyan) - Locked states, accents
 * - Background: #0f0f1a to #1a1a2e - Dark gradient
 *
 * @author Rezmo.io
 * @version 1.0.0
 */

/* =============================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)

   Centralized design tokens for consistent theming across the application.
   These variables control colors, typography, and animation timing.
   ============================================================================= */

:root {
    /* Background Colors */
    --color-bg: #1a1a2e;
    --color-bg-dark: #0f0f1a;

    /* Brand Colors */
    --color-primary: #4ade80;              /* Green - primary actions, markers */
    --color-primary-dim: rgba(74, 222, 128, 0.3);
    --color-primary-glow: rgba(74, 222, 128, 0.5);
    --color-secondary: #22d3ee;            /* Cyan - locked states, accents */

    /* Text Colors */
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.6);
    --color-text-dim: rgba(255, 255, 255, 0.3);

    /* UI Surface Colors */
    --color-panel: rgba(15, 15, 26, 0.9);
    --color-panel-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Animation Timing */
    --transition-fast: 0.15s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =============================================================================
   CSS RESET

   Normalize browser defaults for consistent cross-browser rendering.
   ============================================================================= */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background: var(--color-bg-dark);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   GLOBE CONTAINER

   Full-screen container for the CesiumJS 3D globe.
   Positioned behind all UI overlays with z-index: 1.
   ============================================================================= */

#globe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: transparent;
}

#globe-container canvas {
    display: block;
    cursor: grab;
}

#globe-container canvas:active {
    cursor: grabbing;
}

/* Hide Cesium's default UI elements for a cleaner interface */
.cesium-viewer-toolbar,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-bottom,
.cesium-viewer-fullscreenContainer,
.cesium-credit-logoContainer,
.cesium-credit-expand-link,
.cesium-widget-credits {
    display: none !important;
}

.cesium-viewer {
    font-family: var(--font-main);
    background: transparent !important;
}

/* Ensure Cesium fills the container completely and is transparent */
.cesium-viewer,
.cesium-widget {
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
}

.cesium-widget canvas {
    width: 100% !important;
    height: 100% !important;
}

/* =============================================================================
   TUNING RING

   Circular indicator at screen center showing when a station is "tuned in".
   Uses SVG for smooth, scalable rendering with CSS-controlled animations.

   States:
   - Default: Hidden (opacity: 0)
   - .active: Visible when pointing at the globe
   - .tuned: Ring fills when a station is detected
   - .locked: Cyan color when station is locked
   ============================================================================= */

.tuning-ring {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.tuning-ring.active {
    opacity: 1;
}

.tuning-ring svg {
    width: 100%;
    height: 100%;
}

/* Background ring - subtle gray outline */
.tuning-ring .ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 2;
}

/* Progress ring - animated stroke that fills when tuned */
.tuning-ring .ring-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 283;          /* Circumference of circle (2πr ≈ 283) */
    stroke-dashoffset: 283;         /* Start fully hidden */
    transform: rotate(-90deg);      /* Start from top */
    transform-origin: center;
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 8px var(--color-primary-glow));
}

/* When tuned, reveal the full ring */
.tuning-ring.tuned .ring-progress {
    stroke-dashoffset: 0;
}

/* Locked state changes color to cyan */
.tuning-ring.locked .ring-progress {
    stroke: var(--color-secondary);
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5));
}

/* =============================================================================
   UI OVERLAY

   Container for all UI elements that float above the globe.
   Uses pointer-events: none to allow interaction with the globe,
   with pointer-events: auto on interactive children.
   ============================================================================= */

.ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.ui-overlay > * {
    pointer-events: auto;
}

/* =============================================================================
   HEADER

   Top navigation bar with logo and station count.
   ============================================================================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: baseline;
    pointer-events: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.logo-dot {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--color-primary);
}

.header-right {
    pointer-events: auto;
}

.station-count {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =============================================================================
   STATION PANEL

   Bottom panel displaying information about the currently tuned station.
   Slides up from the bottom when a station is selected.

   Contains:
   - Station name and location
   - Country flag and codec info
   - Audio controls (play, lock, volume)
   ============================================================================= */

.station-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--color-panel) 0%, transparent 100%);
    padding: 60px 30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
}

.station-panel.visible {
    transform: translateY(0);
    opacity: 1;
}

.panel-content {
    flex: 1;
    min-width: 0;   /* Allow text truncation in flex container */
}

.station-location {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.station-name {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.station-codec {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.now-playing {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--color-text-dim);
    font-style: italic;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.now-playing.visible {
    opacity: 1;
}

/* =============================================================================
   AUDIO CONTROLS

   Playback controls including play/pause button, lock button, and volume slider.
   ============================================================================= */

.audio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

/* --- Play Button ---
   Large circular button with play/pause/loading states.
   Uses CSS to show/hide the appropriate icon based on state classes. */

.play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: var(--color-bg-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast),
                background var(--transition-fast),
                box-shadow var(--transition-fast);
    box-shadow: 0 4px 20px var(--color-primary-glow);
    position: relative;
}

.play-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 30px var(--color-primary-glow);
}

.play-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.play-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    cursor: not-allowed;
}

.play-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

/* Icon state management - only one icon visible at a time */
.play-btn .icon-play,
.play-btn .icon-pause,
.play-btn .icon-loading {
    position: absolute;
    transition: opacity var(--transition-fast);
}

.play-btn .icon-pause,
.play-btn .icon-loading {
    opacity: 0;
}

.play-btn.playing .icon-play {
    opacity: 0;
}

.play-btn.playing .icon-pause {
    opacity: 1;
}

.play-btn.loading .icon-play,
.play-btn.loading .icon-pause {
    opacity: 0;
}

.play-btn.loading .icon-loading {
    opacity: 1;
    animation: spin 1s linear infinite;
}

.play-btn .icon-loading circle {
    stroke: currentColor;
    stroke-dasharray: 40;
    stroke-dashoffset: 10;
}

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

/* --- Lock Button ---
   Toggles station lock to prevent auto-switching when navigating. */

.lock-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    position: relative;
}

.lock-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--color-text);
}

.lock-btn.locked {
    border-color: var(--color-secondary);
    background: var(--color-secondary);
    color: var(--color-bg-dark);
    box-shadow: 0 2px 12px rgba(34, 211, 238, 0.5);
}

.lock-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    position: absolute;
    transition: opacity var(--transition-fast);
}

.lock-btn .icon-locked {
    opacity: 0;
}

.lock-btn .icon-unlocked {
    opacity: 1;
}

.lock-btn.locked .icon-locked {
    opacity: 1;
}

.lock-btn.locked .icon-unlocked {
    opacity: 0;
}

.lock-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* --- Volume Control ---
   Horizontal slider for audio volume adjustment. */

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-icon {
    width: 20px;
    height: 20px;
    fill: var(--color-text-muted);
}

.volume-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--color-text);
    border-radius: 50%;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--color-text);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* =============================================================================
   INSTRUCTIONS

   Hint text at bottom of screen showing navigation controls.
   Hidden when a station is selected.
   ============================================================================= */

.instructions {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

.instructions p {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    letter-spacing: 0.05em;
}

.instructions.hidden {
    opacity: 0;
}

/* =============================================================================
   COORDINATES DISPLAY

   Shows current latitude/longitude at bottom-right.
   Uses monospace font for consistent number alignment.
   ============================================================================= */

.coordinates {
    position: fixed;
    bottom: 30px;
    right: 30px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--color-text-dim);
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* =============================================================================
   LOADING SCREEN

   Immersive loading experience featuring:
   - Animated 3D-style spinning globe with continents
   - Pulsing radio wave rings emanating from the globe
   - Floating FM frequency numbers
   - Fun rotating radio facts
   - Smooth progress bar with glow effect
   ============================================================================= */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-dark);
    background-image:
        radial-gradient(ellipse at 30% 20%, rgba(74, 222, 128, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(34, 211, 238, 0.03) 0%, transparent 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
}

/* --- Animated Globe --- */
.globe-loader {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.globe-sphere {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #2a6a4e 0%, #1a4a2e 40%, #0d2818 100%);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset -15px -15px 30px rgba(0, 0, 0, 0.5),
        inset 10px 10px 20px rgba(74, 222, 128, 0.15),
        0 0 40px rgba(74, 222, 128, 0.25),
        0 0 80px rgba(74, 222, 128, 0.1);
    /* No 3D rotation - stays as perfect circle */
}

/* Simplified continent shapes using gradients */
.globe-continents {
    position: absolute;
    width: 200%;
    height: 100%;
    left: 0;
    top: 0;
    background:
        /* North America */
        radial-gradient(ellipse 25% 20% at 15% 35%, rgba(74, 222, 128, 0.4) 0%, transparent 100%),
        /* South America */
        radial-gradient(ellipse 12% 25% at 25% 65%, rgba(74, 222, 128, 0.35) 0%, transparent 100%),
        /* Europe */
        radial-gradient(ellipse 15% 12% at 48% 30%, rgba(74, 222, 128, 0.4) 0%, transparent 100%),
        /* Africa */
        radial-gradient(ellipse 18% 30% at 52% 55%, rgba(74, 222, 128, 0.35) 0%, transparent 100%),
        /* Asia */
        radial-gradient(ellipse 30% 25% at 75% 40%, rgba(74, 222, 128, 0.4) 0%, transparent 100%),
        /* Australia */
        radial-gradient(ellipse 12% 10% at 85% 70%, rgba(74, 222, 128, 0.35) 0%, transparent 100%),
        /* Duplicate for seamless loop */
        radial-gradient(ellipse 25% 20% at 115% 35%, rgba(74, 222, 128, 0.4) 0%, transparent 100%),
        radial-gradient(ellipse 12% 25% at 125% 65%, rgba(74, 222, 128, 0.35) 0%, transparent 100%);
    animation: continentsScroll 20s linear infinite;
}

/* Grid lines on globe */
.globe-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        /* Latitude lines */
        repeating-linear-gradient(
            0deg,
            transparent 0%,
            transparent 18%,
            rgba(74, 222, 128, 0.1) 18%,
            rgba(74, 222, 128, 0.1) 20%
        );
    opacity: 0.5;
}

@keyframes continentsScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Radio Wave Rings --- */
.radio-waves {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.wave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    opacity: 0;
    animation: waveExpand 2.5s ease-out infinite;
}

.wave-1 {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
}

.wave-2 {
    width: 100px;
    height: 100px;
    animation-delay: 0.8s;
    border-color: var(--color-secondary);
}

.wave-3 {
    width: 100px;
    height: 100px;
    animation-delay: 1.6s;
}

@keyframes waveExpand {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Pulsing signal dot on globe */
.signal-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    top: 30%;
    left: 55%;
    box-shadow: 0 0 10px var(--color-primary), 0 0 20px var(--color-primary);
    animation: signalPulse 1.5s ease-in-out infinite;
}

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

/* --- Floating Frequencies --- */
.floating-frequencies {
    position: absolute;
    width: 300px;
    height: 300px;
    pointer-events: none;
}

.freq {
    position: absolute;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--color-text-dim);
    opacity: 0;
    animation: freqFloat 8s ease-in-out infinite;
}

.freq::after {
    content: ' FM';
    font-size: 0.5rem;
    opacity: 0.7;
}

.freq-1 {
    top: 15%;
    left: 0%;
    animation-delay: 0s;
}

.freq-2 {
    top: 25%;
    right: -5%;
    animation-delay: 2.5s;
    color: var(--color-secondary);
}


@keyframes freqFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(10px);
    }
    20%, 80% {
        opacity: 0.6;
        transform: translateY(0);
    }
}

/* --- Loading Text --- */
.loading-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
    min-height: 1.5em;
}

/* --- Progress Bar with Glow --- */
.loading-bar {
    width: 220px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px var(--color-primary), 0 0 20px rgba(74, 222, 128, 0.3);
}

/* Animated shimmer effect on progress bar */
.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Fun Radio Facts --- */
.radio-fact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    max-width: 500px;
    text-align: center;
    margin-top: 15px;
    padding: 12px 20px;
    background: rgba(74, 222, 128, 0.05);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: 25px;
    opacity: 0;
    animation: factFadeIn 0.5s ease-out 1s forwards;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.fact-icon {
    font-size: 1.1rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.fact-text {
    color: var(--color-text);
    font-weight: 400;
    letter-spacing: 0.02em;
}

@keyframes factFadeIn {
    to { opacity: 1; }
}

/* --- Mobile Adjustments for Loading Screen --- */
@media (max-width: 480px) {
    .globe-loader {
        width: 120px;
        height: 120px;
    }

    .globe-sphere {
        width: 80px;
        height: 80px;
    }

    .wave-1, .wave-2, .wave-3 {
        width: 80px;
        height: 80px;
    }

    .floating-frequencies {
        width: 250px;
        height: 250px;
    }

    .freq {
        font-size: 0.6rem;
    }

    .loading-bar {
        width: 180px;
    }

    .radio-fact {
        max-width: 90vw;
        font-size: 0.75rem;
        white-space: normal;
        padding: 10px 15px;
    }

    .fact-text {
        line-height: 1.4;
    }
}

/* =============================================================================
   FILTER BUTTONS

   Horizontal button bar for filtering stations by genre/category.
   Positioned at top-center of the screen.
   ============================================================================= */

.filter-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: auto;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: var(--color-panel);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-panel-border);
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90vw;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--color-primary);
    color: var(--color-bg-dark);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Hidden state for mobile */
.filter-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(-20px);
}

/* =============================================================================
   RESPONSIVE DESIGN

   Breakpoint adjustments for tablet and mobile devices.
   ============================================================================= */

/* Tablet breakpoint (768px) */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .station-panel {
        flex-direction: column;
        align-items: stretch;
        padding: 40px 20px 20px;
        gap: 20px;
    }

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

    .play-btn {
        width: 56px;
        height: 56px;
    }

    /* Hide volume on mobile (use device volume) */
    .volume-control {
        display: none;
    }

    .tuning-ring {
        width: 60px;
        height: 60px;
    }

    /* Hide coordinates on mobile */
    .coordinates {
        display: none;
    }

    .instructions {
        bottom: 20px;
    }

    /* Filter button adjustments */
    .filter-container {
        top: 70px;
        left: 10px;
        right: 10px;
        transform: none;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .filter-container.hidden {
        transform: translateY(-20px);
    }

    .filter-buttons {
        gap: 6px;
        padding: 6px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 0.65rem;
    }
}

/* Mobile breakpoint (480px) */
@media (max-width: 480px) {
    .station-name {
        font-size: 1.3rem;
    }

    .station-panel {
        padding: 30px 15px 15px;
    }
}

/* =============================================================================
   ACCESSIBILITY

   Support for users who prefer reduced motion and keyboard navigation.
   ============================================================================= */

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.play-btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.volume-slider:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}
