  @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Syne+Mono&family=Syne:wght@400;700;800&display=swap');

  /* ── TOKENS ─────────────────────────────────────────── */
  :root {
    --bg: #080810;
    --surface: #0f0f1a;
    --surface2: #13131f;
    --border: #1c1c2e;
    --accent: #ff3c6e;
    --accent2: #ff9d00;
    --accent3: #ffe600;
    --accentrm1-1: #1c3462; /*RM1*/
    --accentrm1-2: #2D55A1;
    --accentrm1-3: #FFFFFF;
    --accentrm2-1: #891658;/*RM2*/
    --accentrm2-2: #891658;
    --accentrm2-3: #febe20;
    --accentrm3-1: #c22247;/*RM3*/
    --accentrm3-2: #c22247;
    --accentrm3-3: #febe20;
    --accentam1-1: #e2001a;/*AM1*/
    --accentam1-2: #c22247;
    --accentam1-3: #fcc400;
    --accentam2-1: #cc1e25;/*AM2*/
    --accentam2-2: #c22247;
    --accentam2-3: #1e4185;
    --accentrodfm-1: #febe20;;/*AM2*/
    --accentrodfm-2: #c22247;
    --accentrodfm-3: #1e4185;
    --text: #f0f0f8;
    --muted: #4a4a6a;

    /* Spacing scale */
    --px: clamp(0.75rem, 4vw, 1.4rem);   /* horizontal padding */
    --py-sm: clamp(0.5rem, 2vw, 0.85rem);
    --py-md: clamp(0.75rem, 2.5vw, 1.1rem);

    /* Typography scale */
    --fs-logo: clamp(1.7rem, 8vw, 2.8rem);
    --fs-logo-sub: clamp(0.85rem, 4vw, 1.4rem);
    --fs-tagline: clamp(0.48rem, 1.5vw, 0.6rem);
    --fs-title: clamp(0.82rem, 2.5vw, 1rem);
    --fs-sub: clamp(0.6rem, 1.8vw, 0.72rem);
    --fs-mono: clamp(0.55rem, 1.6vw, 0.68rem);
    --fs-badge: clamp(0.52rem, 1.5vw, 0.62rem);
    --fs-tick: clamp(0.44rem, 1.3vw, 0.52rem);

    /* VU meter */
    --vu-h: clamp(14px, 3.5vw, 22px);
    --vu-gap: clamp(0.4rem, 1.5vw, 0.6rem);

    /* Controls */
    --btn-pad-y: clamp(0.45rem, 2vw, 0.55rem);
    --btn-pad-x: clamp(0.6rem, 3vw, 1.1rem);
    --play-pad-x: clamp(0.9rem, 4vw, 1.4rem);
    --vol-w: clamp(52px, 14vw, 90px);
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  html { -webkit-text-size-adjust: 100%; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 4vw, 2rem);
    overflow-x: hidden;
  }

  body::before {
    content: '';
    position: fixed; inset: 0;
    background:
      radial-gradient(ellipse 55% 45% at 15% 85%, rgba(255,60,110,0.07) 0%, transparent 60%),
      radial-gradient(ellipse 45% 40% at 85% 15%, rgba(255,157,0,0.06) 0%, transparent 60%);
    pointer-events: none;
  }

  /* ── SHELL ───────────────────────────────────────────── */
  .player-shell {
    width: 100%;
    max-width: 700px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: clamp(4px, 1.5vw, 8px);
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  }

  /* ── LOGO HEADER ─────────────────────────────────────── */
  .logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--py-md) var(--px);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    position: relative;
    gap: 0.5rem;
  }

  .logo-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--accent2), var(--accent3));
  }

  .logo-lockup {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    padding-left: 0.6rem;
    flex-shrink: 0;
  }

  /*RM1 LOGO*/
  .logo-rm1 {   
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo);
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--accentrm1-1) 0%, var(--accentrm1-2) 60%, var(--accentrm1-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,60,110,0.3));
  }
/*RM2 LOGO */
   .logo-rm2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo);
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--accentrm2-1) 0%, var(--accentrm2-2) 60%, var(--accentrm2-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,60,110,0.3));
  }

  /*RM3 LOGO */
   .logo-rm3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo);
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--accentrm3-1) 0%, var(--accentrm3-2) 60%, var(--accentrm3-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,60,110,0.3));
  }


  /*AM1 LOGO */
   .logo-am1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo);
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--accentam1-1) 0%, var(--accentam1-2) 60%, var(--accentam1-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,60,110,0.3));
  }
  /*AM2 LOGO */
   .logo-am2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo);
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--accentam2-1) 0%, var(--accentam2-2) 60%, var(--accentam2-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,60,110,0.3));
  }

  /*ROD FM LOGO */
   .logo-rodfm {
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo);
    letter-spacing: 0.05em;
    line-height: 1;
    background: linear-gradient(135deg, var(--accentrodfm-1) 0%, var(--accentrodfm-2) 60%, var(--accentrodfm-3) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,60,110,0.3));
  }

  .logo-fm {
    font-family: 'Bebas Neue', sans-serif;
    font-size: var(--fs-logo-sub);
    letter-spacing: 0.1em;
    color: var(--text);
    opacity: 0.65;
    line-height: 1;
    padding-bottom: 0.1rem;
  }

  .logo-tagline {
    font-family: 'Syne Mono', monospace;
    font-size: var(--fs-tagline);
    letter-spacing: 0.15em;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 0.1rem;
    padding-left: 0.6rem;
  }

  .live-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,60,110,0.08);
    border: 1px solid rgba(255,60,110,0.2);
    border-radius: 20px;
    padding: 0.28rem clamp(0.45rem, 2vw, 0.7rem);
    flex-shrink: 0;
    white-space: nowrap;
  }
  .live-badge-dot {
    width: clamp(5px, 1.2vw, 7px);
    height: clamp(5px, 1.2vw, 7px);
    border-radius: 50%;
    background: var(--muted);
    flex-shrink: 0;
    transition: background 0.3s, box-shadow 0.3s;
  }
  .live-badge-dot.live {
    background: var(--accent);
    box-shadow: 0 0 7px var(--accent);
    animation: pulse 1.4s infinite;
  }
  .live-badge-dot.buffering { background: var(--accent2); animation: pulse 0.5s infinite; }
  .live-badge-text {
    font-family: 'Syne Mono', monospace;
    font-size: var(--fs-badge);
    letter-spacing: 0.13em;
    color: var(--muted);
    transition: color 0.3s;
  }
  .live-badge-text.live { color: var(--accent); }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.25} }

  /* ── VU METER ───────────────────────────────────────── */
  .vu-area {
    padding: var(--py-md) var(--px) var(--py-sm);
    background: linear-gradient(to bottom, rgba(255,60,110,0.03), transparent);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
  }

  .vu-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 12vw, 6rem);
    letter-spacing: 0.18em;
    color: rgba(255,60,110,0.04);
    pointer-events: none;
    user-select: none;
  }

  .vu-channel {
    display: flex;
    align-items: center;
    gap: var(--vu-gap);
    margin-bottom: clamp(0.35rem, 1.5vw, 0.6rem);
  }
  .vu-channel:last-of-type { margin-bottom: 0; }

  .vu-label {
    font-family: 'Syne Mono', monospace;
    font-size: var(--fs-mono);
    letter-spacing: 0.1em;
    color: var(--muted);
    width: clamp(10px, 3vw, 16px);
    flex-shrink: 0;
    text-align: center;
  }

  .vu-track {
    flex: 1;
    height: var(--vu-h);
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    min-width: 0;
  }

  .vu-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      to right,
      transparent 0px,
      transparent calc(4% - 1px),
      rgba(10,10,20,0.5) calc(4% - 1px),
      rgba(10,10,20,0.5) 4%
    );
    z-index: 2;
    pointer-events: none;
  }

  .vu-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    position: relative;
    z-index: 1;
    transition: width 0.05s ease-out;
    will-change: width;
    background: linear-gradient(
      to right,
      #00e676 0%, #00e676 55%,
      #ffea00 55%, #ffea00 80%,
      #ff3c6e 80%, #ff3c6e 100%
    );
  }

  .vu-peak {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background: #fff;
    opacity: 0.7;
    z-index: 3;
    transition: left 0.05s ease-out;
    border-radius: 1px;
  }

  .vu-scale {
    display: flex;
    margin-left: calc(clamp(10px, 3vw, 16px) + var(--vu-gap));
    padding-top: clamp(0.2rem, 1vw, 0.35rem);
  }
  .vu-scale-inner {
    flex: 1;
    display: flex;
    justify-content: space-between;
  }
  .vu-tick {
    font-family: 'Syne Mono', monospace;
    font-size: var(--fs-tick);
    color: var(--muted);
    opacity: 0.6;
    line-height: 1;
  }

  @keyframes vu-idle {
    0%,100% { width: 6%; }
    50%      { width: 16%; }
  }

  /* ── CONTROLS ───────────────────────────────────────── */
  .controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--py-sm) var(--px) var(--py-md);
    gap: clamp(0.5rem, 2vw, 1rem);
    flex-wrap: wrap;
  }

  .ctrl-group {
    display: flex;
    align-items: center;
    gap: clamp(0.3rem, 1.5vw, 0.5rem);
  }

  .ctrl-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: clamp(3px, 1vw, 5px);
    color: var(--text);
    cursor: pointer;
    padding: var(--btn-pad-y) var(--btn-pad-x);
    line-height: 1;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    display: flex; align-items: center; justify-content: center;
    touch-action: manipulation;
    min-width: clamp(36px, 9vw, 44px);
    min-height: clamp(36px, 9vw, 44px);
  }
  .ctrl-btn i { font-size: clamp(0.8rem, 2.5vw, 1rem); pointer-events: none; }
  .ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }

  .ctrl-btn.play-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border: none;
    color: #fff;
    padding: var(--btn-pad-y) var(--play-pad-x);
    box-shadow: 0 4px 14px rgba(255,60,110,0.28);
    min-width: clamp(52px, 14vw, 72px);
  }
  .ctrl-btn.play-btn i { font-size: clamp(0.9rem, 2.8vw, 1.1rem); }
  .ctrl-btn.play-btn:hover { opacity: 0.85; color: #fff; border-color: transparent; }

  .vol-row {
    display: flex;
    align-items: center;
    gap: clamp(0.3rem, 1.5vw, 0.5rem);
    flex: 1;
    justify-content: flex-end;
  }
  .vol-icon { color: var(--muted); flex-shrink: 0; }
  .vol-icon i { font-size: clamp(0.75rem, 2.2vw, 0.95rem); }

  .vol-slider {
    -webkit-appearance: none; appearance: none;
    width: var(--vol-w);
    height: clamp(3px, 0.8vw, 4px);
    background: var(--border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  .vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: clamp(10px, 2.5vw, 13px);
    height: clamp(10px, 2.5vw, 13px);
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
  }
  .vol-slider::-moz-range-thumb {
    width: clamp(10px, 2.5vw, 13px);
    height: clamp(10px, 2.5vw, 13px);
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
  }

  /* ── NOTICES ─────────────────────────────────────────── */
  .error-msg {
    font-family: 'Syne Mono', monospace;
    font-size: var(--fs-mono);
    color: #ff6060;
    padding: 0 var(--px) clamp(0.5rem, 2vw, 0.8rem);
    display: none;
    line-height: 1.4;
  }
  .error-msg.show { display: block; }

  .autoplay-notice {
    font-family: 'Syne Mono', monospace;
    font-size: var(--fs-mono);
    color: var(--accent2);
    padding: 0 var(--px) clamp(0.5rem, 2vw, 0.8rem);
    display: none;
    line-height: 1.4;
  }
  .autoplay-notice i { margin-right: 0.3rem; }
  .autoplay-notice.show { display: block; animation: fadeIn 0.4s ease; }
  @keyframes fadeIn { from{opacity:0} to{opacity:1} }

  /* ── RESPONSIVE BREAKPOINTS ──────────────────────────── */

  /* Mobile — up to 480px */
  @media (max-width: 480px) {
    body { align-items: flex-start; padding: 0; }

    .player-shell {
      border-radius: 0;
      border-left: none;
      border-right: none;
      min-height: 100vh;
      min-height: 100dvh;
    }

    .logo-tagline { display: none; }

    .vu-tick:nth-child(2) { display: none; } /* hide -30 tick on small */

    .controls { flex-wrap: nowrap; }

    .vol-row { flex: 0 0 auto; }
  }

  /* Tablet — 481px to 768px */
  @media (min-width: 481px) and (max-width: 768px) {
    body { padding: clamp(0.75rem, 3vw, 1.25rem); align-items: center; }

    .player-shell { max-width: 580px; }

    .url-row { flex-wrap: nowrap; }
  }

  /* Desktop — 769px and up */
  @media (min-width: 769px) {
    body { padding: 2rem; }

    .player-shell { max-width: 700px; }

    .controls { flex-wrap: nowrap; }

    .vol-row { flex: 0 0 auto; }
  }

  /* Touch targets — ensure minimum 44px on touch devices */
  @media (hover: none) and (pointer: coarse) {
    .ctrl-btn {
      min-width: 44px;
      min-height: 44px;
    }
    .ctrl-btn.play-btn {
      min-width: 60px;
      min-height: 44px;
    }
    .progress-track {
      height: 6px;
      padding: 8px 0;
      box-sizing: content-box;
    }
    .vol-slider {
      height: 6px;
    }
  }