:root {
  color-scheme: dark;
  --black: #000;
  --white: #fff;
  --white-80: rgba(255,255,255,.8);
  --white-60: rgba(255,255,255,.6);
  --white-30: rgba(255,255,255,.3);
  --panel: rgba(26,26,29,.52);
  --panel-strong: rgba(18,18,20,.86);
  --error: #ff7043;
  --green: #00bb51;
  --line: rgba(255,255,255,.14);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: Roboto, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--black);
  color: var(--white);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.login-screen { min-height: 100svh; background: #000; position: relative; }
.login-step { position: absolute; inset: 0; display: none; background: #000; }
.login-step.is-active { display: block; }
.login-intro {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  top: 4.6svh;
  margin: 0;
  max-width: 640px;
  color: var(--white-60);
  font-size: clamp(12px, 1.1vw, 15px);
  line-height: 1.45;
}
.login-intro strong {
  color: #fff;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.login-step h1 {
  position: absolute;
  left: 0;
  top: 14svh;
  margin: 0;
  padding-left: clamp(24px, 5vw, 56px);
  font-size: clamp(44px, 7vw, 76px);
  line-height: .9;
  font-weight: 700;
  letter-spacing: -.06em;
}
.login-back { position: absolute; left: clamp(12px, 3vw, 28px); top: 5svh; z-index: 3; }
.top-row { position: absolute; left: clamp(12px, 3vw, 28px); right: 30px; top: 5svh; display: flex; justify-content: space-between; align-items: center; z-index: 3; }
.icon-button, .settings-button { border: 0; color: #fff; background: transparent; cursor: pointer; }
.icon-button { font-size: 44px; line-height: 1; padding: 6px 14px; }
.settings-button { width: 50px; height: 30px; font-size: 22px; letter-spacing: 2px; opacity: .9; }
.form-error {
  position: absolute;
  top: calc(14svh + 78px);
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  color: var(--error);
  min-height: 24px;
  margin: 0;
}
.field-line {
  position: absolute;
  left: clamp(24px, 5vw, 56px);
  right: clamp(24px, 5vw, 56px);
  top: calc(14svh + 120px);
}
.field-line input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.9);
  border-radius: 0;
  padding: 12px 30px 12px 0;
  background: transparent;
  color: #fff;
  outline: none;
  font-size: 18px;
  font-weight: 500;
}
.field-line input::placeholder { color: rgba(255,255,255,.72); }
.next-button {
  position: absolute;
  left: 50%;
  top: 51.6svh;
  transform: translateX(-50%);
  min-width: 180px;
  height: 54px;
  border: 0;
  border-radius: 27px;
  padding: 0 40px;
  background: #fff;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

.player-screen {
  min-height: 100svh;
  background:
    radial-gradient(circle at 62% 42%, rgba(255,255,255,.07), transparent 22rem),
    radial-gradient(circle at 16% 86%, rgba(0,187,81,.08), transparent 32rem),
    #000;
  overflow: hidden;
}
.app-header {
  min-height: 72px;
  padding: 18px clamp(24px, 4vw, 48px) 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 20px;
  align-items: center;
}
.brand-block {
  min-width: 160px;
  padding-bottom: 0;
  text-transform: uppercase;
}
.brand-block .eyebrow {
  margin: 0 0 3px;
  color: var(--white-30);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .24em;
}
.brand-block h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: .12em;
}
.tabs { display: flex; gap: clamp(18px, 2.2vw, 32px); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 0 10px;
  background: transparent;
  color: var(--white-60);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.tab.is-active { color: #fff; border-color: #fff; }
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 0;
}
.header-button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 9px 13px;
  background: rgba(255,255,255,.055);
  color: var(--white-80);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.header-button:hover:not(:disabled) { background: rgba(255,255,255,.12); color: #fff; }
.header-button.danger { color: #ffb2a0; }
.tablet-layout {
  height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(300px, 34vw) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}
.library-tools {
  grid-column: 1;
  padding: 16px clamp(22px, 3vw, 40px) 10px;
  display: grid;
  gap: 8px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.search-box input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255,255,255,.06);
  color: #fff;
  outline: none;
}
.search-box input:focus { border-color: rgba(255,255,255,.42); }
.library-count { margin: 0; color: var(--white-60); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.browser-pane {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  min-height: 0;
  border-right: 1px solid rgba(255,255,255,.06);
}
.channel-list {
  height: 100%;
  overflow-y: auto;
  padding: 12px clamp(22px, 3vw, 40px) 120px;
  display: grid;
  align-content: start;
  gap: 8px;
}
.fade { position: absolute; left: 0; right: 0; height: 56px; pointer-events: none; z-index: 2; }
.fade-top { display: none; }
.fade-bottom { bottom: 0; background: linear-gradient(transparent, #000); }
.channel-row {
  min-height: 72px;
  border: 0;
  border-radius: 18px;
  padding: 8px 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) 24px;
  gap: 14px;
  align-items: center;
  text-align: left;
}
.channel-row:hover { background: rgba(255,255,255,.055); }
.channel-row.is-active { background: transparent; }
.channel-row.is-active .channel-icon { box-shadow: 0 0 0 3px #fff, 0 0 38px rgba(255,255,255,.28); }
.channel-icon { width: 56px; height: 56px; border-radius: 50%; background: #222 center/cover; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.channel-name { display: block; font-size: clamp(15px, 1.2vw, 18px); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-meta { display: block; margin-top: 4px; color: var(--white-60); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.premium-star { color: var(--white-30); display: none; text-align: right; }
.channel-row.is-premium .premium-star { display: inline; }
.empty-state { color: var(--white-60); margin: 24px 0; }

.play-layout {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(24px, 4svh, 44px) clamp(28px, 6vw, 96px);
  background: rgba(26,26,29,.30);
  display: grid;
  grid-template-rows: minmax(180px, 1fr) auto auto auto;
  align-items: center;
  justify-items: center;
  gap: clamp(16px, 2.8svh, 28px);
  overflow: hidden;
}
.premium-label { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); margin: 0; color: var(--white-30); text-transform: uppercase; letter-spacing: .3em; font-weight: 800; display: none; }
.play-layout.is-premium .premium-label { display: block; }
.control-orbit {
  width: min(46svh, 36vw, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-self: end;
}
.category-art {
  width: clamp(148px, 34%, 220px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: #222 center/cover;
  opacity: .72;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 22px 90px rgba(0,0,0,.55);
}
.track-info {
  max-width: min(720px, 100%);
  text-align: center;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.track-info h2 { margin: 0 0 8px; font-size: 15px; font-weight: 900; line-height: 1.3; }
.track-info p { margin: 4px 0; color: var(--white-80); font-size: 11px; font-weight: 500; }
#bg-author { color: var(--white-60); }
.feedback-actions,
.channel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.action-button {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.055);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.action-button:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.action-button:disabled { opacity: .36; cursor: not-allowed; }
.action-button.experimental { color: var(--white-60); }
.feedback-button { min-width: 82px; }
.player-panel {
  width: min(640px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px;
  background: rgba(0,0,0,.24);
  box-shadow: 0 24px 80px rgba(0,0,0,.26);
}
.mode-note,
.player-status {
  min-height: 16px;
  margin: 0;
  color: var(--white-30);
  font-size: 12px;
  text-align: center;
}
.player-status { color: var(--white-60); }
.variant-picker[hidden] { display: none; }
.variant-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white-80);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.variant-picker select {
  max-width: min(360px, 54vw);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 12px;
  background: #101012;
  color: #fff;
}
audio {
  width: min(520px, 100%);
  height: 34px;
  opacity: .78;
  filter: invert(1) hue-rotate(180deg);
}

@media (max-width: 980px) {
  .player-screen { overflow: auto; }
  .app-header { height: auto; align-items: start; }
  .tablet-layout {
    height: auto;
    min-height: calc(100svh - 96px);
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(280px, 38svh) auto;
  }
  .library-tools { grid-column: 1; grid-row: 1; border-right: 0; padding-bottom: 8px; }
  .browser-pane { grid-column: 1; grid-row: 2; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .channel-list { padding-bottom: 40px; }
  .play-layout { grid-column: 1; grid-row: 3; min-height: 620px; }
  .control-orbit { width: min(56vw, 360px); }
}

@media (max-width: 620px) {
  .app-header { grid-template-columns: 1fr; padding-top: 24px; }
  .header-actions { justify-content: flex-start; }
  .tablet-layout { min-height: auto; }
  .login-step h1 { top: 14svh; }
  .field-line { top: calc(14svh + 110px); }
  .form-error { top: calc(14svh + 72px); }
  .next-button { top: 55svh; }
  .channel-row { grid-template-columns: 52px minmax(0,1fr) 22px; }
  .channel-icon { width: 52px; height: 52px; }
  .play-layout { min-height: 640px; padding-inline: 18px; }
  .control-orbit { width: min(78vw, 300px); }
  .category-art { width: 44%; }
  .track-info { letter-spacing: .16em; }
}
