/* PMVRadio — neon night theme */
:root {
  --bg: #08050e;
  --bg-2: #0e0918;
  --panel: rgba(20, 12, 34, 0.72);
  --panel-border: rgba(255, 90, 200, 0.14);
  --text: #efe6ff;
  --text-dim: #9d8ec2;
  --magenta: #ff3ec8;
  --cyan: #29e6ff;
  --violet: #8b5cff;
  --glow-m: 0 0 18px rgba(255, 62, 200, 0.35);
  --glow-c: 0 0 18px rgba(41, 230, 255, 0.3);
  --radius: 14px;
}

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

/* the `hidden` attribute must always win over display rules (age gate, idle overlay) */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(139, 92, 255, 0.16), transparent 60%),
    radial-gradient(900px 420px at 0% 110%, rgba(41, 230, 255, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

code { font-family: "Cascadia Code", Consolas, monospace; color: var(--cyan); }
.muted { color: var(--text-dim); }
.dim { opacity: 0.55; }

/* ── age gate ─────────────────────────────────────────── */
.age-gate {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 2, 8, 0.92);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
}
.age-gate-card {
  max-width: 430px; padding: 40px 36px; text-align: center;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); box-shadow: var(--glow-m);
}
.age-gate-logo { font-size: 34px; font-weight: 800; letter-spacing: 3px; margin-bottom: 18px; }
.age-gate-logo span { color: var(--magenta); text-shadow: var(--glow-m); }
.age-gate-card p { margin-bottom: 10px; }
.age-gate-actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }

/* ── buttons / pills ──────────────────────────────────── */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; font: inherit; text-decoration: none; color: var(--text);
}
.btn-primary {
  background: linear-gradient(120deg, var(--magenta), var(--violet));
  box-shadow: var(--glow-m); font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { border-color: var(--panel-border); background: transparent; }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-small { padding: 7px 12px; font-size: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
  color: var(--text-dim); white-space: nowrap;
}
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-live { background: #2dff9c; box-shadow: 0 0 8px #2dff9c; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* ── topbar ───────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; row-gap: 8px;
  padding: 18px 28px; border-bottom: 1px solid var(--panel-border);
  background: rgba(8, 5, 14, 0.8); position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(10px);
}
.topbar-status { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark { color: var(--magenta); text-shadow: var(--glow-m); }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: 2.5px; }
.brand-name em { font-style: normal; color: var(--magenta); text-shadow: var(--glow-m); }
.brand-sub { color: var(--text-dim); font-size: 12.5px; letter-spacing: 1px; }
.topbar-status { display: flex; gap: 8px; }

/* ── layout ───────────────────────────────────────────── */
.app { max-width: 1180px; margin: 0 auto; padding: 0 20px 30px; }
.layout {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px; margin-top: 24px;
}
.layout > * { min-width: 0; max-width: 100%; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  .brand-sub { display: none; }
  .volume input[type="range"] { width: 64px; }
  .topbar { padding: 14px 16px; }
  .app { padding: 0 12px 24px; }
}

.panel-base {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); backdrop-filter: blur(6px);
}
.player-card { padding: 16px; position: sticky; top: 84px; align-self: start; }
@media (max-width: 900px) { .player-card { position: static; } }

/* ── screen ───────────────────────────────────────────── */
.screen {
  position: relative; border-radius: 10px; overflow: hidden;
  background: #000; aspect-ratio: 16 / 9;
}
.screen video { width: 100%; height: 100%; max-width: 100%; min-width: 0; display: block; object-fit: contain; }
.screen-idle {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 3px),
    radial-gradient(600px 240px at 50% 120%, rgba(255, 62, 200, 0.18), transparent 70%),
    var(--bg-2);
  color: var(--text-dim); letter-spacing: 1px; font-size: 13px;
}
.eq-bars { display: flex; gap: 5px; align-items: flex-end; height: 34px; }
.eq-bars i {
  width: 6px; background: linear-gradient(180deg, var(--cyan), var(--magenta));
  animation: eq 1s ease-in-out infinite;
}
.eq-bars i:nth-child(1) { height: 40%; animation-delay: 0s; }
.eq-bars i:nth-child(2) { height: 80%; animation-delay: .15s; }
.eq-bars i:nth-child(3) { height: 55%; animation-delay: .3s; }
.eq-bars i:nth-child(4) { height: 95%; animation-delay: .1s; }
.eq-bars i:nth-child(5) { height: 65%; animation-delay: .25s; }
@keyframes eq { 50% { transform: scaleY(0.35); } }
.live-badge {
  position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 62, 200, 0.4);
}

/* ── now playing ──────────────────────────────────────── */
.now-playing { display: flex; align-items: center; gap: 12px; margin: 16px 2px 10px; }
.np-music { font-size: 19px; font-weight: 700; letter-spacing: 0.3px; }
.np-sub { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.np-actions { margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--panel-border); color: var(--text);
  background: transparent; text-decoration: none; font-size: 16px;
}
.icon-btn:hover { border-color: var(--cyan); box-shadow: var(--glow-c); }

/* ── controls ─────────────────────────────────────────── */
.controls { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ctl {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
  color: var(--text); font-size: 15px; transition: all 0.15s;
}
.ctl:hover { border-color: var(--magenta); }
.ctl-main {
  width: 52px; height: 52px; font-size: 19px;
  background: linear-gradient(120deg, var(--magenta), var(--violet));
  border: none; box-shadow: var(--glow-m);
}
.ctl-on { border-color: var(--cyan); box-shadow: var(--glow-c); }
.volume { display: flex; align-items: center; gap: 6px; }
.volume input[type="range"] { width: 90px; accent-color: var(--magenta); }
.spacer { flex: 1; }

.progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); margin-top: 14px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--magenta)); transition: width 0.4s linear; }

/* ── queue ────────────────────────────────────────────── */
.queue-card { padding: 16px; display: flex; flex-direction: column; min-height: 480px; }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.queue-head h2 { font-size: 15px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-dim); }
#search {
  flex: 1; max-width: 260px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--panel-border);
  color: var(--text); font: inherit; font-size: 13px; outline: none;
}
#search:focus { border-color: var(--cyan); }

.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 4px 11px; border-radius: 999px; font-size: 12px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--panel-border);
  color: var(--text-dim);
}
.chip:hover { color: var(--text); }
.chip-active { border-color: var(--magenta); color: var(--magenta); box-shadow: var(--glow-m); }

.queue { list-style: none; overflow-y: auto; max-height: 60vh; padding-right: 4px; }
.queue::-webkit-scrollbar { width: 8px; }
.queue::-webkit-scrollbar-thumb { background: rgba(255, 62, 200, 0.25); border-radius: 4px; }

.q-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px;
  border-radius: 10px; cursor: pointer; border: 1px solid transparent;
}
.q-item:hover { background: rgba(255, 255, 255, 0.04); }
.q-active { background: rgba(255, 62, 200, 0.09); border-color: rgba(255, 62, 200, 0.35); }
.q-num { color: var(--text-dim); font-size: 11.5px; min-width: 22px; }
.q-thumb {
  width: 58px; height: 33px; object-fit: cover; border-radius: 5px; flex-shrink: 0;
  background: var(--bg-2); border: 1px solid var(--panel-border);
}
.q-body { min-width: 0; flex: 1; }
.q-music { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { color: var(--text-dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-tag { color: var(--cyan); font-size: 11px; white-space: nowrap; }
.queue-empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }

/* ── footer ───────────────────────────────────────────── */
.footer { margin-top: 34px; padding: 22px 8px 8px; border-top: 1px solid var(--panel-border); text-align: center; }
.footer-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.footer-links a { color: var(--cyan); text-decoration: none; font-size: 13.5px; }
.footer-links a:hover { text-shadow: var(--glow-c); }
.footer p { font-size: 12.5px; margin-bottom: 6px; }
.footer a { color: var(--text-dim); }

/* ── toast ────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  padding: 11px 20px; border-radius: 10px; z-index: 90; font-size: 13.5px;
  background: rgba(14, 9, 24, 0.95); border: 1px solid rgba(41, 230, 255, 0.4);
  box-shadow: var(--glow-c); max-width: 90vw;
}
