/* Base setup and fonts - using Outfit consistently */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    background-color: #000;
}

.status-banner {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    background: rgba(32, 33, 37, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: opacity 0.2s ease;
    max-width: 90vw;
    text-align: center;
}

.status-banner.show {
    opacity: 1;
}

.status-banner.success {
    border-color: rgba(0, 200, 120, 0.7);
}

.status-banner.warn {
    border-color: rgba(255, 170, 0, 0.7);
}

.status-banner.error {
    border-color: rgba(255, 80, 80, 0.8);
}

/* Country hover info near crosshair */
.country-hover-info {
    position: absolute;
    top: calc(50% + 42px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 12px;
    color: rgba(200, 180, 220, 0.9);
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

/* 3D Globe Container */
#globeViz {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background: radial-gradient(circle at 50% 40%, #17072d 0%, #090212 55%, #030106 100%);
    overflow: hidden;
}

#globeViz::before,
#globeViz::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: screen;
}

#globeViz::before {
    background:
        radial-gradient(circle at 16% 20%, rgba(186, 95, 255, 0.33), transparent 42%),
        radial-gradient(circle at 78% 14%, rgba(120, 58, 210, 0.28), transparent 38%),
        radial-gradient(circle at 72% 78%, rgba(210, 128, 255, 0.23), transparent 44%),
        radial-gradient(circle at 32% 86%, rgba(86, 37, 158, 0.24), transparent 46%);
    opacity: 0.72;
    animation: nebulaDrift 34s ease-in-out infinite alternate;
}

#globeViz::after {
    background:
        radial-gradient(circle at 60% 42%, rgba(255, 192, 255, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 10% 68%, rgba(177, 109, 255, 0.11) 0%, transparent 28%),
        radial-gradient(circle at 88% 66%, rgba(132, 78, 223, 0.12) 0%, transparent 30%);
    opacity: 0.6;
    transform: scale(1.08);
    animation: nebulaPulse 18s ease-in-out infinite;
}

@keyframes nebulaDrift {
    0% {
        transform: translate3d(-1.5%, -1.2%, 0) scale(1.03);
    }
    50% {
        transform: translate3d(1.5%, 1.4%, 0) scale(1.07);
    }
    100% {
        transform: translate3d(-0.8%, 1%, 0) scale(1.05);
    }
}

@keyframes nebulaPulse {
    0%, 100% {
        opacity: 0.45;
    }
    50% {
        opacity: 0.72;
    }
}

/*
 * Radio Garden Crosshair
 */
.target-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.target-crosshair .circle {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(184, 41, 255, 0.9);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 18px rgba(184, 41, 255, 0.35);
}

.target-crosshair .dot {
    width: 8px;
    height: 8px;
    background-color: rgba(184, 41, 255, 1);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 16px rgba(184, 41, 255, 0.7);
}

/*
 * UI Overlay layer
 */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.bottom-bar {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: calc(100vw - 48px);
    justify-content: space-between;
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-end;
    pointer-events: none;
}

/* Common Panel Styling (Glassmorphism) */
.glass-panel, .info-nav-panel, .player-panel {
    background: rgba(30, 31, 34, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    pointer-events: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Info Nav Panel */
.info-nav-panel {
    width: 380px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 48px);
}

.location-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
}

.location-badge {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.location-pin-icon {
    width: 26px;
    height: 26px;
    stroke: #b829ff;
    fill: rgba(184, 41, 255, 0.15);
    filter: drop-shadow(0 0 10px rgba(184, 41, 255, 0.45));
}

.station-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: #b829ff;
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    position: absolute;
    top: -2px;
    right: -2px;
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(184, 41, 255, 0.5);
}

.location-text {
    flex: 1;
    overflow: hidden;
}

.location-text h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-text span {
    font-size: 14px;
    color: #a0a0a0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.nav-tabs {
    display: flex;
    background-color: rgba(0,0,0,0.4);
    height: 50px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #888;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.tab-btn.active, .tab-btn:hover {
    color: #fff;
}

/* Search Drawer Overlay */
.search-drawer {
    background: rgba(0,0,0,0.6);
    padding: 16px;
    border-bottom: 1px solid #333;
}

.drawer-header {
    padding: 10px;
    border-bottom: 1px solid #333;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-size: 16px;
    font-weight: 500;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}

.drawer-close-btn:hover {
    color: #fff;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #2a2b2f;
    border-radius: 20px;
    padding: 8px 16px;
    margin-bottom: 12px;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    margin-left: 12px;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.search-input-wrapper button {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 20px;
    cursor: pointer;
}

.search-results-list {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-result-item {
    padding: 10px 8px;
    display: block;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    color: #fff;
}
.search-result-item:hover {
    background: #2a2b2f;
}

.empty-state-item {
    color: #a8a8a8;
    text-align: center;
    margin-top: 10px;
    cursor: default;
}

.empty-state-item:hover {
    background: transparent;
}

/* Result with favicon layout */
.result-with-favicon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-favicon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

/* Radio Player Panel */
.player-panel {
    width: 380px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.player-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.station-favicon {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.marquee {
    font-size: 18px;
    font-weight: 500;
    color: #b829ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.player-subtext {
    font-size: 13px;
    color: #a0a0a0;
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-tags {
    font-size: 12px;
    color: #c9b2d8;
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 16px;
}

.player-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.playback-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.more-menu {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    gap: 8px;
}

.more-menu-item {
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #f0f0f0;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Outfit', sans-serif;
}

.more-menu-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.more-menu-item.danger {
    color: #ffb4b4;
}

/* Sleep timer submenu */
.sleep-timer-submenu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 4px 12px;
}

.sleep-timer-option {
    background: rgba(184, 41, 255, 0.15);
    border: 1px solid rgba(184, 41, 255, 0.3);
    color: #d9b3ff;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.sleep-timer-option:hover {
    background: rgba(184, 41, 255, 0.3);
    color: #fff;
}

.sleep-timer-status {
    font-size: 11px;
    color: #d9b3ff;
    background: rgba(184, 41, 255, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.play-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.volume-slider-container {
    flex: 1;
    margin: 0 20px;
    display: flex;
    align-items: center;
}

.volume-slider-container input[type="range"] {
    width: 100%;
    accent-color: #b829ff;
}

/*
 * Floating Controls (Top Right)
 */
.floating-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    pointer-events: auto;
}

.zoom-controls {
    display: flex;
    flex-direction: column;
    background: rgba(30, 31, 34, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    overflow: hidden;
}

.float-btn {
    width: 44px;
    height: 44px;
    background: rgba(30, 31, 34, 0.85);
    backdrop-filter: blur(8px);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background 0.2s;
}

.float-btn:hover {
    background: rgba(50, 51, 54, 0.95);
}

.float-btn.active {
    color: #b829ff;
    box-shadow: inset 0 0 0 1px rgba(184, 41, 255, 0.6);
}

.float-btn.border-top {
    border-top: 1px solid rgba(255,255,255,0.1);
}

#btnMyLocation, #btnLock {
    border-radius: 8px;
}

/* Keyboard shortcuts hint (desktop only) */
.keyboard-hints {
    position: absolute;
    bottom: 8px;
    right: 24px;
    pointer-events: none;
    display: flex;
    gap: 12px;
    opacity: 0.3;
    font-size: 10px;
    color: #aaa;
}

/* Responsive adjustments */
@media (max-width: 860px) {
    .bottom-bar {
        flex-direction: column;
        align-items: stretch;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        gap: 0;
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .info-nav-panel, .player-panel {
        width: 100%;
        max-width: none;
        border-radius: 0;
    }
    .info-nav-panel {
        border-radius: 12px 12px 0 0;
    }
    .floating-controls {
        top: 16px;
        right: 16px;
        flex-direction: row;
    }
    .zoom-controls {
        flex-direction: row;
    }
    .float-btn.border-top {
        border-top: none;
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    .keyboard-hints {
        display: none;
    }
    .search-results-list {
        max-height: 150px;
    }
    .location-header {
        padding: 14px 16px;
    }
    .player-panel {
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .bottom-bar {
        max-height: 50vh;
    }
    .volume-slider-container {
        margin: 0 10px;
    }
    .player-subtext {
        margin-bottom: 10px;
    }
}

/*
 * Audio Visualizer
 */
.audio-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 18px;
    padding: 0 4px;
}

.audio-visualizer .bar {
    width: 3px;
    background-color: #b829ff;
    border-radius: 2px;
    animation: visualize 1s ease-in-out infinite;
    transform-origin: bottom;
}

.audio-visualizer .bar:nth-child(1) { animation-duration: 0.5s; }
.audio-visualizer .bar:nth-child(2) { animation-duration: 0.7s; }
.audio-visualizer .bar:nth-child(3) { animation-duration: 0.6s; }
.audio-visualizer .bar:nth-child(4) { animation-duration: 0.8s; }

@keyframes visualize {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
}

/* Focus styles for keyboard accessibility */
.tab-btn:focus-visible,
.icon-btn:focus-visible,
.play-btn:focus-visible,
.float-btn:focus-visible,
.more-menu-item:focus-visible,
.sleep-timer-option:focus-visible,
.drawer-close-btn:focus-visible {
    outline: 2px solid #b829ff;
    outline-offset: 2px;
}

.search-input-wrapper input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(184, 41, 255, 0.5);
    border-radius: 4px;
}

.volume-slider-container input[type="range"]:focus-visible {
    outline: 2px solid #b829ff;
    outline-offset: 2px;
}

@media (max-height: 500px) {
    .bottom-bar {
        max-height: 45vh;
    }
    .search-results-list {
        max-height: 100px;
    }
}

/* ─── AMPD Alerts Ticker ────────────────────────────────────────── */

.alerts-ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    height: 32px;
    background: linear-gradient(90deg, rgba(184, 41, 255, 0.15), rgba(255, 107, 53, 0.1));
    border-bottom: 1px solid rgba(184, 41, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    font-size: 12px;
}

.ticker-label {
    flex-shrink: 0;
    padding: 0 10px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #b829ff;
    background: rgba(184, 41, 255, 0.15);
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(184, 41, 255, 0.3);
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: inline-flex;
    gap: 40px;
    white-space: nowrap;
    animation: tickerScroll 120s linear infinite;
    padding-left: 100%;
    color: rgba(255, 255, 255, 0.85);
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.ticker-item:hover {
    opacity: 0.7;
}

.ticker-item .ticker-badge {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticker-badge.crypto { background: rgba(255, 179, 0, 0.2); color: #ffb300; }
.ticker-badge.music { background: rgba(0, 200, 83, 0.2); color: #00c853; }
.ticker-badge.culture { background: rgba(41, 121, 255, 0.2); color: #2979ff; }
.ticker-badge.breaking { background: rgba(255, 23, 68, 0.2); color: #ff1744; }
.ticker-badge.custom { background: rgba(184, 41, 255, 0.2); color: #b829ff; }

@keyframes tickerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

/* ─── Alerts Drawer ─────────────────────────────────────────────── */

.alerts-category-filter {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.alerts-category-filter::-webkit-scrollbar {
    display: none;
}

.alert-category-btn {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.alert-category-btn:hover {
    background: rgba(184, 41, 255, 0.15);
    border-color: rgba(184, 41, 255, 0.4);
    color: #fff;
}

.alert-category-btn.active {
    background: rgba(184, 41, 255, 0.25);
    border-color: #b829ff;
    color: #fff;
}

.alert-item {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.15s ease;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.alert-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.alert-priority-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alert-priority-dot.breaking { background: #ff1744; box-shadow: 0 0 6px rgba(255, 23, 68, 0.5); }
.alert-priority-dot.high { background: #ff6b35; }
.alert-priority-dot.normal { background: #b829ff; }
.alert-priority-dot.low { background: rgba(255, 255, 255, 0.3); }

.alert-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-item-body {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
}

.alert-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}

.alert-item-meta .alert-cat-tag {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Reuse ticker badge colors for alert category tags */
.alert-cat-tag.crypto { background: rgba(255, 179, 0, 0.15); color: #ffb300; }
.alert-cat-tag.music { background: rgba(0, 200, 83, 0.15); color: #00c853; }
.alert-cat-tag.culture { background: rgba(41, 121, 255, 0.15); color: #2979ff; }
.alert-cat-tag.breaking { background: rgba(255, 23, 68, 0.15); color: #ff1744; }
.alert-cat-tag.custom { background: rgba(184, 41, 255, 0.15); color: #b829ff; }

/* Focus styles for alert buttons */
.alert-category-btn:focus-visible {
    outline: 2px solid #b829ff;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .alerts-ticker {
        height: 28px;
        font-size: 11px;
    }
    .ticker-label {
        padding: 0 6px;
        font-size: 10px;
    }
}

/* ─── Balloon Ride Button ───────────────────────────────────────── */

.balloon-ride-btn {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.3), rgba(255, 107, 53, 0.2)) !important;
    border: 1px solid rgba(184, 41, 255, 0.4);
    animation: balloonPulse 3s ease-in-out infinite;
}

.balloon-ride-btn:hover {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.5), rgba(255, 107, 53, 0.3)) !important;
    transform: scale(1.05);
}

@keyframes balloonPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(184, 41, 255, 0.3); }
    50% { box-shadow: 0 0 16px rgba(184, 41, 255, 0.6); }
}

/* ─── Genre Filter Grid ─────────────────────────────────────────── */

.genre-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    max-height: 120px;
    overflow-y: auto;
}

.genre-btn {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.genre-btn:hover {
    background: rgba(184, 41, 255, 0.15);
    border-color: rgba(184, 41, 255, 0.4);
    color: #fff;
}

.genre-btn.active {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.35), rgba(147, 51, 234, 0.25));
    border-color: #b829ff;
    color: #fff;
    box-shadow: 0 0 8px rgba(184, 41, 255, 0.3);
}

.genre-results-info {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 0;
    text-align: center;
}

/* ─── Station Submission Form ───────────────────────────────────── */

.submit-form {
    padding: 8px 0;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.15s ease;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(184, 41, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(184, 41, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #b829ff, #9333ea);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-top: 8px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #c44dff, #a855f7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 41, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.submit-note {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    margin-top: 10px;
}

/* ─── "New" Station Badge ───────────────────────────────────────── */

.new-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    animation: newBadgePulse 2s ease-in-out infinite;
}

@keyframes newBadgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ─── Scrollable Nav Tabs ───────────────────────────────────────── */

.nav-tabs-scrollable {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs-scrollable::-webkit-scrollbar {
    display: none;
}

.nav-tabs-scrollable .tab-btn {
    min-width: 60px;
    flex-shrink: 0;
}

/* ─── City Cluster Badge ────────────────────────────────────────── */

.cluster-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.4);
    pointer-events: none;
}

/* ─── Balloon Ride Animation Overlay ────────────────────────────── */

.balloon-ride-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: radial-gradient(circle at center, rgba(184, 41, 255, 0.2), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.balloon-ride-overlay.active {
    opacity: 1;
}

/* ─── AI Recommendation System Styles ─────────────────────────────── */

/* For You tab styling */
#tabForYou {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(184, 41, 255, 0.3);
}

#tabForYou:hover {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.25), rgba(139, 92, 246, 0.25));
}

#tabForYou.active {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.35), rgba(139, 92, 246, 0.35));
    border-color: rgba(184, 41, 255, 0.5);
}

/* For You drawer intro */
.for-you-intro {
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.1), rgba(139, 92, 246, 0.05));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* For You list items */
.for-you-item {
    position: relative;
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.for-you-item:hover {
    border-left-color: rgba(184, 41, 255, 0.6);
}

/* AI badge sparkle */
.ai-badge {
    display: inline-flex;
    align-items: center;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Recommendation reason text */
.recommendation-reason {
    font-size: 11px;
    color: rgba(184, 41, 255, 0.8);
    margin-top: 4px;
    font-style: italic;
}

/* For You hint message */
.for-you-hint {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    background: rgba(184, 41, 255, 0.05);
    border-radius: 8px;
    margin: 8px 12px;
}

/* NEW badge styling */
.new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 4px;
    margin-left: 6px;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}

/* HOT badge variant */
.new-badge[data-variant="hot"],
.search-result-item .new-badge:contains("HOT") {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Genre results info */
.genre-results-info {
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: balloonRideFlash 1.5s ease-out;
}

@keyframes balloonRideFlash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

/* ─── Station List Item with New Badge ──────────────────────────── */

.search-result-item .station-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Focus styles for new elements */
.genre-btn:focus-visible,
.submit-btn:focus-visible {
    outline: 2px solid #b829ff;
    outline-offset: 2px;
}

/* Responsive adjustments for new features */
@media (max-width: 860px) {
    .genre-filter-grid {
        max-height: 80px;
    }
    
    .nav-tabs-scrollable .tab-btn span {
        display: none;
    }
    
    .nav-tabs-scrollable .tab-btn {
        min-width: 44px;
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .form-group input {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .submit-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ─── Mobile Touch Target Improvements ──────────────────────────── */

@media (max-width: 860px) {
    /* Ensure minimum 44px touch targets on mobile */
    .genre-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .alert-category-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .sleep-timer-option {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .tab-btn {
        min-height: 50px;
        min-width: 44px;
    }
    
    .more-menu-item {
        min-height: 48px;
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .search-result-item {
        min-height: 48px;
        padding: 12px 10px;
    }
    
    .drawer-close-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 24px;
    }
    
    /* Larger play button for easier tapping */
    .play-btn {
        min-width: 56px;
        min-height: 56px;
        padding: 12px;
    }
    
    /* Safe area padding for iPhone notch */
    .bottom-bar {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    .alerts-ticker {
        padding-top: env(safe-area-inset-top, 0);
    }
    
    .floating-controls {
        top: calc(16px + env(safe-area-inset-top, 0));
        right: calc(16px + env(safe-area-inset-right, 0));
    }
}

/* ═══════════════════════════════════════════════════════════════════
   UI/UX IMPROVEMENTS - Sprint 1-3
   ═══════════════════════════════════════════════════════════════════ */

/* ─── #1: Now Playing Mobile Full-Screen Card ──────────────────── */

.now-playing-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(20, 10, 40, 0.98), rgba(10, 5, 20, 0.99));
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.now-playing-mobile.visible {
    transform: translateY(0);
}

.now-playing-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 10px auto 6px;
}

.now-playing-content {
    padding: 10px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.now-playing-artwork {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.3), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(184, 41, 255, 0.25);
}

.now-playing-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.now-playing-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

.now-playing-info {
    text-align: center;
}

.now-playing-info h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.now-playing-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.now-playing-tags {
    font-size: 12px;
    color: #c9b2d8;
    margin-top: 4px;
}

.now-playing-visualizer {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
}

.np-bar {
    width: 4px;
    background: linear-gradient(180deg, #b829ff, #7c3aed);
    border-radius: 2px;
    animation: npVisualize 1s ease-in-out infinite;
    transform-origin: bottom;
}

.np-bar:nth-child(1) { animation-duration: 0.45s; height: 20px; }
.np-bar:nth-child(2) { animation-duration: 0.65s; height: 28px; }
.np-bar:nth-child(3) { animation-duration: 0.5s; height: 36px; }
.np-bar:nth-child(4) { animation-duration: 0.7s; height: 28px; }
.np-bar:nth-child(5) { animation-duration: 0.55s; height: 20px; }

@keyframes npVisualize {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.now-playing-controls {
    display: flex;
    align-items: center;
    gap: 28px;
}

.np-ctrl {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 12px;
    min-width: 52px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

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

.np-play-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #b829ff, #9333ea);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(184, 41, 255, 0.4);
    transition: all 0.2s;
}

.np-play-btn:hover { transform: scale(1.05); box-shadow: 0 6px 24px rgba(184, 41, 255, 0.5); }

.now-playing-volume {
    width: 80%;
    max-width: 300px;
}

.now-playing-volume input[type="range"] {
    width: 100%;
    accent-color: #b829ff;
}

.now-playing-actions {
    display: flex;
    gap: 24px;
}

.np-action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.np-action-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.np-action-btn.active { color: #b829ff; }

/* ─── Mini Now-Playing Bar ─────────────────────────────────────── */

.mini-now-playing {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 45;
    height: 56px;
    background: rgba(20, 15, 30, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(184, 41, 255, 0.2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    cursor: pointer;
}

.mini-np-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.3), rgba(139, 92, 246, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    overflow: hidden;
}

.mini-np-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mini-np-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mini-np-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-np-loc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-np-play {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── #3: Onboarding Overlay ───────────────────────────────────── */

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
}

.onboarding-card {
    position: relative;
    background: rgba(30, 25, 45, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(184, 41, 255, 0.3);
    border-radius: 20px;
    padding: 40px 32px 28px;
    max-width: 380px;
    width: 90vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(184, 41, 255, 0.15);
    animation: onboardingIn 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes onboardingIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.onboarding-icon {
    font-size: 52px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.onboarding-card h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.onboarding-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.onboarding-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 20px 0 16px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.onboarding-dot.active {
    background: #b829ff;
    width: 20px;
    border-radius: 4px;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.onboarding-skip {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    padding: 8px 16px;
}

.onboarding-skip:hover { color: #fff; }

.onboarding-next {
    background: linear-gradient(135deg, #b829ff, #9333ea);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    padding: 10px 28px;
    border-radius: 10px;
    transition: all 0.2s;
}

.onboarding-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 41, 255, 0.4);
}

/* ─── #4: Stream Loading & Error States ────────────────────────── */

.station-loading-skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.stream-loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.loading-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 16px;
}

.loading-wave span {
    width: 3px;
    height: 3px;
    background: #b829ff;
    border-radius: 50%;
    animation: loadingBounce 0.8s ease-in-out infinite;
}

.loading-wave span:nth-child(2) { animation-delay: 0.1s; }
.loading-wave span:nth-child(3) { animation-delay: 0.2s; }

@keyframes loadingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.auto-advance-countdown {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ─── #6: Genre Color-Coded Dots (applied via JS) ──────────────── */
/* Colors defined in JS genre map; CSS provides the fallback glow */

/* ─── #10: Smooth Tab Transitions ──────────────────────────────── */

.search-drawer {
    animation: drawerSlideIn 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

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

/* ─── #11: Favicon Fallback Avatars ────────────────────────────── */

.avatar-fallback {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    text-transform: uppercase;
}

.result-with-favicon .avatar-fallback {
    width: 28px;
    height: 28px;
    font-size: 13px;
}

/* ─── #8: Clickable Ticker ─────────────────────────────────────── */

.alerts-ticker {
    cursor: pointer;
}

.alerts-ticker:hover {
    background: linear-gradient(90deg, rgba(184, 41, 255, 0.22), rgba(255, 107, 53, 0.14));
}

/* ─── #9: Listening Stats ──────────────────────────────────────── */

.stats-content {
    padding: 8px 0;
}

.stats-hero {
    text-align: center;
    padding: 20px 16px;
    background: linear-gradient(135deg, rgba(184, 41, 255, 0.15), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    margin: 0 8px 16px;
}

.stats-total-time {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #b829ff, #e879f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 8px 16px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
}

.stats-card-value {
    font-size: 22px;
    font-weight: 700;
    color: #e879f9;
}

.stats-card-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.stats-section {
    padding: 8px 12px;
}

.stats-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.stats-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.stats-bar-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 60px;
    text-transform: capitalize;
}

.stats-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #b829ff, #e879f9);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.32, 0.72, 0, 1);
}

.stats-bar-value {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 30px;
    text-align: right;
}

/* ─── #13: Crosshair Feedback Animation ────────────────────────── */

.target-crosshair.pulse .circle {
    animation: crosshairPulse 0.6s ease-out;
}

@keyframes crosshairPulse {
    0% { transform: scale(1); border-color: rgba(184, 41, 255, 0.9); }
    50% { transform: scale(1.4); border-color: rgba(184, 41, 255, 0.4); }
    100% { transform: scale(1); border-color: rgba(184, 41, 255, 0.9); }
}

.target-crosshair.locked .circle {
    border-color: rgba(0, 200, 120, 0.9);
    box-shadow: 0 0 18px rgba(0, 200, 120, 0.35);
}

.target-crosshair.locked .dot {
    background-color: rgba(0, 200, 120, 1);
    box-shadow: 0 0 16px rgba(0, 200, 120, 0.7);
}

/* ─── #14: Dark/Dim Globe When Player Expands ──────────────────── */

#globeViz.dimmed::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* ─── #15: Keyboard Shortcuts Modal ────────────────────────────── */

.shortcuts-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shortcuts-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.shortcuts-card {
    position: relative;
    background: rgba(30, 25, 45, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(184, 41, 255, 0.25);
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    animation: onboardingIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.shortcuts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.shortcuts-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.shortcuts-close {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

.shortcuts-close:hover { color: #fff; }

.shortcuts-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}

.shortcut-row kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-family: inherit;
    color: #e879f9;
    min-width: 32px;
    text-align: center;
}

.shortcut-row span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

/* ─── #16: Radio Passport Badges ───────────────────────────────── */

.passport-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.passport-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 11px;
    transition: all 0.2s;
}

.passport-badge.earned {
    border-color: rgba(184, 41, 255, 0.4);
    background: rgba(184, 41, 255, 0.1);
}

.passport-badge.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.passport-badge-icon {
    font-size: 16px;
}

.passport-badge-name {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ─── #18: Radio Postcard Modal ────────────────────────────────── */

.postcard-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.postcard-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.postcard-card {
    position: relative;
    background: rgba(30, 25, 45, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(184, 41, 255, 0.25);
    border-radius: 16px;
    padding: 24px;
    max-width: 380px;
    width: 90vw;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    animation: onboardingIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.postcard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.postcard-header h3 { font-size: 16px; font-weight: 600; }

.postcard-close {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

.postcard-close:hover { color: #fff; }

.postcard-preview {
    margin-bottom: 16px;
}

.postcard-visual {
    position: relative;
    background: linear-gradient(135deg, #1a0a30, #0d0520);
    border-radius: 12px;
    padding: 32px 20px;
    border: 2px solid rgba(184, 41, 255, 0.2);
    overflow: hidden;
    text-align: center;
}

.postcard-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(184, 41, 255, 0.15), transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.1), transparent 50%);
}

.postcard-station-name {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.postcard-location {
    position: relative;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.postcard-stamp {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(184, 41, 255, 0.6);
    border: 1px solid rgba(184, 41, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    transform: rotate(12deg);
}

.postcard-message {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    padding: 10px 12px;
    resize: none;
    height: 60px;
    margin-bottom: 12px;
}

.postcard-message:focus {
    outline: none;
    border-color: rgba(184, 41, 255, 0.5);
}

.postcard-share-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #b829ff, #9333ea);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.postcard-share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 41, 255, 0.4);
}

/* ─── Mobile: show mini-bar and now-playing, hide desktop player ── */

@media (max-width: 860px) {
    .now-playing-mobile {
        display: block !important;
    }

    .mini-now-playing.visible {
        display: flex !important;
    }

    .now-playing-mobile:not(.visible) {
        transform: translateY(100%);
    }

    .bottom-bar {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
    }

    .shortcuts-modal {
        display: none !important;
    }
}

@media (min-width: 861px) {
    .now-playing-mobile,
    .mini-now-playing {
        display: none !important;
    }
}

/* ─── #17: Ambient Visualizer ──────────────────────────────────── */

.ambient-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
    mix-blend-mode: screen;
}
