/* RádioMP3. Mesmo "estúdio à noite" do davidalves.com.br, com cara de receptor de rádio. */
:root {
  --bg: #0F1115;
  --bg-2: #13161B;
  --card: #171A20;
  --card-2: #1D2128;
  --line: #262A33;
  --line-strong: #3A3F4A;
  --text: #F3F1EC;
  --text-2: #C9CED6;
  --muted: #A7ADB8;
  --amber: #F5A524;
  --amber-hover: #FFC861;
  --amber-glow: rgba(245, 165, 36, .35);
  --on-amber: #1A1205;
  --red: #FF4D3D;
  --green: #3DDC84;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; overflow-x: hidden;
}
a { color: var(--amber); }
a:hover { color: var(--amber-hover); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* brilho âmbar de fundo, mais forte quando a rádio está tocando */
.glow {
  position: fixed; inset: -20% -10% auto; height: 90vh; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(245, 165, 36, .14), transparent 70%),
    radial-gradient(ellipse 40% 35% at 15% 10%, rgba(255, 77, 61, .06), transparent 70%);
  transition: opacity .8s ease; opacity: .7;
}
body.is-playing .glow { opacity: 1; }
.top, main, .foot { position: relative; z-index: 1; }

/* ---------- topo ---------- */
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-radio { font: 400 34px/1 var(--serif); letter-spacing: -.01em; }
.logo-mp3 {
  font: 700 15px/1 var(--mono); color: var(--on-amber); background: var(--amber);
  padding: 5px 7px 4px; border-radius: 6px; letter-spacing: .04em; transform: translateY(-4px);
  box-shadow: 0 0 18px var(--amber-glow);
}
.by {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2);
  text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px;
}
.by strong { color: var(--text); font-weight: 600; }
.by svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.by:hover { border-color: var(--amber); color: var(--text); }

main { flex: 1; padding-bottom: 56px; }

/* ---------- receptor ---------- */
.receiver {
  margin-top: 12px; padding: 26px 26px 20px; border-radius: 24px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.rx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.onair {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 8px;
  font: 700 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: #6B5A5A; background: #1A1416; border: 1px solid #3A2A2C;
  transition: color .3s, background .3s, box-shadow .3s, border-color .3s;
}
.lamp { width: 10px; height: 10px; border-radius: 50%; background: #4A2A2A; transition: background .3s, box-shadow .3s; }
body.is-playing .onair { color: #FFE9E6; background: #3A1210; border-color: var(--red); box-shadow: 0 0 24px rgba(255, 77, 61, .35); }
body.is-playing .lamp { background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.freq { font: 700 22px/1 var(--mono); color: var(--amber); text-shadow: 0 0 12px var(--amber-glow); }
.freq small { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-shadow: none; margin-left: 4px; }

/* dial com agulha */
.dial {
  position: relative; margin: 22px 0 24px; height: 62px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, #0B0C0F, #121419); border: 1px solid var(--line);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .6);
}
.dial-scale {
  position: absolute; left: 6%; right: 6%; top: 9px; display: flex; justify-content: space-between;
  font: 500 12px/1 var(--mono); color: #8A7550;
}
.dial-ticks {
  position: absolute; left: 6%; right: 6%; bottom: 10px; height: 18px;
  background:
    repeating-linear-gradient(90deg, rgba(245, 165, 36, .55) 0 1px, transparent 1px 20%) 0 100% / 100% 18px no-repeat,
    repeating-linear-gradient(90deg, rgba(245, 165, 36, .25) 0 1px, transparent 1px 4%) 0 100% / 100% 9px no-repeat;
}
.needle {
  position: absolute; top: 6px; bottom: 6px; left: 30%; width: 2px; border-radius: 2px;
  background: var(--red); box-shadow: 0 0 10px var(--red), 0 0 2px #fff;
  transition: left 1.4s cubic-bezier(.3, .7, .2, 1);
}

/* play + música atual */
.deck { display: flex; align-items: center; gap: 22px; }
.play-wrap { position: relative; flex: 0 0 auto; width: 96px; height: 96px; display: grid; place-items: center; }
.play {
  position: relative; z-index: 2; width: 88px; height: 88px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, var(--amber-hover), var(--amber) 55%, #C97F0E);
  color: var(--on-amber); display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(245, 165, 36, .35), inset 0 -3px 0 rgba(0, 0, 0, .18);
  transition: transform .15s ease, box-shadow .2s ease;
}
.play:hover { transform: scale(1.04); }
.play:active { transform: scale(.97); }
.play[disabled] { cursor: not-allowed; filter: grayscale(1) brightness(.6); }
.play svg { width: 36px; height: 36px; fill: currentColor; }
.play .i-pause { display: none; }
body.is-playing .play .i-play { display: none; }
body.is-playing .play .i-pause { display: block; }
.wave {
  position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--amber); opacity: 0; z-index: 1;
}
body.is-playing .wave { animation: ripple 2.4s ease-out infinite; }
body.is-playing .w2 { animation-delay: .8s; }
body.is-playing .w3 { animation-delay: 1.6s; }
@keyframes ripple { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }
body.is-loading .play { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(245, 165, 36, .15), 0 10px 30px rgba(245, 165, 36, .35); } }

.now { min-width: 0; flex: 1; }
.now-label { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }
.now-title {
  margin-top: 8px; font: 400 clamp(24px, 4.6vw, 34px)/1.15 var(--serif); color: var(--text);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.bar { margin-top: 14px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.next { margin-top: 10px; display: flex; align-items: baseline; gap: 10px; min-width: 0; font-size: 15px; color: var(--text-2); }
.next[hidden] { display: none; }
.next-label { flex: 0 0 auto; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 6px 3px; }
.next-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar span { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 4px; transition: width .25s linear; }

/* VU de LEDs estéreo */
.vu { margin-top: 24px; display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: #0B0C0F; border: 1px solid var(--line); }
.vu-row { display: flex; align-items: center; gap: 10px; }
.vu-ch { font: 700 11px/1 var(--mono); color: var(--muted); width: 10px; }
.vu-leds { flex: 1; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.vu-leds i { height: 9px; border-radius: 2px; background: #1C2A20; transition: background .06s, box-shadow .06s; }
.vu-leds i:nth-child(n+17) { background: #2E2614; }
.vu-leds i:nth-child(n+22) { background: #331715; }
.vu-leds i.on { background: var(--green); box-shadow: 0 0 6px rgba(61, 220, 132, .6); }
.vu-leds i:nth-child(n+17).on { background: var(--amber); box-shadow: 0 0 6px var(--amber-glow); }
.vu-leds i:nth-child(n+22).on { background: var(--red); box-shadow: 0 0 6px rgba(255, 77, 61, .6); }

.rx-foot { margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vol { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.vol svg { width: 20px; height: 20px; fill: currentColor; }
.vol input { width: 150px; accent-color: var(--amber); }
.mode { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- audiência ---------- */
.audience { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.counter {
  position: relative; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.digits { font: 700 clamp(28px, 6vw, 40px)/1 var(--mono); color: var(--amber); text-shadow: 0 0 16px var(--amber-glow); font-variant-numeric: tabular-nums; }
.counter-label { font-size: 14px; color: var(--text-2); }
.live-dot { position: absolute; top: 18px; right: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

/* ---------- chamada para o davidalves.com.br ---------- */
.cta {
  margin-top: 56px; padding: 36px 30px; border-radius: 24px; text-align: left;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(245, 165, 36, .16), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--line);
}
.eyebrow { font-size: 13px; letter-spacing: .14em; font-weight: 600; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.cta h1 { margin: 0; font: 400 clamp(32px, 6vw, 50px)/1.05 var(--serif); letter-spacing: -.01em; }
.cta h1 em { color: var(--amber); }
.cta-text { margin-top: 14px; color: var(--text-2); max-width: 560px; }
.cta-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none;
  background: var(--amber); color: var(--on-amber); border: 1px solid var(--amber);
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--amber-hover); border-color: var(--amber-hover); color: var(--on-amber); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: transparent; color: var(--text); border-color: var(--amber); }

/* ---------- rodapé ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; font-size: 14px; color: var(--muted); }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 60px 0 20px; }
.lost .freq { font-size: 54px; }
.lost h1 { margin: 22px 0 10px; font: 400 clamp(34px, 7vw, 54px)/1.05 var(--serif); }
.lost p { color: var(--text-2); margin-bottom: 26px; }
.static { margin: 26px auto 0; max-width: 420px; height: 60px; border-radius: 12px; border: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, #1A1D23 0 2px, #0F1115 2px 5px), #0F1115; opacity: .7; }

/* ---------- celular ---------- */
@media (max-width: 560px) {
  .receiver { padding: 20px 16px 16px; border-radius: 20px; }
  .deck { gap: 14px; }
  .play-wrap { width: 78px; height: 78px; }
  .play { width: 72px; height: 72px; }
  .play svg { width: 30px; height: 30px; }
  .dial { height: 54px; margin: 18px 0 20px; }
  .vu-leds { grid-template-columns: repeat(24, 1fr); gap: 2px; }
  .vol input { width: 120px; }
  .counter { padding: 16px; }
  .cta { margin-top: 40px; padding: 28px 20px; }
  .by { font-size: 13px; padding: 7px 12px; }
  .logo-radio { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
