/* Barnsley Bright Nights - Simplified, High-Clarity Live Subtitles Styles */
:root {
  --bg-dark: #0b0806;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-active: rgba(234, 166, 82, 0.14);
  --cream: #f8f3ea;
  --cream-dim: #b9ae9e;
  --cream-faint: #7c7265;
  --amber: #eaa652;
  --amber-bright: #ffd48a;
  --green: #4cd97b;
  --line: rgba(248, 243, 234, 0.12);
  --font-scale: 1;
}

body.font-md { --font-scale: 1; }
body.font-lg { --font-scale: 1.25; }
body.font-xl { --font-scale: 1.5; }

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-dark);
  color: var(--cream);
  font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Minimal Top Bar */
.live-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 8, 6, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rose-crest {
  width: 30px;
  height: 30px;
  color: var(--amber);
  flex-shrink: 0;
}

.show-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  line-height: 1.1;
  color: var(--cream);
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: #8bf0ab;
  font-weight: 600;
  font-size: 12.5px;
}

.sync-pill.waiting,
.sync-pill.paused {
  color: var(--amber-bright);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: livePulse 1.8s infinite ease-in-out;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.text-size-btn {
  appearance: none;
  background: rgba(248, 243, 234, 0.08);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.text-size-btn strong {
  color: var(--amber-bright);
}

.progress-track {
  height: 3px;
  background: rgba(248, 243, 234, 0.08);
}

.progress-fill {
  height: 100%;
  background: var(--amber);
  transition: width 0.25s linear;
}

/* Standby / Paused Notice Banner */
.notice-banner {
  background: rgba(234, 166, 82, 0.15);
  border-bottom: 1px solid rgba(234, 166, 82, 0.35);
  padding: 12px 16px;
  text-align: center;
}

.notice-inner {
  max-width: 680px;
  margin: 0 auto;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--amber-bright);
  font-weight: 600;
}

/* Main Subtitles Stream */
.transcript-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px 130px;
}

.loading-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--cream-dim);
  font-size: 16px;
}

.scene-block {
  margin-bottom: 32px;
}

.scene-title {
  font-size: calc(13px * var(--font-scale));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.scene-block:first-child .scene-title {
  margin-top: 0;
}

/* Clean, High-Legibility Subtitle Lines */
.line-card {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-left: 4px solid transparent;
  transition: background-color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.line-card.past {
  opacity: 0.42;
}

.line-card.upcoming {
  opacity: 0.72;
}

.line-card.active {
  opacity: 1;
  background: var(--card-active);
  border-left-color: var(--amber);
}

.line-text {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: calc(22px * var(--font-scale));
  line-height: 1.45;
  color: var(--cream);
  font-weight: 450;
}

.line-card.active .line-text {
  font-weight: 600;
  color: #ffffff;
}

.line-card.song-lyric .line-text {
  color: #ffe3b3;
}

/* Word-by-word highlight inside the active subtitle line */
.t-word {
  border-radius: 4px;
  padding: 0 1px;
  transition: color 0.1s ease, background-color 0.1s ease;
}

.line-card.active .t-word.current-word {
  color: var(--amber-bright);
  background: rgba(234, 166, 82, 0.26);
}

/* Return to Live Floating Pill */
.return-live-pill {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  appearance: none;
  background: var(--amber);
  color: #140e08;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

/* Clean Single-Button Audio Dock at Bottom */
.audio-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(11, 8, 6, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
}

.audio-dock-inner {
  max-width: 680px;
  margin: 0 auto;
}

.headphone-btn {
  width: 100%;
  appearance: none;
  background: rgba(234, 166, 82, 0.16);
  border: 1.5px solid var(--amber);
  color: var(--cream);
  border-radius: 999px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.headphone-btn.playing {
  background: rgba(76, 217, 123, 0.2);
  border-color: var(--green);
  color: #ffffff;
}

.hp-icon {
  font-size: 20px;
  line-height: 1;
}

/* Minimal Footer */
.live-footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--cream-faint);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.live-footer a {
  color: var(--cream-dim);
  text-decoration: none;
}
