/* ==========================================================================
   Zorion Rádio Web — design tokens
   Conceito: "dial de sintonia" noturno. Uma rádio se sente por som e luz,
   então o cover art vira um dial de FM que pulsa com a transmissão.
   ========================================================================== */

:root{
  --bg-0:#050813;
  --bg-1:#0b1128;
  --bg-2:#121b3d;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.14);

  --ink:#f4f2ea;
  --ink-dim:#aab0cf;
  --ink-faint:#6b7396;

  --amber:#ffb020;
  --amber-dim: rgba(255,176,32,.35);
  --pink:#ff3d6e;
  --teal:#39e0c4;

  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-body:'Inter', sans-serif;
  --font-mono:'JetBrains Mono', monospace;

  --radius-card: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-card: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px var(--line);
}

*{ box-sizing:border-box; margin:0; padding:0; }

html, body{
  height:100%;
}

body{
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 18% -10%, #1b2557 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 110%, #2a1240 0%, transparent 50%),
    var(--bg-0);
  min-height:100svh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 32px 18px;
  position:relative;
  overflow-x:hidden;
}

/* subtle grain so the dark background doesn't feel flat/plastic */
.noise{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.05;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index:0;
}

.app{
  position:relative;
  z-index:1;
  width:100%;
  max-width: 400px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
}

/* ==========================================================================
   Player card
   ========================================================================== */

.player{
  width:100%;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border:1px solid var(--line);
  overflow:hidden;
}

.cover{
  position:relative;
  padding: 22px 22px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
}

.top{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--ink-dim);
  margin-bottom: 22px;
}

.live{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color: var(--pink);
  font-weight:600;
}

.live .dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255,61,110,.6);
  animation: pulse-dot 1.8s ease-out infinite;
}

@keyframes pulse-dot{
  0%   { box-shadow: 0 0 0 0 rgba(255,61,110,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(255,61,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,61,110,0); }
}

.online b{
  color: var(--ink);
  font-weight:600;
}

/* ---- Tuning dial: the signature element ---- */

.dial{
  position:relative;
  width: 190px;
  height: 190px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 4px;
}

.dial-ring{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  animation: rotate-dial 40s linear infinite;
}

.dial-track{
  fill:none;
  stroke: var(--line);
  stroke-width: 1.4;
}

.dial-glow{
  fill:none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 26 620;
  opacity:.85;
  filter: drop-shadow(0 0 6px var(--amber-dim));
}

/* tick marks generated with a conic gradient ring, cheaper than 40 svg lines */
.dial::before{
  content:"";
  position:absolute;
  inset:6px;
  border-radius:50%;
  background: repeating-conic-gradient(
    var(--line-strong) 0deg 1.2deg,
    transparent 1.2deg 9deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 12px), #000 calc(100% - 11px));
}

@keyframes rotate-dial{
  to{ transform: rotate(360deg); }
}

.logo-card{
  position:relative;
  width: 132px;
  height: 132px;
  border-radius:50%;
  overflow:hidden;
  background: radial-gradient(120% 120% at 30% 20%, #2a3568 0%, #0e1430 70%);
  border: 1px solid var(--line-strong);
  box-shadow:
    0 0 0 10px rgba(5,8,19,.55),
    0 20px 40px -12px rgba(0,0,0,.6);
  display:flex;
  align-items:center;
  justify-content:center;
}

.logo-card img{
  width:100%;
  height:100%;
  object-fit: cover;
}

/* ---- Content ---- */

.content{
  padding: 6px 26px 30px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom:10px;
}

h1{
  font-family: var(--font-display);
  font-weight:700;
  font-size: 30px;
  letter-spacing: -.01em;
  line-height:1.1;
  color: var(--ink);
}

.tagline{
  color: var(--ink-dim);
  font-size: 14.5px;
  margin-top:6px;
  margin-bottom:22px;
}

/* ---- Now-playing LCD strip ---- */

.music-box{
  width:100%;
  display:flex;
  align-items:center;
  gap:14px;
  background: rgba(255,255,255,.03);
  border:1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom:22px;
}

.bars{
  display:flex;
  align-items:flex-end;
  gap:3px;
  height:26px;
  flex-shrink:0;
}

.bars i{
  width:3px;
  border-radius:2px;
  background: linear-gradient(180deg, var(--amber), var(--pink));
  animation: eq 1.1s ease-in-out infinite;
  animation-play-state: paused;
  opacity:.35;
}

.playing .bars i{
  animation-play-state: running;
  opacity:1;
}

.bars i:nth-child(1){ height:40%; animation-delay:-1.0s; }
.bars i:nth-child(2){ height:70%; animation-delay:-0.8s; }
.bars i:nth-child(3){ height:100%; animation-delay:-0.6s; }
.bars i:nth-child(4){ height:55%; animation-delay:-0.4s; }
.bars i:nth-child(5){ height:85%; animation-delay:-0.9s; }
.bars i:nth-child(6){ height:35%; animation-delay:-0.3s; }
.bars i:nth-child(7){ height:65%; animation-delay:-0.5s; }

@keyframes eq{
  0%, 100% { transform: scaleY(.35); }
  50%      { transform: scaleY(1); }
}

.music-info{
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.music-info span{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--ink-faint);
}

.music-info strong{
  font-size: 14px;
  font-weight:600;
  color: var(--ink);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ---- Play button ---- */

.play{
  width: 76px;
  height: 76px;
  border-radius:50%;
  border:none;
  cursor:pointer;
  background: radial-gradient(120% 120% at 30% 20%, #ffc95c 0%, var(--amber) 55%, #d98600 100%);
  box-shadow:
    0 12px 28px -8px rgba(255,176,32,.55),
    inset 0 1px 1px rgba(255,255,255,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  transition: transform .15s ease, box-shadow .2s ease;
  margin-bottom:14px;
}

.play:hover{ transform: translateY(-2px); }
.play:active{ transform: translateY(0) scale(.96); }

.play:focus-visible{
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.icon-play{
  width: 26px;
  height:26px;
  fill: #1a0f00;
  margin-left:3px;
}

.playing .icon-play{
  margin-left:0;
}

.status{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing:.02em;
  margin-bottom:22px;
  min-height:16px;
}

/* ---- Volume ---- */

.volume{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:24px;
}

.vol-icon{ font-size:14px; opacity:.7; flex-shrink:0; }

.volume input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  height:4px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  outline:none;
}

.volume input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:15px;
  height:15px;
  border-radius:50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255,176,32,.18);
  cursor:pointer;
  transition: box-shadow .15s ease;
}

.volume input[type="range"]::-webkit-slider-thumb:hover{
  box-shadow: 0 0 0 6px rgba(255,176,32,.24);
}

.volume input[type="range"]::-moz-range-thumb{
  width:15px;
  height:15px;
  border:none;
  border-radius:50%;
  background: var(--amber);
  cursor:pointer;
}

/* ---- Action buttons ---- */

.buttons{
  width:100%;
  display:flex;
  gap:10px;
}

.buttons a,
.buttons button{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding: 13px 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;
  border:1px solid var(--line-strong);
  background: rgba(255,255,255,.03);
  color: var(--ink);
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}

.buttons a:hover,
.buttons button:hover{
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.22);
  transform: translateY(-1px);
}

#favBtn.active{
  color: var(--pink);
  border-color: rgba(255,61,110,.4);
  background: rgba(255,61,110,.08);
}

.banner{
  width:100%;
  border-radius: var(--radius-md);
  margin-top:20px;
}

.credit{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing:.04em;
  text-align:center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 380px){
  .dial{ width:168px; height:168px; }
  .logo-card{ width:116px; height:116px; }
  h1{ font-size:26px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce){
  .dial-ring{ animation:none; }
  .live .dot{ animation:none; }
  .bars i{ animation:none; }
  .play, .buttons a, .buttons button{ transition:none; }
}