:root {
  --bg: #07070b;
  --fg: #e8e8ee;
  --fg-dim: #9b9bab;
  --accent: #b39bff;
  --accent-strong: #d8caff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; width: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fluid gradient backdrop ---------- */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #11121a 0%, #0a0a10 70%, #07070b 100%);
}

.fluid {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px) saturate(1.1);
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
}
.fluid.blue {
  width: 70vmin; height: 70vmin;
  left: 50%; top: 50%;
  margin: -35vmin 0 0 -35vmin;
  background: radial-gradient(circle, oklch(0.62 0.17 256) 0%, oklch(0.30 0.12 261 / 0) 72%);
  animation: drift1 26s ease-in-out infinite;
}
.fluid.violet {
  width: 66vmin; height: 66vmin;
  left: 50%; top: 50%;
  margin: -33vmin 0 0 -33vmin;
  background: radial-gradient(circle, oklch(0.58 0.19 330) 0%, oklch(0.28 0.14 320 / 0) 72%);
  animation: drift2 34s ease-in-out infinite;
}
.fluid.accent {
  width: 42vmin; height: 42vmin;
  left: 50%; top: 50%;
  margin: -21vmin 0 0 -21vmin;
  opacity: 0.5;
  background: radial-gradient(circle, oklch(0.70 0.18 293) 0%, oklch(0.30 0.12 283 / 0) 72%);
  animation: drift3 42s ease-in-out infinite;
}
@keyframes drift1 {
  0%,100% { transform: translate(-22vmin,-14vmin) scale(1); }
  50%     { transform: translate(20vmin, 12vmin) scale(1.1); }
}
@keyframes drift2 {
  0%,100% { transform: translate(20vmin, 16vmin) scale(1.05); }
  50%     { transform: translate(-22vmin,-12vmin) scale(0.95); }
}
@keyframes drift3 {
  0%,100% { transform: translate(2vmin,-4vmin) scale(1); }
  50%     { transform: translate(-12vmin,12vmin) scale(1.12); }
}

/* ---------- Card ---------- */
.card {
  position: relative;
  width: min(640px, 92vw);
  max-height: 92vh;
  padding: 28px 32px 24px;
  border-radius: 24px;
  background: rgba(20, 20, 28, 0.6);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.brand .logo { color: var(--accent); font-size: 10px; line-height: 1; }
.brand .name { font-weight: 600; letter-spacing: 0.04em; }
.brand .subname { color: var(--fg-dim); font-size: 12px; }

/* ---------- Player ---------- */
.player { display: flex; flex-direction: column; gap: 10px; }
.now-playing .np-role {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.np-title {
  font-size: 22px; font-weight: 600; line-height: 1.3;
  min-height: 1.3em;
}
.np-meta { color: var(--fg-dim); font-size: 13px; min-height: 1.2em; }

.progress {
  width: 100%; height: 4px; background: rgba(255,255,255,0.08);
  border-radius: 99px; overflow: hidden; cursor: pointer;
}
.progress-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.1s linear;
}
.time-row {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--fg-dim); font-variant-numeric: tabular-nums;
}

.controls { display: flex; justify-content: center; padding: 8px 0; }
.btn-play {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--fg); color: #111; font-size: 20px; cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.1s, background 0.2s;
}
.btn-play:hover:not(:disabled) { transform: scale(1.05); }
.btn-play:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Transcript ---------- */
.transcript {
  flex: 1; min-height: 100px; max-height: 280px; overflow-y: auto;
  padding: 4px 0;
  font-size: 14px; line-height: 1.65;
  scrollbar-width: thin;
}
.transcript::-webkit-scrollbar { width: 4px; }
.transcript::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.transcript .empty { color: var(--fg-dim); font-style: italic; text-align: center; }
.tx-line {
  padding: 6px 8px; border-radius: 8px;
  color: var(--fg-dim); transition: color 0.2s, background 0.2s;
}
.tx-line.active { color: var(--fg); background: rgba(179, 155, 255, 0.12); }
.tx-line.song { color: var(--accent); font-style: italic; }
.tx-line.song.active { color: var(--accent-strong); background: rgba(179, 155, 255, 0.18); }
.tx-who { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--fg-dim); margin-right: 8px; }

/* ---------- Actions ---------- */
.actions { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.btn-generate {
  padding: 10px 24px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(179, 155, 255, 0.1); color: var(--fg);
  font-size: 13px; cursor: pointer; transition: background 0.2s;
}
.btn-generate:hover:not(:disabled) { background: rgba(179, 155, 255, 0.2); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }
.status { font-size: 12px; color: var(--fg-dim); min-height: 1em; text-align: center; }
.status.error { color: #f88; }
