:root {
  color-scheme: dark;
  --bg: #05080c;
  --panel: rgba(14, 20, 29, 0.88);
  --panel-2: rgba(8, 13, 20, 0.95);
  --line: rgba(110, 239, 255, 0.28);
  --cyan: #70efff;
  --cyan-strong: #1eddf5;
  --orange: #ff9f43;
  --red: #ff405c;
  --green: #4cff9a;
  --text: #f5f9ff;
  --muted: #92a2b5;
  --shadow: 0 24px 70px rgba(0,0,0,.48);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(30,221,245,.10), transparent 31rem),
    radial-gradient(circle at 90% 8%, rgba(255,159,67,.08), transparent 28rem),
    linear-gradient(150deg, #05080c 0%, #07101a 52%, #04070b 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .25;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 4px);
}
a { color: inherit; }
.page-shell { width: min(1500px, 100%); margin: 0 auto; padding: 22px clamp(16px, 3vw, 42px) 30px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.brand-block { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid rgba(112,239,255,.72); border-radius: 13px;
  font-weight: 900; font-size: 27px; letter-spacing: -.05em;
  background: linear-gradient(145deg, rgba(112,239,255,.18), rgba(4,8,13,.9));
  box-shadow: inset 0 0 22px rgba(30,221,245,.11), 0 0 18px rgba(30,221,245,.12);
}
.brand-name { font-weight: 900; letter-spacing: .12em; font-size: clamp(15px, 2vw, 22px); white-space: nowrap; }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .16em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .12em; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 10px currentColor; }
.live-badge.is-live { color: var(--red); border-color: rgba(255,64,92,.35); }
.live-badge.is-live .live-dot { background: var(--red); animation: pulse 1.25s infinite; }
.live-badge.is-setup { color: #d7e1eb; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.82); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(260px, .75fr); gap: 18px; align-items: stretch; }
.player-card, .info-card, .about-card {
  border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(160deg, rgba(17,25,36,.92), rgba(7,11,17,.94)); box-shadow: var(--shadow);
}
.player-card { padding: clamp(14px, 2.2vw, 24px); }
.player-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.eyebrow { color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(24px, 4vw, 42px); margin-bottom: 0; letter-spacing: -.035em; }
.clock { color: #c9d5e3; font: 700 13px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.player-frame { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 15px; background: #010204; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(0,0,0,.7), 0 0 35px rgba(30,221,245,.08); }
.youtube-player { width: 100%; height: 100%; border: 0; display: none; background: #000; }
.player-frame.is-ready .youtube-player { display: block; }
.player-frame.is-ready .setup-panel { display: none; }
.setup-panel { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: clamp(22px, 5vw, 70px); background: radial-gradient(circle at center, rgba(30,221,245,.075), transparent 48%), #020509; }
.setup-icon { margin: 0 auto 10px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--cyan); border: 1px solid rgba(112,239,255,.35); background: rgba(112,239,255,.06); font-size: 20px; }
.setup-panel h2 { margin-bottom: 8px; font-size: clamp(20px, 3vw, 30px); }
.setup-panel p { max-width: 670px; margin: 0 auto 8px; color: #b9c7d6; line-height: 1.55; }
.setup-panel .setup-small { max-width: 710px; color: #8798aa; font-size: 12px; }
.signal-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.28); color: #98a9bb; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.signal-strip b { color: var(--cyan); }
.info-card { padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.artwork-wrap { margin: 14px 0 18px; aspect-ratio: 1/1; border-radius: 17px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); background: linear-gradient(145deg, rgba(255,159,67,.11), rgba(112,239,255,.11) 55%, #05080c); box-shadow: inset 0 0 30px rgba(112,239,255,.05); }
.artwork-wrap img { width: 100%; height: 100%; object-fit: cover; }
.artwork-fallback { width: 100%; height: 100%; display: grid; place-content: center; text-align: center; font-weight: 950; font-size: clamp(28px, 4.2vw, 54px); line-height: .82; letter-spacing: -.055em; color: #eafaff; text-shadow: 0 0 24px rgba(30,221,245,.25); }
.now-label { color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.track-title { margin-top: 6px; font-size: clamp(20px, 2.4vw, 31px); font-weight: 900; letter-spacing: -.035em; overflow-wrap: anywhere; }
.track-artist { margin-top: 3px; color: #a9bbcc; font-size: 14px; overflow-wrap: anywhere; }
.status-list { margin: 22px 0; border-top: 1px solid rgba(255,255,255,.08); }
.status-list > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.status-list dt { color: #728397; font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.status-list dd { margin: 0; color: #d7e1eb; font-size: 11px; text-align: right; }
.secondary-button { display: block; margin-top: auto; text-align: center; text-decoration: none; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(112,239,255,.4); background: rgba(112,239,255,.07); color: var(--cyan); font-size: 11px; font-weight: 900; letter-spacing: .1em; transition: transform .15s ease, background .15s ease; }
.secondary-button:hover { transform: translateY(-1px); background: rgba(112,239,255,.12); }
.secondary-button.is-disabled { pointer-events: none; color: #748494; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.025); }
.about-card { margin-top: 18px; padding: 20px; display: grid; grid-template-columns: .8fr 1.2fr; gap: 18px; align-items: center; }
.about-card h2 { margin: 4px 0 0; font-size: clamp(21px, 3vw, 34px); }
.about-card p { margin: 0; color: #9eb0c1; line-height: 1.6; }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 20px 4px 0; color: #637386; font-size: 10px; letter-spacing: .06em; }
@media (max-width: 850px) {
  .hero-grid { grid-template-columns: 1fr; }
  .info-card { display: grid; grid-template-columns: minmax(125px, .45fr) minmax(0, 1fr); column-gap: 18px; align-items: start; }
  .info-card > .eyebrow { grid-column: 1 / -1; }
  .artwork-wrap { grid-row: 2 / span 5; }
  .status-list, .secondary-button { grid-column: 2; }
  .about-card { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page-shell { padding: 14px 12px 22px; }
  .topbar { align-items: flex-start; }
  .brand-mark { width: 42px; height: 42px; }
  .brand-subtitle { display: none; }
  .live-badge { padding: 7px 9px; font-size: 9px; }
  .player-title-row { align-items: center; }
  .clock { font-size: 10px; }
  .signal-strip { justify-content: flex-start; }
  .info-card { display: flex; }
  .artwork-wrap { width: min(68vw, 300px); align-self: center; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* PHASE 2 viewer modes */
.viewer-tabs { display: flex; gap: 8px; margin: -5px 0 18px; }
.viewer-tab { appearance: none; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.035); color: #8fa1b5; padding: 9px 15px; font: 900 10px/1 system-ui, sans-serif; letter-spacing: .12em; cursor: pointer; }
.viewer-tab.is-active { color: var(--cyan); border-color: rgba(112,239,255,.42); background: rgba(112,239,255,.08); box-shadow: inset 0 0 18px rgba(30,221,245,.05); }
.live-badge.is-ready { color: var(--green); border-color: rgba(76,255,154,.32); }
.live-badge.is-ready .live-dot { background: var(--green); }
.listen-notice { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(112,239,255,.18); background: rgba(112,239,255,.045); color: #9eb0c1; font-size: 11px; line-height: 1.55; }
.listen-notice strong { color: var(--cyan); margin-right: 8px; letter-spacing: .1em; }
.hero-grid.is-listen-mode .player-frame { max-width: 520px; aspect-ratio: 16/9; margin-inline: auto; opacity: .9; }
.hero-grid.is-listen-mode .player-card { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 560px) {
  .viewer-tabs { overflow-x: auto; padding-bottom: 2px; }
  .viewer-tab { flex: 1 0 auto; }
}
