  :root {
    --violet-900: #12002b;
    --violet-800: #1e0442;
    --violet-700: #2d0a5e;
    --violet-600: #4c1d95;
    --violet-500: #7c3aed;
    --violet-400: #a855f7;
    --magenta: #e879f9;
    --pink: #f472b6;
    --text: #f6f3ff;
    --muted: #c7b8ee;
    --glass: rgba(255, 255, 255, 0.07);
    --glass-strong: rgba(255, 255, 255, 0.12);
    --border: rgba(255, 255, 255, 0.14);
    --radius: 22px;
    --player-h: 96px;
    --shadow: 0 18px 45px rgba(10, 0, 30, 0.55);
  }

  * { box-sizing: border-box; }

  html, body { margin: 0; padding: 0; }

  body {
    min-height: 100vh;
    font-family: "Sora", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--violet-900);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  /* animated purple gradient backdrop */
  .bg {
    position: fixed;
    inset: -25%;
    z-index: -2;
    background:
      radial-gradient(42% 42% at 18% 14%, rgba(168, 85, 247, 0.85) 0%, transparent 60%),
      radial-gradient(40% 40% at 84% 18%, rgba(232, 121, 249, 0.7) 0%, transparent 58%),
      radial-gradient(48% 48% at 65% 92%, rgba(124, 58, 237, 0.8) 0%, transparent 62%),
      radial-gradient(38% 38% at 12% 84%, rgba(76, 29, 149, 0.9) 0%, transparent 60%),
      linear-gradient(155deg, #12002b 0%, #2a0845 45%, #3b0764 100%);
    filter: saturate(1.15);
    animation: drift 22s ease-in-out infinite alternate;
  }
  .bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
    opacity: 0.5;
  }
  @keyframes drift {
    0%   { transform: translate3d(-2%, -1%, 0) scale(1.05); }
    50%  { transform: translate3d(2%, 1.5%, 0) scale(1.12); }
    100% { transform: translate3d(-1%, 2%, 0) scale(1.06); }
  }

  .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 18px calc(var(--player-h) + 40px);
  }

  /* header */
  header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
  }
  .logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--violet-400), var(--magenta));
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.5);
    flex: none;
  }
  .logo svg { width: 26px; height: 26px; }
  .brand h1 {
    margin: 0;
    font-size: clamp(1.35rem, 3.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    background: linear-gradient(92deg, #fff 10%, var(--magenta) 60%, var(--violet-400) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .brand p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
  }

  /* search */
  .search {
    position: relative;
    margin-bottom: 26px;
  }
  .search svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 19px;
    height: 19px;
    opacity: 0.6;
    pointer-events: none;
  }
  .search input {
    width: 100%;
    padding: 15px 18px 15px 50px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 500;
    outline: none;
    backdrop-filter: blur(14px);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  }
  .search input::placeholder { color: rgba(199, 184, 238, 0.7); }
  .search input:focus {
    border-color: rgba(232, 121, 249, 0.75);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.22);
    background: var(--glass-strong);
  }

  /* groups */
  .group { margin-bottom: 30px; }
  .group[hidden] { display: none; }
  .group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
  }
  .group-head h2 {
    margin: 0;
    font-size: clamp(1rem, 2.6vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
  .group-line {
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(232, 121, 249, 0.55), rgba(232, 121, 249, 0));
  }
  .group-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 999px;
  }

  .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }

  /* station card */
  .card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass);
    color: var(--text);
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    backdrop-filter: blur(16px);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  }
  .card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(168, 85, 247, 0.22), rgba(232, 121, 249, 0.06));
    opacity: 0;
    transition: opacity 0.25s;
  }
  .card:hover, .card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(232, 121, 249, 0.5);
    box-shadow: 0 14px 34px rgba(88, 28, 135, 0.45);
    outline: none;
  }
  .card:hover::before, .card:focus-visible::before { opacity: 1; }

  .card.playing {
    border-color: transparent;
    background:
      linear-gradient(var(--violet-800), var(--violet-800)) padding-box,
      linear-gradient(120deg, var(--violet-400), var(--magenta), var(--pink)) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 16px 40px rgba(168, 85, 247, 0.4);
  }
  .card.playing::before { opacity: 1; }

  .card-icon {
    position: relative;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, rgba(168, 85, 247, 0.85), rgba(232, 121, 249, 0.65));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }
  .card-icon svg { width: 18px; height: 18px; fill: #fff; }
  .card-icon .play-ic { display: block; }
  .card.playing.pulse .card-icon .play-ic { display: none; }

  .eq {
    display: none;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 16px;
  }
  .card.playing.pulse .eq { display: flex; }
  .eq span {
    width: 3px;
    border-radius: 2px;
    background: #fff;
    animation: bounce 0.9s ease-in-out infinite;
  }
  .eq span:nth-child(1) { height: 60%; animation-delay: -0.5s; }
  .eq span:nth-child(2) { height: 100%; animation-delay: -0.15s; }
  .eq span:nth-child(3) { height: 45%; animation-delay: -0.7s; }
  .eq span:nth-child(4) { height: 80%; animation-delay: -0.3s; }
  @keyframes bounce {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
  }

  .card-text { min-width: 0; flex: 1; position: relative; }
  .card-name {
    display: block;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card-sub {
    display: block;
    margin-top: 3px;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--muted);
  }
  .card-sub.live { color: var(--magenta); }

  .card-badge {
    position: relative;
    flex: none;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 9px;
  }
  .card.playing .card-badge {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, var(--violet-500), var(--pink));
  }

  /* player bar */
  .player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 0 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(18, 0, 43, 0.4), rgba(18, 0, 43, 0.92));
    backdrop-filter: blur(22px);
    border-top: 1px solid var(--border);
  }
  .player-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 4px;
  }

  .np {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    flex: 1;
  }
  .cover {
    position: relative;
    width: 58px;
    height: 58px;
    flex: none;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(140deg, var(--violet-500), var(--magenta));
    display: grid;
    place-items: center;
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.5);
  }
  .cover img { width: 100%; height: 100%; object-fit: cover; display: none; }
  .cover.has-img img { display: block; }
  .cover.has-img .cover-fallback { display: none; }
  .cover-fallback svg { width: 24px; height: 24px; opacity: 0.9; }

  .np-text { min-width: 0; }
  .np-station {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--magenta);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
  }
  .np-track {
    margin-top: 2px;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 56vw;
  }
  .np-track.idle { color: var(--muted); font-weight: 500; }

  .controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
  }
  .ctrl {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--glass-strong);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s, background 0.2s;
  }
  .ctrl:hover { background: rgba(255, 255, 255, 0.2); }
  .ctrl:active { transform: scale(0.92); }
  .ctrl svg { width: 18px; height: 18px; fill: currentColor; }
  .ctrl.play {
    width: 52px;
    height: 52px;
    background: linear-gradient(140deg, var(--violet-400), var(--magenta));
    border: none;
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.55);
    color: #fff;
  }
  .ctrl.play svg { width: 22px; height: 22px; }
  .ctrl:disabled { opacity: 0.4; cursor: default; }

  /* volume */
  .volume {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    width: 168px;
  }
  .vol-btn {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s;
  }
  .vol-btn:hover { background: var(--glass-strong); }
  .vol-btn svg { width: 18px; height: 18px; fill: currentColor; }

  .slider {
    position: relative;
    flex: 1;
    height: 30px;
    display: flex;
    align-items: center;
    touch-action: none;
    cursor: pointer;
  }
  .slider-track {
    position: relative;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
  }
  .slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--violet-400), var(--magenta));
    box-shadow: 0 0 12px rgba(232, 121, 249, 0.6);
  }
  .slider-thumb {
    position: absolute;
    top: 50%;
    left: 80%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(232, 121, 249, 0.35), 0 3px 10px rgba(0, 0, 0, 0.4);
    pointer-events: none;
  }
  .slider:focus-visible { outline: none; }
  .slider:focus-visible .slider-thumb { box-shadow: 0 0 0 5px rgba(232, 121, 249, 0.6); }

  .empty {
    text-align: center;
    color: var(--muted);
    padding: 48px 0;
    font-weight: 500;
  }
  .empty[hidden] { display: none; }

  /* responsive */
  @media (min-width: 620px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .wrap { padding-left: 26px; padding-right: 26px; }
  }
  @media (min-width: 940px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .card-badge { display: block; }
  }
  @media (min-width: 1200px) {
    .grid { grid-template-columns: repeat(4, 1fr); }
    .group { margin-bottom: 36px; }
  }

  @media (max-width: 720px) {
    :root { --player-h: 150px; }
    .player-inner { flex-wrap: wrap; gap: 10px; }
    .np { flex-basis: 100%; order: 1; }
    .np-track { max-width: 76vw; }
    .np-station { max-width: 76vw; }
    .controls { order: 2; }
    .volume { order: 3; flex: 1; width: auto; min-width: 150px; }
    .card-badge { display: none; }
  }
  @media (max-width: 720px) and (orientation: landscape) {
    :root { --player-h: 96px; }
    .np { flex-basis: auto; order: 1; }
    .volume { flex: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .bg { animation: none; }
    .eq span { animation: none; }
    .card { transition: none; }
  }

  /* ============================================================
     Shared site navigation (added for the multi-page website)
     Original player styles above are left untouched.
     ============================================================ */
  header.site-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
  }
  header.site-header .brand { flex: 1; min-width: 0; }

  .site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
  }
  .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    backdrop-filter: blur(14px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
  .nav-link svg { width: 16px; height: 16px; fill: currentColor; }
  .nav-link:hover, .nav-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(232, 121, 249, 0.55);
    background: var(--glass-strong);
    outline: none;
  }
  .nav-link.cta {
    border: none;
    color: #fff;
    background: linear-gradient(140deg, var(--violet-400), var(--magenta));
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.5);
  }
  .nav-link.cta:hover { box-shadow: 0 14px 32px rgba(168, 85, 247, 0.65); }
  button.nav-link { -webkit-appearance: none; appearance: none; }
  .nav-link[hidden] { display: none; }
  .nav-link.install { color: var(--magenta); }

  /* ============================================================
     Inner pages (download / 404)
     ============================================================ */
  .wrap.page { padding-bottom: 60px; }

  .hero {
    position: relative;
    text-align: center;
    padding: 34px 22px 40px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--glass);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(130deg, rgba(168, 85, 247, 0.22), rgba(232, 121, 249, 0.05) 60%);
    pointer-events: none;
  }
  .hero > * { position: relative; }

  .hero-icon {
    width: 104px;
    height: 104px;
    margin: 0 auto 20px;
    border-radius: 28px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--violet-400), var(--magenta));
    box-shadow: 0 18px 44px rgba(168, 85, 247, 0.55);
  }
  .hero-icon svg { width: 52px; height: 52px; fill: #fff; }

  .hero h2 {
    margin: 0;
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.08;
    background: linear-gradient(92deg, #fff 10%, var(--magenta) 60%, var(--violet-400) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .hero p.lead {
    margin: 14px auto 0;
    max-width: 620px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
  }

  .download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
    padding: 17px 34px;
    border-radius: 18px;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(140deg, var(--violet-400), var(--magenta));
    box-shadow: 0 16px 40px rgba(168, 85, 247, 0.55);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .download-btn svg { width: 22px; height: 22px; fill: currentColor; }
  .download-btn:hover, .download-btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 22px 52px rgba(232, 121, 249, 0.62);
    outline: none;
  }
  .download-btn:active { transform: translateY(-1px) scale(0.99); }

  .file-meta {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
  }
  .file-meta a {
    color: var(--magenta);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .file-meta a:hover, .file-meta a:focus-visible { color: #fff; outline: none; }

  .feature-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    text-align: left;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--glass);
    backdrop-filter: blur(16px);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  }
  .feature:hover {
    transform: translateY(-3px);
    border-color: rgba(232, 121, 249, 0.5);
    box-shadow: 0 14px 34px rgba(88, 28, 135, 0.45);
  }
  .feature-icon {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, rgba(168, 85, 247, 0.85), rgba(232, 121, 249, 0.65));
  }
  .feature-icon svg { width: 20px; height: 20px; fill: #fff; }
  .feature h3 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
  }
  .feature p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
    font-weight: 500;
  }

  .note {
    margin-top: 22px;
    padding: 15px 18px;
    border: 1px dashed var(--border);
    border-radius: 16px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
    font-weight: 500;
  }
  .note strong { color: var(--text); }

  /* 404 */
  .notfound-code {
    font-size: clamp(4rem, 18vw, 8rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(120deg, var(--violet-400), var(--magenta), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 20px 60px rgba(168, 85, 247, 0.35);
  }

  .site-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
  }
  .site-footer a { color: var(--magenta); text-decoration: none; }
  .site-footer a:hover { text-decoration: underline; }

  @media (min-width: 620px) {
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 560px) {
    .nav-link .nav-label { display: none; }
    .nav-link { padding: 10px 13px; }
    .hero { padding: 28px 16px 34px; border-radius: 22px; }
  }
