:root {
  --bg: #f4f1ec;
  --card: #ffffff;
  --text: #1c1a17;
  --muted: #6f6a62;
  --accent: #d9452b;
  --accent-text: #ffffff;
  --ok: #2f9e5b;
  --track: #e4dfd7;
  --shadow: 0 10px 40px rgba(28, 26, 23, 0.08);
  --radius: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --card: #1e1c19;
    --text: #f1ede6;
    --muted: #a09a90;
    --accent: #ff6247;
    --accent-text: #141311;
    --ok: #3fbf74;
    --track: #35322d;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
h2 { margin: 0 0 12px; font-size: 15px; letter-spacing: 0.02em; }
.hint { margin: 8px 0; font-size: 13px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bara de sus ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 1040px; margin: 0 auto; padding: 18px 16px 6px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 20px; letter-spacing: -0.01em; }
.brand b { color: var(--accent); }
.brand__mark {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at center, var(--accent) 0 32%, transparent 33% 52%, var(--accent) 53% 64%, transparent 65%);
}
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; border: 1px solid var(--track);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; color: var(--muted);
}
.live-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live-badge[data-state="live"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.live-badge[data-state="live"] .live-badge__dot { background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }

/* ---------- Pagina ---------- */
.page {
  flex: 1;
  width: 100%; max-width: 1040px; margin: 0 auto; padding: 12px 16px 24px;
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 760px) { .page { grid-template-columns: 1fr; } }
.side { display: grid; gap: 16px; min-width: 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-width: 0; }

/* ---------- Player ---------- */
.player { text-align: center; padding: 32px 24px 26px; }
.visual { display: flex; justify-content: center; align-items: flex-end; gap: 5px; height: 64px; margin: 4px 0 26px; }
.visual span { width: 6px; height: 18%; border-radius: 3px; background: var(--track); transition: background 0.3s; }
body[data-state="playing"] .visual span { background: var(--accent); animation: bar 1s ease-in-out infinite alternate; }
.visual span:nth-child(2n) { animation-duration: 0.7s !important; }
.visual span:nth-child(3n) { animation-duration: 1.3s !important; }
.visual span:nth-child(4n) { animation-delay: -0.4s; }
.visual span:nth-child(5n) { animation-delay: -0.8s; }

.now__label { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.now__title { margin: 6px 0 0; font-size: clamp(20px, 4vw, 26px); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; min-height: 1.3em; overflow-wrap: anywhere; }
.studio-live { display: inline-block; margin: 10px 0 0; padding: 3px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 700; }

.controls { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-top: 26px; }
.play {
  position: relative; width: 84px; height: 84px; border: 0; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); cursor: pointer;
  display: grid; place-items: center; transition: transform 0.15s;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent);
}
.play:hover { transform: scale(1.05); }
.play:active { transform: scale(0.97); }
.play:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.play__icon { width: 34px; height: 34px; fill: currentColor; grid-area: 1 / 1; }
.play__icon--stop, .play__spinner { display: none; }
body[data-state="playing"] .play__icon--play, body[data-state="loading"] .play__icon--play { display: none; }
body[data-state="playing"] .play__icon--stop { display: block; }
body[data-state="loading"] .play__spinner {
  display: block; grid-area: 1 / 1; width: 30px; height: 30px;
  border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.volume { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 260px; color: var(--muted); }
.volume svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.volume input { width: 100%; accent-color: var(--accent); }
.status { margin: 14px 0 0; min-height: 1.4em; font-size: 13px; color: var(--muted); }
.listeners { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Sună în emisie ---------- */
.phone-big {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 10px 18px; border-radius: 14px; text-decoration: none;
  background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok);
  font-size: clamp(22px, 5vw, 28px); font-weight: 800; letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
}
.phone-big svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.phone-big:hover { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.call__form { display: flex; gap: 8px; }
.call__form input {
  flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--track); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
}
.call__btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px;
  border: 0; border-radius: 10px; background: var(--ok); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.call__btn svg { width: 18px; height: 18px; fill: currentColor; }
.call:not([data-state="idle"]) .call__btn { background: var(--accent); }
.call__meter { height: 6px; margin-top: 10px; border-radius: 3px; background: var(--track); overflow: hidden; }
.call__meter div { height: 100%; width: 0; background: var(--ok); transition: width 0.06s linear; }
.call__status { margin: 8px 0 0; font-size: 13px; color: var(--muted); min-height: 2.6em; }
.call[data-state="onair"] .call__status { color: var(--accent); font-weight: 700; }

/* ---------- Ultimele piese ---------- */
.recent__list { list-style: none; margin: 0; padding: 0; }
.recent__list li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--track); font-size: 14px; }
.recent__list li:first-child { border-top: 0; }
.recent__list time { color: var(--muted); font-variant-numeric: tabular-nums; }
.recent__list span { overflow-wrap: anywhere; }

/* ---------- Emisiuni (arhiva) ---------- */
.archive__list { list-style: none; margin: 0; padding: 0; }
.archive__list li { padding: 10px 0; border-top: 1px solid var(--track); }
.archive__list li:first-child { border-top: 0; padding-top: 0; }
.archive__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.archive__head strong { font-size: 15px; overflow-wrap: anywhere; }
.archive__head small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.archive__list p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.archive__list audio { width: 100%; margin-top: 8px; height: 36px; }
.archive__play, .archive__more {
  margin-top: 8px; padding: 6px 14px; border: 1px solid var(--track); border-radius: 999px;
  background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.archive__play:hover, .archive__more:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Subsol ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  width: 100%; max-width: 1040px; margin: 0 auto; padding: 8px 16px 24px; font-size: 13px; color: var(--muted);
}

@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bar { from { height: 15%; } to { height: 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  body[data-state="playing"] .visual span { height: 60%; }
}
