:root {
      --bg: #070b14; --bg2: #0b1020;
      --surface: rgba(255, 255, 255, 0.04); --surface-2: rgba(255, 255, 255, 0.08);
      --card-from: rgba(255, 255, 255, 0.06); --card-to: rgba(255, 255, 255, 0.02);
      --card-border: rgba(255, 255, 255, 0.05);
      --accent: #38bdf8; --accent-2: #8b5cf6; --accent-soft: rgba(56, 189, 248, 0.16);
      --danger: #fb7185; --text: #f8fafc; --muted: #94a3b8; --line: rgba(255, 255, 255, 0.08);
      --glass: rgba(7, 11, 20, 0.78); --shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
      --grid-line: rgba(255, 255, 255, 0.02); --play-bg: #f8fafc; --play-fg: #07111f;
      --glow-1: rgba(56, 189, 248, 0.15); --glow-2: rgba(139, 92, 246, 0.15);
      font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    [data-theme="light"] {
      --bg: #f4f7fa; --bg2: #e6edf4;
      --surface: rgba(255, 255, 255, 0.6); --surface-2: rgba(255, 255, 255, 0.9);
      --card-from: rgba(255, 255, 255, 0.95); --card-to: rgba(255, 255, 255, 0.7);
      --card-border: rgba(15, 23, 42, 0.05);
      --accent: #0284c7; --accent-2: #7c3aed; --accent-soft: rgba(2, 132, 199, 0.12);
      --danger: #ef4444; --text: #0f172a; --muted: #64748b; --line: rgba(15, 23, 42, 0.08);
      --glass: rgba(255, 255, 255, 0.85); --shadow: 0 20px 40px rgba(30, 41, 59, 0.12);
      --grid-line: rgba(15, 23, 42, 0.025); --play-bg: #0f172a; --play-fg: #f8fafc;
      --glow-1: rgba(2, 132, 199, 0.1); --glow-2: rgba(124, 58, 237, 0.1);
    }

    * { box-sizing: border-box; }
    html { height: 100%; scroll-behavior: smooth; }
    body {
      margin: 0; min-height: 100%;
      background: var(--bg);
      color: var(--text); padding-bottom: calc(150px + env(safe-area-inset-bottom));
      -webkit-tap-highlight-color: transparent; overflow-x: hidden;
      transition: background 0.5s ease, color 0.35s ease;
      user-select: none;
    }

    /* Vaste achtergrond: scrollt niet mee */
    body::after {
      content: ""; position: fixed; inset: 0; z-index: -2;
      background: radial-gradient(circle at 15% 0%, var(--glow-1), transparent 45%),
                  radial-gradient(circle at 88% 8%, var(--glow-2), transparent 45%),
                  linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
      transition: background 0.5s ease;
      pointer-events: none;
    }

    body:before {
      content: ""; position: fixed; inset: 0; z-index: -1;
      background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                       linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
      background-size: 40px 40px; mask-image: linear-gradient(to bottom, #000, transparent 70%);
      pointer-events: none;
    }
    header { padding: calc(40px + env(safe-area-inset-top)) 20px 20px; text-align: center; position: relative; }
    .top-controls { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 20px; display: flex; gap: 10px; align-items: center; z-index: 20; }
    .lang-switch { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
    .lang-btn { border: 0; background: transparent; border-radius: 50%; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; transition: all .2s ease; }
    .lang-btn:hover, .lang-btn.active { background: var(--accent-soft); transform: scale(1.05); }
    .theme-toggle { border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--text); transition: all .25s cubic-bezier(0.4, 0, 0.2, 1); }
    .theme-toggle:hover { transform: rotate(15deg) scale(1.05); background: var(--accent-soft); border-color: var(--accent); }
    .theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
    @media(max-width:640px) { .top-controls { position: static; justify-content: center; margin: 0 auto 20px; width: max-content; } }

    h1 { margin: 0 0 10px; font-size: clamp(2.2rem, 7vw, 4.5rem); letter-spacing: -0.04em; font-weight: 900; }
    .brand { display: flex; justify-content: center; }
    .brand-logo { width: min(440px, 78vw); height: auto; display: block; filter: drop-shadow(0 10px 30px rgba(56,189,248,.18)); }
    .brand-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
    .grad { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .sub { margin: 0 auto 28px; max-width: 620px; color: var(--muted); font-weight: 400; font-size: 1.05rem; }
    .search-wrapper { max-width: 680px; margin: 0 auto; position: relative; display: flex; align-items: center; }
    .search-icon { position: absolute; left: 22px; color: var(--muted); width: 22px; height: 22px; z-index: 1; transition: color 0.3s; pointer-events: none; }
    input[type=text] {
      width: 100%; padding: 20px 54px 20px 58px; font-size: 1.1rem; font-family: inherit;
      border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
      color: var(--text); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      outline: none; transition: all .3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 30px rgba(0,0,0,.05);
    }
    input[type=text]::placeholder { color: var(--muted); font-weight: 300; }
    input[type=text]:focus { border-color: var(--accent); background: var(--surface-2); box-shadow: 0 0 0 4px var(--accent-soft), 0 20px 40px rgba(0,0,0,.1); }
    .clear-search { position: absolute; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); display: none; cursor: pointer; font-size: 1.5rem; line-height: 1; transition: 0.2s; }
    .clear-search:hover { background: var(--danger); color: white; }
    .clear-search.show { display: block; }
    .filters {
      display: flex; gap: 10px; max-width: 1280px; margin: 24px auto 0; padding: 4px 20px 14px;
      overflow-x: auto; scrollbar-width: none; align-items: center; justify-content: center;
      -webkit-overflow-scrolling: touch; flex-wrap: wrap;
    }
    .filters::-webkit-scrollbar { display: none; }
    .filter-btn { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 10px 20px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: all .2s ease; font-weight: 600; font-family: inherit; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.05); }
    .filter-btn:hover, .filter-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-soft); }
    .filter-btn.fav-btn { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); color: var(--danger); }
    .filter-btn.fav-btn.active, .filter-btn.fav-btn:hover { background: linear-gradient(135deg, #fb7185, #ef4444); color: #fff; border-color: transparent; }
    @media(max-width: 900px) {
      .filters { justify-content: flex-start; flex-wrap: nowrap; }
    }
    .container { max-width: 1280px; margin: 20px auto; padding: 0 20px; }
    .topline { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
    .topline h2 { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--text); }
    .topline span.count { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
    .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
    .station-card { background: linear-gradient(180deg, var(--card-from), var(--card-to)); border-radius: 24px; padding: 22px 18px; text-align: center; cursor: pointer; transition: all .3s cubic-bezier(.2,.8,.2,1); position: relative; border: 1px solid var(--card-border); box-shadow: 0 14px 30px rgba(0,0,0,.08); overflow: hidden; }
    .station-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 50%); opacity: 0; transition: .3s; }
    .station-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.15); border-color: var(--line); }
    .station-card:hover::before, .station-card.active::before { opacity: 1; }
    .station-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 24px 60px var(--accent-soft); }
    .station-card img { width: 100px; height: 100px; object-fit: contain; border-radius: 24px; margin: 4px 0 18px; background: #fff; padding: 8px; box-shadow: 0 12px 28px rgba(0,0,0,.15); position: relative; transition: transform 0.3s; }
    .station-card:hover img { transform: scale(1.05); }
    .station-card h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
    .station-card p { margin: 0; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; position: relative; }

    .card-now { position: absolute; left: 16px; top: 16px; display: none; align-items: flex-end; gap: 3px; height: 16px; z-index: 2; }
    .station-card.active .card-now { display: flex; }
    .card-now i { width: 4px; background: var(--accent); border-radius: 4px; animation: equalize .7s infinite alternate ease-in-out; }
    .card-now i:nth-child(1) { height: 40%; animation-delay: .1s; }
    .card-now i:nth-child(2) { height: 90%; animation-delay: .32s; }
    .card-now i:nth-child(3) { height: 60%; animation-delay: .2s; }

    .fav-icon { position: absolute; top: 12px; right: 12px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; transition: all .2s; z-index: 2; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
    .fav-icon:hover { transform: scale(1.15); background: var(--surface-2); }
    .fav-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 2; }
    .fav-icon.is-fav svg { fill: var(--danger); stroke: var(--danger); animation: pop .4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
    @keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

    .message { grid-column: 1/-1; text-align: center; padding: 80px 20px; color: var(--muted); background: var(--surface); border: 2px dashed var(--line); border-radius: 24px; font-size: 1.1rem; font-weight: 500; }
    .message .retry-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 24px; border: 0; border-radius: 999px; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 0.95rem; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 24px var(--accent-soft); transition: transform .2s; }
    .message .retry-btn:hover { transform: translateY(-2px) scale(1.03); }
    .message .retry-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

    .skeleton { height: 200px; border-radius: 24px; background: linear-gradient(90deg, var(--card-to), var(--card-from), var(--card-to)); background-size: 200% 100%; animation: shimmer 1.5s infinite linear; border: 1px solid var(--card-border); }
    @keyframes shimmer { to { background-position: -200% 0; } }
    .toast-container { position: fixed; right: 20px; bottom: calc(130px + env(safe-area-inset-bottom)); z-index: 9999; display: flex; flex-direction: column; gap: 12px; pointer-events: none; }
    .toast { min-width: min(340px, calc(100vw - 40px)); padding: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line); box-shadow: 0 20px 40px rgba(0,0,0,.25); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); display: flex; align-items: center; gap: 14px; transform: translateX(120%); opacity: 0; animation: toastIn .4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; color: var(--text); }
    .toast.out { animation: toastOut .3s ease forwards; }
    .toast-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
    .toast.err .toast-ico { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
    .toast strong { display: block; font-size: 1rem; font-weight: 700; }
    .toast span { display: block; margin-top: 3px; color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    @keyframes toastIn { to { transform: translateX(0); opacity: 1; } }
    @keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }
    /* FLOATING PLAYER BAR */
    .player-bar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 150%); width: calc(100% - 40px); max-width: 1100px; background: var(--glass); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%); padding: 14px 24px; border-radius: 32px; box-shadow: var(--shadow); z-index: 100; border: 1px solid var(--line); transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
    .player-bar.show { transform: translate(-50%, 0); }
    .ambient-glow { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.15; filter: blur(40px); z-index: -1; border-radius: 32px; transition: background-image 0.5s; }
    .player-grip { display: none; }
    .player-wrapper { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1.1fr); align-items: center; gap: 20px; }

    .track-info { display: flex; align-items: center; gap: 16px; min-width: 0; }
    .track-info img { width: 64px; height: 64px; border-radius: 20px; background: #fff; object-fit: contain; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
    .track-text { min-width: 0; }
    .track-text h4 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
    .track-title { margin: 0 0 6px; font-size: 0.82rem; font-weight: 600; color: var(--accent); white-space: nowrap; overflow: hidden; max-width: 280px; display: none; }
    .track-title.show { display: block; }
    .track-title span { display: inline-block; white-space: nowrap; }
    .track-title.marquee span { animation: marquee 13s linear infinite; }
    @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
    .status-line { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 0.85rem; font-weight: 500; flex-wrap: wrap; }
    .status-line .reconnecting { color: var(--accent); font-weight: 700; }
    .live-pill { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 12px var(--danger); animation: pulse 1.5s infinite; }
    @keyframes pulse { 50% { opacity: .4; transform: scale(.8); } }
    .meta-badge { font-size: 0.7rem; font-weight: 800; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; }

    /* Web Audio Canvas Visualizer */
    .visualizer-canvas { width: 80px; height: 20px; display: none; }
    .visualizer-canvas.active { display: block; }

    /* CSS Visualizer */
    .visualizer { align-items: flex-end; gap: 3px; height: 16px; display: none; }
    .visualizer.active { display: flex; }
    .bar { width: 4px; background: linear-gradient(to top, var(--accent), var(--accent-2)); border-radius: 4px; animation: equalize .7s infinite alternate ease-in-out; }
    .bar:nth-child(1) { height: 35%; animation-delay: .1s; }
    .bar:nth-child(2) { height: 80%; animation-delay: .32s; }
    .bar:nth-child(3) { height: 100%; animation-delay: .18s; }
    .bar:nth-child(4) { height: 55%; animation-delay: .5s; }
    @keyframes equalize { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

    .controls-core { display: flex; align-items: center; gap: 20px; justify-content: center; }
    .btn-skip { background: transparent; border: 0; color: var(--text); width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; opacity: 0.8; }
    .btn-skip:hover { transform: scale(1.1); background: var(--surface-2); opacity: 1; }
    .btn-skip svg { width: 22px; height: 22px; fill: currentColor; }

    .btn-play { background: var(--play-bg); color: var(--play-fg); border: 0; width: 64px; height: 64px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 12px 30px rgba(0,0,0,.15); }
    .btn-play:hover { transform: scale(1.1); box-shadow: 0 15px 40px rgba(0,0,0,.25); }
    .btn-play svg { width: 28px; height: 28px; fill: currentColor; }
    .btn-play.loading svg { display: none; }
    .btn-play.loading:after { content: ""; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(0,0,0,.1); border-top-color: var(--play-fg); animation: spin .7s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    .volume-wrapper { display: flex; align-items: center; gap: 12px; color: var(--muted); transition: color 0.2s; }
    .volume-wrapper:hover { color: var(--text); }

    input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: var(--line); border-radius: 99px; outline: 0; cursor: pointer; }
    input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
    input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }
    .volume-wrapper input[type=range] { width: 100px; }

    .actions { display: flex; justify-content: flex-end; gap: 10px; }
    .btn-icon { background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; width: 46px; height: 46px; border-radius: 50%; transition: all .2s; display: flex; align-items: center; justify-content: center; position: relative; }
    .btn-icon:hover, .btn-icon.active { background: var(--accent-soft); transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
    .btn-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

    /* Equalizer / popovers */
    .popover-panel {
      position: absolute; bottom: 64px; right: 0; background: var(--glass); border: 1px solid var(--line);
      border-radius: 24px; padding: 18px; display: none; flex-direction: column; gap: 14px;
      box-shadow: 0 20px 50px rgba(0,0,0,0.4); min-width: 240px; backdrop-filter: blur(30px);
      -webkit-backdrop-filter: blur(30px); transform-origin: bottom right; animation: scaleIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    @keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
    .popover-panel.show { display: flex; }
    .popover-panel h5 { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--text); }
    .popover-panel p { margin: 0; font-size: 0.75rem; color: var(--muted); }

    .studio-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .studio-label strong { font-size: 0.9rem; }
    .studio-label p { margin: 2px 0 0; font-size: 0.7rem; color: var(--muted); max-width: 150px; }
    .switch { width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); position: relative; cursor: pointer; flex: 0 0 auto; transition: .2s; padding: 0; }
    .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: .2s; }
    .switch.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
    .switch.active::after { transform: translateX(20px); background: #fff; }
    #eqControls { display: flex; flex-direction: column; gap: 14px; }
    #eqControls.eq-disabled { opacity: 0.4; pointer-events: none; }
    .eq-slider-group { display: flex; flex-direction: column; gap: 6px; }
    .eq-slider-group label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); font-weight: 600; }

    .popover-panel button.list-item {
      background: transparent; border: 0; color: var(--text); padding: 10px 14px; cursor: pointer;
      border-radius: 12px; text-align: left; font-weight: 600; font-family: inherit; transition: background 0.2s; width: 100%;
    }
    .popover-panel button.list-item:hover { background: var(--surface-2); }

    .timer-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 2px 6px; border-radius: 10px; display: none; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
    /* Custom Stream Modal */
    .custom-stream-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); display: none; place-items: center; z-index: 1000; padding: 20px; }
    .custom-stream-modal.show { display: grid; }
    .custom-stream-card { background: var(--bg); border: 1px solid var(--line); padding: 28px; border-radius: 32px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
    .custom-stream-card h3 { margin: 0; font-size: 1.4rem; font-weight: 800; }
    .form-group { display: flex; flex-direction: column; gap: 8px; }
    .form-group label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
    .form-group input { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 14px; outline: none; font-family: inherit; font-size: 0.95rem; }
    .modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
    .modal-actions button { padding: 14px; border-radius: 16px; border: 0; font-weight: 700; font-family: inherit; cursor: pointer; transition: 0.2s; }
    .modal-actions .btn-save { background: var(--accent); color: #fff; }
    .modal-actions .btn-save:hover { opacity: 0.9; }
    .modal-actions .btn-cancel { background: var(--surface-2); color: var(--text); }
    .modal-actions .btn-cancel:hover { background: rgba(255,255,255,0.12); }
    /* ============ POLISH: entrance, shine, focus ============ */
    ::selection { background: var(--accent-soft); }
    :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
    .grid .station-card { animation: cardIn .45s cubic-bezier(.2,.8,.2,1) backwards; }
    @keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
    .station-card::after {
      content: ""; position: absolute; top: 0; left: -90%; width: 55%; height: 100%;
      background: linear-gradient(100deg, transparent, rgba(255,255,255,.09), transparent);
      transform: skewX(-18deg); transition: left .6s ease; pointer-events: none;
    }
    .station-card:hover::after { left: 130%; }
    .brand-logo { animation: brandIn .8s cubic-bezier(.2,.8,.2,1) backwards; }
    @keyframes brandIn { from { opacity: 0; transform: translateY(-12px); } }
    .track-info { cursor: pointer; border-radius: 20px; transition: background .2s; }
    .track-info:hover { background: var(--surface); }

    /* ============ FULLSCREEN NOW PLAYING ============ */
    .np-view {
      position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px;
      background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(26px) saturate(140%);
      -webkit-backdrop-filter: blur(26px) saturate(140%);
      opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s;
    }
    .np-view.show { opacity: 1; visibility: visible; }
    .np-bg { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(90px) saturate(160%); opacity: .3; pointer-events: none; transition: background-image .5s; }
    .np-view .pop-card { transform: translateY(36px) scale(.95); transition: transform .45s cubic-bezier(.34,1.56,.64,1); touch-action: pan-y; }
    .np-view.show .pop-card { transform: none; }
    .np-close {
      position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; width: 48px; height: 48px;
      border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text);
      cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      transition: .2s; z-index: 2;
    }
    .np-close:hover { background: var(--accent-soft); border-color: var(--accent); transform: scale(1.06); }
    .np-close svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
    .np-extra { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
    .np-extra input[type=range] { flex: 1; }
    .np-fav svg { width: 20px; height: 20px; }
    .np-fav.is-fav { color: var(--danger); border-color: var(--danger); }
    .np-fav.is-fav svg { fill: var(--danger) !important; stroke: var(--danger) !important; }

    /* ============ LUISTERSTATISTIEKEN ============ */
    .stats-total { margin: 0; color: var(--muted); font-size: 0.95rem; font-weight: 600; }
    .stats-list { display: flex; flex-direction: column; gap: 14px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
    .stats-row { display: flex; align-items: center; gap: 12px; }
    .stats-row img { width: 42px; height: 42px; border-radius: 12px; background: #fff; object-fit: contain; padding: 3px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
    .stats-bar-wrap { flex: 1; min-width: 0; }
    .stats-bar-wrap h4 { margin: 0 0 5px; font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stats-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
    .stats-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; animation: statGrow .8s cubic-bezier(.2,.8,.2,1) backwards; }
    @keyframes statGrow { from { transform: scaleX(0); } }
    .stats-time { font-size: 0.8rem; color: var(--muted); font-weight: 600; white-space: nowrap; flex-shrink: 0; }

    /* Layout adaptations */
    @media(max-width: 850px) {
      .player-bar { bottom: 14px; width: calc(100% - 24px); padding: 14px 16px 18px; border-radius: 30px; touch-action: pan-y; }
      .player-grip { display: block; width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; opacity: .7; }

      /* Schone, verticale opbouw: zender -> afspeelknoppen -> acties */
      .player-wrapper { display: flex; flex-direction: column; gap: 16px; }
      .track-info { gap: 14px; }
      .track-info img { width: 52px; height: 52px; border-radius: 15px; }
      .track-text { flex: 1; }
      .track-text h4 { margin: 0 0 3px; font-size: 1.05rem; max-width: 62vw; }
      .track-title { max-width: 62vw; }
      .status-line { gap: 8px; flex-wrap: nowrap; }
      /* Visualizer op mobiel weglaten voor rust */
      .visualizer, .visualizer-canvas { display: none !important; }

      .volume-wrapper { display: none; }
      .controls-core { order: 2; width: 100%; justify-content: center; gap: 34px; }
      .btn-skip { width: 52px; height: 52px; }
      .btn-skip svg { width: 24px; height: 24px; }
      .btn-play { width: 68px; height: 68px; }

      .actions { order: 3; width: 100%; justify-content: space-around; gap: 6px; }
      .btn-icon[title="Deel zender"] { display: flex; }
      .btn-icon { width: 50px; height: 50px; }

      /* Pop-overs (EQ / timer) netjes binnen het scherm */
      .popover-panel { position: fixed; left: 16px; right: 16px; bottom: 220px; min-width: 0; }
    }
    @media(max-width: 500px) {
      body { padding-bottom: calc(180px + env(safe-area-inset-bottom)); }
      .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
      .station-card { padding: 16px 12px; border-radius: 20px; }
      .station-card img { width: 80px; height: 80px; border-radius: 18px; margin-bottom: 12px; }
      .topline h2 { font-size: 1.05rem; }
    }
    /* Reduced motion */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.05ms !important; scroll-behavior: auto !important; }
      .live-pill, .pop-orb { animation: none !important; }
      .bar, .card-now i, .pop-wave span { animation: none !important; transform: scaleY(.7); }
      .track-title.marquee span { animation: none !important; }
    }
    /* ============ MINI-PLAYER VIEW (?view=player) ============ */
    body.player-mode { padding: 0; overflow: hidden; }
    body.player-mode > header, body.player-mode > main.container, body.player-mode > .player-bar, body.player-mode > .toast-container { display: none !important; }

    .pop-view { position: fixed; inset: 0; width: 100vw; min-height: 100dvh; display: none; place-items: center; padding: clamp(12px, 3vw, 20px); overflow: auto; z-index: 200; }
    body.player-mode .pop-view { display: grid; }

    .pop-orb { position: fixed; top: -70px; left: -70px; width: 300px; height: 300px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2), var(--danger)); filter: blur(60px); opacity: 0.25; animation: float 8s ease-in-out infinite; pointer-events: none; }
    .pop-orb-2 { top: auto; left: auto; right: -70px; bottom: -70px; width: 240px; height: 240px; opacity: 0.16; animation-delay: -4s; animation-duration: 11s; }
    @keyframes float { 50% { transform: translateY(30px) scale(1.1) rotate(20deg); } }
    .pop-bg { position: fixed; inset: -60px; background-size: cover; background-position: center; filter: blur(75px) saturate(150%); opacity: 0.28; pointer-events: none; }
    .pop-vol-row { display: flex; align-items: center; gap: 12px; margin-top: 26px; color: var(--muted); padding: 0 8px; }
    .pop-vol-row svg { width: 22px; height: 22px; flex-shrink: 0; }
    .pop-vol-row .pop-vol { flex: 1; width: auto; margin-top: 0; }

    .pop-card { width: min(360px, 100%); max-height: calc(100dvh - 24px); margin: auto; padding: 30px 24px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 36px; text-align: center; background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); position: relative; scrollbar-width: none; }
    .pop-card::-webkit-scrollbar { display: none; }
    .pop-close { position: absolute; z-index: 4; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2); color: var(--text); display: grid; place-items: center; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: transform .2s ease, background .2s ease; }
    .pop-close:hover { transform: scale(1.06); background: var(--accent-soft); }

    .pop-disc { position: relative; margin: auto; width: 180px; height: 180px; display: grid; place-items: center; }
    .pop-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--danger), var(--accent)); animation: spin 4s linear infinite; filter: drop-shadow(0 0 25px var(--accent-soft)); }
    .pop-ring.paused { animation-play-state: paused; }
    .pop-ring:after { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg); }
    .pop-logo { position: relative; width: 140px; height: 140px; border-radius: 50%; object-fit: contain; background: #fff; padding: 12px; z-index: 1; animation: spin 20s linear infinite; }
    .pop-logo.paused { animation-play-state: paused; }

    .pop-card h1 { font-size: 1.4rem; font-weight: 800; margin: 24px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pop-track { color: var(--accent); font-size: 0.9rem; font-weight: 600; line-height: 1.35; margin: 0 0 10px; min-height: 2.4em; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
    .pop-live { color: var(--danger); font-weight: 800; font-size: 0.8rem; margin-bottom: 20px; letter-spacing: 0.08em; display: flex; align-items: center; justify-content: center; gap: 6px; }

    .pop-wave { height: 50px; display: flex; align-items: center; justify-content: center; gap: 5px; margin: 10px 0 24px; }
    .pop-wave span { width: 6px; border-radius: 999px; background: linear-gradient(to top, var(--accent), var(--text)); animation: wave .65s infinite alternate ease-in-out; }
    .pop-wave.paused span { animation-play-state: paused; opacity: 0.3; }
    .pop-wave span:nth-child(1){height:20px; animation-delay:.05s}
    .pop-wave span:nth-child(2){height:38px; animation-delay:.2s}
    .pop-wave span:nth-child(3){height:50px; animation-delay:.1s}
    .pop-wave span:nth-child(4){height:32px; animation-delay:.3s}
    .pop-wave span:nth-child(5){height:44px; animation-delay:.16s}
    .pop-wave span:nth-child(6){height:26px; animation-delay:.38s}
    @keyframes wave { from { transform: scaleY(.2); } to { transform: scaleY(1); } }

    .pop-controls { display: flex; justify-content: center; align-items: center; gap: 20px; }
    .pop-round { width: 70px; height: 70px; border-radius: 50%; border: 0; background: var(--play-bg); color: var(--play-fg); display: grid; place-items: center; cursor: pointer; box-shadow: 0 15px 35px rgba(0,0,0,.2); transition: transform .2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
    .pop-round:hover { transform: scale(1.08); }
    .pop-round.pop-secondary { width: 54px; height: 54px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); box-shadow: none; position: relative; }
    .pop-round svg { width: 30px; height: 30px; fill: currentColor; stroke: currentColor; }
    .pop-secondary svg { width: 22px; height: 22px; fill: none; }
    .pop-badge { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border-radius: 99px; padding: 2px 7px; font-size: 0.7rem; font-weight: 800; display: none; }

    .pop-vol { width: 85%; margin-top: 26px; }

    .pop-timer { display: none; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
    .pop-timer.show { display: grid; }
    .pop-timer button { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--text); padding: 12px 10px; font-weight: 700; font-family: inherit; cursor: pointer; transition: background 0.2s; }
    .pop-timer button:hover { background: var(--surface); }
    .pop-timer button.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }

    @media (max-width: 430px), (max-height: 700px) {
      .pop-view { align-items: center; padding: 10px; }
      .pop-card { width: min(350px, 100%); padding: 22px 18px 20px; border-radius: 30px; }
      .pop-close { top: 10px; right: 10px; width: 34px; height: 34px; }
      .pop-disc { width: 150px; height: 150px; }
      .pop-logo { width: 116px; height: 116px; padding: 10px; }
      .pop-card h1 { margin-top: 17px; font-size: 1.25rem; }
      .pop-live { margin-bottom: 10px; }
      .pop-wave { height: 34px; margin: 4px 0 16px; }
      .pop-wave span:nth-child(1){height:15px}.pop-wave span:nth-child(2){height:28px}.pop-wave span:nth-child(3){height:34px}.pop-wave span:nth-child(4){height:24px}.pop-wave span:nth-child(5){height:31px}.pop-wave span:nth-child(6){height:20px}
      .pop-round { width: 62px; height: 62px; }
      .pop-round.pop-secondary { width: 50px; height: 50px; }
      .pop-vol-row { margin-top: 18px; }
    }

/* ==========================================================
   Audio-Streaming.nl 5.3 — professional app shell additions
   ========================================================== */
:root {
  --nav-height: 76px;
  --focus-ring: 0 0 0 4px var(--accent-soft);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[hidden] { display: none !important; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
input, textarea, .message, .install-card p, .site-footer { user-select: text; }

.skip-link {
  position: fixed; top: 10px; left: 12px; z-index: 1000; padding: 10px 14px;
  border-radius: 12px; background: var(--play-bg); color: var(--play-fg); font-weight: 800;
  transform: translateY(-160%); transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: none; box-shadow: var(--focus-ring); border-color: var(--accent) !important;
}

.app-header {
  max-width: 1500px; margin: 0 auto; padding-top: calc(46px + env(safe-area-inset-top));
}
.app-header::before {
  content: ""; position: absolute; left: 50%; top: -250px; width: min(900px, 95vw); height: 520px;
  transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  pointer-events: none; z-index: -1;
}
.brand-logo { width: min(390px, 76vw); }
.sub { max-width: 690px; font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.65; }

.hero-badges {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin: -12px auto 26px; color: var(--muted); font-size: .82rem; font-weight: 750;
}
.hero-badges > span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); backdrop-filter: blur(18px);
}
.status-dot, .network-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 12px rgba(52,211,153,.75); flex: 0 0 auto;
}

.install-top-btn {
  height: 46px; display: inline-flex; align-items: center; gap: 9px; padding: 0 16px;
  border: 1px solid rgba(56,189,248,.35); border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, rgba(56,189,248,.95), rgba(124,58,237,.95));
  box-shadow: 0 10px 28px rgba(56,189,248,.2); cursor: pointer; font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.install-top-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(56,189,248,.3); }
.install-top-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.install-top-btn.is-installed { display: none; }

.search-wrapper { max-width: 760px; }
.search-wrapper input { min-height: 64px; background: color-mix(in srgb, var(--surface-2) 68%, transparent); }
.filters { max-width: 1360px; }
.filter-btn { min-height: 42px; }

.container { max-width: 1360px; }
.station-card { isolation: isolate; }
.station-card:hover { box-shadow: 0 22px 50px rgba(0,0,0,.18), 0 0 0 1px var(--accent-soft); }
.station-card:active { transform: translateY(-2px) scale(.985); }

.site-footer {
  max-width: 1360px; margin: 44px auto 10px; padding: 24px 20px 34px; display: flex;
  align-items: center; justify-content: center; border-top: 1px solid var(--line); color: var(--muted);
}
.site-footer p { margin: 0; font-size: .8rem; font-weight: 650; letter-spacing: .01em; }

.network-banner {
  position: fixed; z-index: 500; top: calc(8px + env(safe-area-inset-top)); left: 50%;
  display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 24px); padding: 9px 14px;
  border: 1px solid rgba(251,113,133,.28); border-radius: 999px; background: rgba(25,10,16,.92);
  color: #fecdd3; font-size: .82rem; font-weight: 750; box-shadow: 0 12px 36px rgba(0,0,0,.25);
  backdrop-filter: blur(18px); transform: translate(-50%, -160%); transition: transform .3s ease;
}
.network-banner.show { transform: translate(-50%, 0); }
.network-banner .network-dot { background: var(--danger); box-shadow: 0 0 12px rgba(251,113,133,.65); }

.mobile-nav { display: none; }

.install-modal { z-index: 320; }
.install-card { text-align: center; position: relative; max-width: 470px; }
.install-card h3 { margin-bottom: 8px; }
.install-card > p { color: var(--muted); margin: 0 auto 18px; max-width: 370px; line-height: 1.55; }
.install-app-icon { display: block; margin: 0 auto 14px; border-radius: 24px; box-shadow: 0 16px 44px rgba(0,0,0,.28); }
.modal-close-x {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); cursor: pointer; font-size: 1.4rem;
}
.install-steps { display: grid; gap: 10px; text-align: left; margin: 18px 0 4px; }
.install-step {
  display: grid; grid-template-columns: 34px 1fr; gap: 11px; align-items: start; padding: 12px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.install-step b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.install-step strong { display: block; font-size: .92rem; margin: 1px 0 3px; }
.install-step span { display: block; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.install-actions { margin-top: 18px; }

body.standalone .install-top-btn,
body.standalone .mobile-nav-btn[data-nav="install"] { display: none; }
body.player-mode .mobile-nav, body.player-mode .site-footer, body.player-mode .network-banner { display: none !important; }

@media (max-width: 980px) {
  .top-controls { position: static; justify-content: center; margin: 0 auto 24px; flex-wrap: wrap; }
  .app-header { padding-top: calc(24px + env(safe-area-inset-top)); }
  .site-footer { flex-direction: column; text-align: center; }
}

@media (max-width: 850px) {
  body { padding-bottom: calc(170px + var(--nav-height) + env(safe-area-inset-bottom)); }
  .mobile-nav {
    position: fixed; z-index: 180; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom));
    height: var(--nav-height); display: grid; grid-template-columns: repeat(3, 1fr); align-items: center;
    padding: 7px; border: 1px solid var(--line); border-radius: 24px; background: var(--glass);
    box-shadow: 0 18px 48px rgba(0,0,0,.4); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  }
  .mobile-nav-btn {
    height: 60px; border: 0; border-radius: 17px; background: transparent; color: var(--muted);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
    font-size: .68rem; font-weight: 800; transition: .2s ease;
  }
  .mobile-nav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav-btn.active { color: var(--text); background: var(--accent-soft); }
  .mobile-nav-btn.active svg { color: var(--accent); }

  .player-bar {
    bottom: calc(var(--nav-height) + 18px + env(safe-area-inset-bottom)); width: calc(100% - 20px);
    padding: 10px 12px; border-radius: 24px;
  }
  .player-grip, .player-bar .actions, .player-bar .volume-wrapper, .player-bar .btn-skip { display: none !important; }
  .player-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
  .track-info { min-width: 0; gap: 11px; cursor: pointer; }
  .track-info img { width: 52px; height: 52px; border-radius: 15px; }
  .track-text h4, .track-title { max-width: calc(100vw - 145px); }
  .status-line { font-size: .75rem; }
  .controls-core { width: auto; gap: 0; }
  .btn-play { width: 52px; height: 52px; }
  .btn-play svg { width: 23px; height: 23px; }
}

@media (max-width: 640px) {
  .top-controls { width: 100%; gap: 8px; }
  .lang-switch { order: 2; width: 100%; justify-content: center; border: 0; background: transparent; padding: 0; }
  .install-top-btn { height: 44px; padding: 0 13px; }
  .install-top-btn span { display: none; }
  .theme-toggle { width: 44px; height: 44px; }
  .brand-logo { width: min(330px, 84vw); }
  .hero-badges { margin-bottom: 20px; }
  .hero-badges > span:nth-child(2) { display: none; }
  .filters { padding-left: 16px; padding-right: 16px; }
  .container { padding: 0 14px; }
  .site-footer { padding-bottom: 18px; }
}

@media (max-width: 500px) {
  body { padding-bottom: calc(162px + var(--nav-height) + env(safe-area-inset-bottom)); }
  .app-header { padding-left: 14px; padding-right: 14px; }
  .sub { margin-bottom: 20px; }
  .search-wrapper input { min-height: 58px; padding-top: 16px; padding-bottom: 16px; }
  .grid { gap: 10px; }
  .station-card { min-height: 178px; }
  .station-card h3 { font-size: .9rem; }
  .station-card p { font-size: .72rem; }
  .install-card { padding: 26px 18px 20px; }
}
@media (max-width: 850px) {
  body.standalone .mobile-nav { grid-template-columns: repeat(3, 1fr); }
}
