:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(255,255,255,.1);
  --accent: #f97316;
  --accent2: #ef4444;
  --good: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--text);
  min-height: 100vh;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

.header {
  position: sticky;
  top: 0;
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 18px;
  margin: 0 -18px 24px;
  z-index: 10;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 26px;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.muted {
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: bold;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef4444;
}

.status.live .dot {
  background: var(--good);
}

.status.live {
  color: #86efac;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.language-buttons {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.language-button {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: rgba(17,24,39,.9);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
}

.language-button:active {
  transform: scale(.99);
}

.caption-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 4px;
}

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: white;
  background: #334155;
  font-weight: bold;
  cursor: pointer;
}

.audio-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.28);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
}

.audio-status {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.audio-button {
  width: auto;
  min-width: 140px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.audio-button.enabled {
  background: #334155;
}

.caption-list {
  display: block;
  background: rgba(17,24,39,.72);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
}

.transcript-block {
  padding: 4px 0;
}

.transcript-block-live {
  background: rgba(249,115,22,.10);
  border: 1px solid rgba(249,115,22,.22);
  border-radius: 18px;
  padding: 14px;
  margin-top: 12px;
}

.transcript-block-live .transcript-time {
  color: #fdba74;
}

.transcript-time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.transcript-text {
  margin: 0;
  font-size: 24px;
  line-height: 1.55;
  font-weight: 700;
}

.transcript-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.empty {
  color: var(--muted);
  text-align: center;
  margin-top: 32px;
  line-height: 1.5;
}

.caption-empty {
  margin-top: 80px;
}

@media (max-width: 520px) {
  .transcript-text {
    font-size: 21px;
  }

  .caption-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .caption-list {
    padding: 18px;
  }

  .audio-box {
    align-items: stretch;
    flex-direction: column;
  }

  .audio-button {
    width: 100%;
  }
}

.inactive-session-box {
  background: rgba(17,24,39,.86);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  margin-top: 18px;
}

.inactive-session-message {
  font-size: 24px;
  line-height: 1.5;
  font-weight: 800;
  margin-top: 8px;
}


.sticky-audio {
  position: sticky;
  top: 10px;
  z-index: 20;
  backdrop-filter: blur(14px);
}

.bottom-language-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.bottom-language-bar button {
  width: 100%;
  border-radius: 999px;
  padding: 14px 16px;
  background: #334155;
  color: white;
  font-weight: 900;
}

.caption-list {
  margin-bottom: 90px;
}

#activeSessionContent {
  padding-bottom: 90px;
}

.language-screen-footer-message {
  margin-top: 22px;
  background: rgba(17,24,39,.72);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.language-screen-footer-message a {
  color: #fdba74;
  font-weight: 900;
  text-decoration: none;
}

.language-screen-footer-message a:hover {
  text-decoration: underline;
}


.audio-reminder-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.audio-reminder-card {
  width: 100%;
  max-width: 430px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.audio-reminder-card h2 {
  margin-top: 4px;
  font-size: 26px;
}

.audio-reminder-card p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}

.audio-reminder-card .audio-button {
  width: 100%;
  margin-top: 12px;
}

.audio-reminder-cancel {
  width: 100%;
  margin-top: 10px;
  background: #334155;
}



.audio-reminder-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
  background: rgba(2, 6, 23, 0.78) !important;
  backdrop-filter: blur(10px);
}

.audio-reminder-card {
  width: 100%;
  max-width: 430px;
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.audio-reminder-card h2 {
  margin: 4px 0 12px;
  font-size: 26px;
}

.audio-reminder-card p {
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 18px;
}

.audio-reminder-card .audio-button {
  width: 100%;
  margin-top: 12px;
}

.audio-reminder-cancel {
  width: 100%;
  margin-top: 10px;
  background: #334155;
}

