/* رادیو پارسی — vintage radio theme */

:root {
  --radio-wood: #5C3A1E;
  --radio-wood-mid: #7A5232;
  --radio-wood-light: #8B6242;
  --radio-wood-highlight: #A67C52;
  --radio-dial-bg: #1A1208;
  --radio-dial-glass: rgba(26, 18, 8, .6);
  --radio-glow: #F5C342;
  --radio-glow-soft: rgba(245, 195, 66, .35);
  --radio-glow-dim: rgba(245, 195, 66, .12);
  --radio-brass: #C5A556;
  --radio-brass-light: #D4BB72;
  --radio-brass-dark: #9A7E3A;
  --radio-cream: #F5ECD7;
  --radio-cream-dim: #D4C9A8;
  --radio-leather: #3E2723;
  --radio-leather-light: #5D4037;
  --radio-vu-green: #4CAF50;
  --radio-vu-yellow: #FFC107;
  --radio-vu-red: #F44336;
  --radio-grille: #2E1E10;
  --radio-grille-hole: #1A1208;
}

/* ---------- page ---------- */
.radio-page {
  padding: 20px 0 60px;
}
.radio-page .page-title {
  text-align: center;
  margin: 10px 0 4px;
}
.radio-page .page-sub {
  text-align: center;
}

/* ---------- layout ---------- */
.radio-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}

/* ---------- radio body ---------- */
.radio-body {
  background: var(--radio-wood);
  border-radius: 28px;
  padding: 28px 28px 24px;
  box-shadow:
    0 2px 0 var(--radio-wood-mid),
    0 4px 0 var(--radio-wood),
    0 8px 0 var(--radio-wood-mid),
    0 20px 60px rgba(30, 15, 0, .5),
    inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(0,0,0,.03) 3px,
      rgba(0,0,0,.03) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 8px,
      rgba(0,0,0,.02) 8px,
      rgba(0,0,0,.02) 9px
    );
  direction: ltr;
}
.radio-body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
}

/* brand plate */
.radio-brand {
  text-align: center;
  margin-bottom: 16px;
}
.radio-brand-name {
  display: inline-block;
  background: var(--radio-brass);
  color: var(--radio-wood);
  padding: 3px 22px;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow:
    0 1px 0 var(--radio-brass-dark),
    inset 0 1px 0 rgba(255,255,255,.3);
}

/* ---------- dial / display ---------- */
.radio-dial {
  background: var(--radio-dial-bg);
  border-radius: 16px;
  padding: 20px 24px 16px;
  position: relative;
  box-shadow:
    inset 0 2px 10px rgba(0,0,0,.6),
    inset 0 0 30px var(--radio-glow-dim),
    0 1px 0 rgba(255,255,255,.05);
  border: 2px solid var(--radio-leather);
}
.radio-dial::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 12px;
  border: 1px solid rgba(245, 195, 66, .08);
  pointer-events: none;
}

/* frequency band labels */
.radio-bands {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
}
.radio-band {
  color: var(--radio-glow);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .5;
  text-shadow: 0 0 8px var(--radio-glow-soft);
  transition: opacity .3s;
}
.radio-band.active {
  opacity: 1;
}

/* now playing display */
.radio-now {
  text-align: center;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.radio-now-label {
  color: var(--radio-glow);
  font-size: .7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: .7;
  text-shadow: 0 0 6px var(--radio-glow-soft);
}
.radio-now-title {
  color: var(--radio-cream);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 4px;
  text-shadow: 0 0 12px var(--radio-glow-dim);
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  direction: rtl;
}
.radio-now-title.scroll {
  animation: dialScroll 12s linear infinite;
}
@keyframes dialScroll {
  0% { transform: translateX(20%); }
  100% { transform: translateX(-100%); }
}
.radio-now-artist {
  color: var(--radio-glow);
  font-size: .95rem;
  margin: 0;
  opacity: .85;
  text-shadow: 0 0 8px var(--radio-glow-dim);
}

/* progress bar inside dial */
.radio-progress-wrap {
  margin-top: 14px;
}
.radio-progress {
  width: 100%;
  height: 6px;
  background: rgba(245, 195, 66, .1);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.radio-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--radio-glow), #FFE082);
  border-radius: 3px;
  width: 0%;
  transition: width .3s linear;
  box-shadow: 0 0 6px var(--radio-glow-soft);
}
.radio-time {
  display: flex;
  justify-content: space-between;
  color: var(--radio-glow);
  font-size: .72rem;
  font-family: 'Courier New', monospace;
  margin-top: 6px;
  opacity: .7;
  text-shadow: 0 0 4px var(--radio-glow-dim);
}

/* ---------- VU meters ---------- */
.radio-vu-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 16px 0;
}
.radio-vu {
  width: 70px;
  height: 40px;
  background: #0D0A04;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.5);
  border: 1px solid var(--radio-leather);
}
.radio-vu-label {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--radio-cream-dim);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 2;
}
.radio-vu-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100%;
  padding: 4px 4px 12px;
}
.radio-vu-bar {
  flex: 1;
  border-radius: 1px 1px 0 0;
  min-height: 3px;
  transition: height .08s ease;
}
.radio-vu-bar.g { background: var(--radio-vu-green); }
.radio-vu-bar.y { background: var(--radio-vu-yellow); }
.radio-vu-bar.r { background: var(--radio-vu-red); }

/* ---------- transport controls ---------- */
.radio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 12px;
}
.radio-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--radio-leather);
  background: linear-gradient(180deg, var(--radio-wood-light), var(--radio-wood));
  color: var(--radio-cream);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s, box-shadow .12s, background .15s;
  box-shadow:
    0 2px 0 var(--radio-leather),
    0 4px 8px rgba(0,0,0,.3);
}
.radio-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 3px 0 var(--radio-leather),
    0 6px 12px rgba(0,0,0,.35);
}
.radio-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 0 0 var(--radio-leather),
    0 2px 4px rgba(0,0,0,.25);
}
.radio-btn-play {
  width: 58px;
  height: 58px;
  font-size: 1.4rem;
  background: linear-gradient(180deg, var(--radio-brass-light), var(--radio-brass));
  border-color: var(--radio-brass-dark);
  color: var(--radio-wood);
  box-shadow:
    0 2px 0 var(--radio-brass-dark),
    0 4px 12px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.radio-btn-play:hover {
  background: linear-gradient(180deg, #DFCA82, var(--radio-brass-light));
}
.radio-btn.active {
  color: var(--radio-glow);
  text-shadow: 0 0 6px var(--radio-glow-soft);
}

/* ---------- volume knob ---------- */
.radio-volume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 4px;
}
.radio-volume-label {
  color: var(--radio-cream-dim);
  font-size: .7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}
.radio-volume-track {
  width: 140px;
  height: 6px;
  background: rgba(245, 195, 66, .1);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
.radio-volume-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--radio-brass-dark), var(--radio-brass));
  border-radius: 3px;
  width: 75%;
  pointer-events: none;
}
.radio-volume-knob {
  position: absolute;
  top: 50%;
  right: 25%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--radio-brass-light), var(--radio-brass-dark));
  border: 1px solid var(--radio-brass-dark);
  transform: translate(50%, -50%);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  pointer-events: none;
}

/* ---------- speaker grille ---------- */
.radio-grille {
  margin-top: 18px;
  background: var(--radio-grille);
  border-radius: 12px;
  height: 36px;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.5);
  border: 1px solid var(--radio-leather);
  background-image: radial-gradient(circle, var(--radio-grille-hole) 2px, transparent 2px);
  background-size: 8px 8px;
  background-position: 4px 4px;
}

/* ---------- shelf / feet ---------- */
.radio-feet {
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  margin-top: 6px;
}
.radio-foot {
  width: 40px;
  height: 8px;
  background: var(--radio-leather);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
}

/* ---------- playlist panel ---------- */
.radio-playlist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.radio-playlist-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.radio-playlist-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.radio-playlist-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--radio-wood), var(--radio-wood-light));
  color: var(--radio-glow);
  font-size: .75rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.radio-playlist-count {
  font-size: .82rem;
  color: var(--muted);
}
.radio-playlist-items {
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.radio-playlist-items::-webkit-scrollbar { width: 5px; }
.radio-playlist-items::-webkit-scrollbar-track { background: transparent; }
.radio-playlist-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* track item */
.radio-track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.radio-track:last-child { border-bottom: 0; }
.radio-track:hover { background: var(--surface-2); }
.radio-track.active {
  background: var(--primary-soft);
}
.radio-track-num {
  width: 28px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.radio-track.active .radio-track-num {
  color: var(--primary-strong);
}
.radio-track.playing .radio-track-num {
  color: var(--radio-wood);
}
/* animated playing indicator */
.radio-track-playing {
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}
.radio-track.playing .radio-track-num span { display: none; }
.radio-track.playing .radio-track-playing { display: flex; }
.radio-track-playing span {
  width: 3px;
  background: var(--primary-strong);
  border-radius: 1px;
  animation: miniEq .8s ease-in-out infinite;
}
.radio-track-playing span:nth-child(1) { animation-delay: 0s; height: 50%; }
.radio-track-playing span:nth-child(2) { animation-delay: .2s; height: 100%; }
.radio-track-playing span:nth-child(3) { animation-delay: .1s; height: 70%; }
@keyframes miniEq {
  0%,100% { transform: scaleY(.5); }
  50% { transform: scaleY(1); }
}

.radio-track-info {
  flex: 1;
  min-width: 0;
}
.radio-track-title {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
}
.radio-track.active .radio-track-title {
  color: var(--primary-strong);
}
.radio-track-artist {
  font-size: .76rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radio-track-dur {
  font-size: .75rem;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
}
.radio-track-views {
  font-size: .68rem;
  color: var(--muted);
  flex-shrink: 0;
}

/* ---------- empty state ---------- */
.radio-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.radio-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: .4;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .radio-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .radio-body {
    border-radius: 20px;
    padding: 18px 16px 16px;
  }
  .radio-dial {
    padding: 14px 16px 12px;
    border-radius: 12px;
  }
  .radio-now-title {
    font-size: 1.1rem;
  }
  .radio-vu-row {
    gap: 10px;
  }
  .radio-vu {
    width: 55px;
    height: 32px;
  }
  .radio-btn {
    width: 38px;
    height: 38px;
    font-size: .85rem;
  }
  .radio-btn-play {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  .radio-grille {
    height: 28px;
  }
  .radio-feet {
    padding: 0 24px;
  }
  .radio-playlist-items {
    max-height: 400px;
  }
  .radio-track {
    padding: 8px 12px;
    gap: 8px;
  }
  .radio-track-num {
    width: 22px;
    font-size: .75rem;
  }
}
