/* ============================================================
   AI Debate Arena — Full UI v6
   Left-right layout, enhanced visuals, glassmorphism
   ============================================================ */

:root {
  --bg: #050508;
  --bg-deep: #020204;
  --emerald: #34d399;
  --emerald-dim: rgba(52,211,153,.15);
  --cyan: #06b6d4;
  --red: #ef4444;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --text: #e2e8f0;
  --dim: #64748b;
  --border: #1e293b;
  --glass: rgba(15,20,30,.65);
  --glass-border: rgba(255,255,255,.06);
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --serif: 'Noto Serif SC', 'Georgia', serif;
  --sidebar-w: 340px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 15px;
}

::selection { background: var(--emerald); color: #000; }

/* disabled vignette and scanline for cleaner look */
body::before { display: none; }

.vignette { display: none; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(52,211,153,.35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(52,211,153,.55); }

/* ======================== MAIN LAYOUT ======================== */
.main-layout {
  display: flex;
  min-height: 100vh;
}

/* ======================== LEFT INTRO PANEL ======================== */
.intro-panel {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  min-height: 100vh;
  position: sticky;
  top: 0;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(170deg, rgba(52,211,153,.04) 0%, transparent 40%),
    linear-gradient(190deg, transparent 60%, rgba(6,182,212,.03) 100%),
    var(--bg-deep);
  overflow-y: auto;
  z-index: 10;
}

.intro-panel::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(52,211,153,.25) 30%,
    rgba(52,211,153,.25) 70%,
    transparent 100%
  );
  z-index: 1;
}

.intro-content {
  padding: 48px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.intro-badge {
  display: inline-block;
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(251,191,36,.25);
  padding: 4px 14px;
  margin-bottom: 24px;
  width: fit-content;
  background: rgba(251,191,36,.04);
  font-family: var(--mono);
}

.intro-title {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 18px;
  letter-spacing: .04em;
}
.intro-title span {
  color: var(--emerald);
  text-shadow: 0 0 20px rgba(52,211,153,.2);
}

.intro-desc {
  font-family: var(--serif);
  font-size: .88rem;
  line-height: 1.9;
  color: var(--dim);
  margin-bottom: 8px;
}

.intro-divider {
  height: 1px;
  margin: 22px 0;
  background: linear-gradient(90deg, rgba(52,211,153,.2), transparent 80%);
}

.intro-section {
  margin-bottom: 4px;
}

.intro-section-title {
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--text);
  margin-bottom: 14px;
  font-weight: 400;
}

.intro-steps {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

.intro-steps li {
  counter-increment: step;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--dim);
  padding-left: 28px;
  position: relative;
}

.intro-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem;
  border: 1px solid rgba(52,211,153,.3);
  color: var(--emerald);
  border-radius: 2px;
}

.physicist-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.physicist-tag {
  font-size: .75rem;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.06);
  color: var(--dim);
  background: rgba(255,255,255,.02);
  transition: all .25s;
  cursor: default;
}

.physicist-tag:hover {
  border-color: rgba(52,211,153,.25);
  color: var(--emerald);
  background: rgba(52,211,153,.04);
}

.intro-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.04);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-footer strong {
  color: var(--emerald);
  font-weight: 400;
}

/* ======================== RIGHT MAIN CONTENT ======================== */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ======================== HEADER ======================== */
.site-hdr {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  background: rgba(5,5,8,.88);
  backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between;
}

.back-btn {
  color: var(--dim); text-decoration: none;
  font-size: .78rem; letter-spacing: .15em; text-transform: uppercase;
  border: 1px solid #374151; padding: 6px 18px;
  position: relative; transition: all .25s;
  font-family: var(--mono);
}
.back-btn::before, .back-btn::after {
  content: ''; position: absolute; width: 6px; height: 6px;
  border-color: var(--emerald); border-style: solid;
  transition: border-color .25s;
}
.back-btn::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.back-btn::after  { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.back-btn:hover {
  color: var(--emerald); border-color: var(--emerald);
  text-shadow: 0 0 8px rgba(52,211,153,.5);
}

.hdr-title {
  font-size: .82rem; letter-spacing: .14em;
  color: var(--dim); text-transform: uppercase; text-align: center; flex: 1;
  font-family: var(--mono);
}
.hdr-title span {
  color: var(--emerald); text-shadow: 0 0 8px rgba(52,211,153,.3);
}

/* ======================== HUD CORNERS ======================== */
.hud {
  position: relative;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 2px;
  transition: border-color .3s, box-shadow .3s;
}
.hud:hover {
  border-color: rgba(52,211,153,.12);
  box-shadow: 0 0 30px rgba(52,211,153,.03);
}
.hud::before, .hud::after {
  content: ''; position: absolute; width: 10px; height: 10px; pointer-events: none;
  transition: border-color .3s;
}
.hud::before { top: -1px; left: -1px; border-top: 1.5px solid var(--emerald); border-left: 1.5px solid var(--emerald); }
.hud::after  { bottom: -1px; right: -1px; border-bottom: 1.5px solid var(--emerald); border-right: 1.5px solid var(--emerald); }

/* ======================== SETUP PANEL ======================== */
.setup-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 28px 60px;
  display: flex; flex-direction: column; gap: 24px;
  animation: panelFadeIn .5s ease;
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.setup-block {
  padding: 0;
}

.block-label {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dim);
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-family: var(--mono);
}
.block-label .accent, .accent {
  color: var(--emerald);
}

.block-body {
  padding: 24px;
}

.field-label {
  display: block;
  font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.tag-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}

/* ======================== VS LAYOUT ======================== */
.vs-row {
  display: flex; align-items: flex-start; gap: 20px;
}
.vs-col { flex: 1; }
.vs-badge {
  flex-shrink: 0; align-self: center;
  margin-top: 18px;
  font-size: 1.2rem; font-weight: 700; letter-spacing: .2em;
  color: var(--red);
  text-shadow: 0 0 16px rgba(239,68,68,.25);
  animation: vsPulse 2s ease-in-out infinite;
}

@keyframes vsPulse {
  0%, 100% { text-shadow: 0 0 16px rgba(239,68,68,.25); }
  50%      { text-shadow: 0 0 24px rgba(239,68,68,.4); }
}

.physicist-meta {
  font-size: .8rem; color: var(--dim); margin-top: 8px; min-height: 1.8rem;
}

/* ======================== INPUTS ======================== */
.t-input {
  width: 100%;
  padding: 12px 18px;
  border: 1px solid rgba(52,211,153,.18);
  background: rgba(5,5,8,.6);
  color: var(--emerald);
  font-family: var(--serif);
  font-size: .95rem;
  outline: none;
  transition: all .3s;
  border-radius: 2px;
}
.t-input:focus {
  border-color: rgba(52,211,153,.5);
  box-shadow: 0 0 20px rgba(52,211,153,.08), inset 0 0 12px rgba(52,211,153,.03);
}
.t-input::placeholder { color: rgba(52,211,153,.2); }
select.t-input { color: var(--text); cursor: pointer; }
select.t-input option { background: #0a0a0f; color: var(--text); }

/* ======================== TAGS ======================== */
.tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,.08);
  font-size: .8rem; letter-spacing: .04em;
  color: var(--dim); cursor: pointer;
  transition: all .25s;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.tag::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(6,182,212,.06), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.tag:hover::before { opacity: 1; }
.tag:hover {
  border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 0 12px rgba(6,182,212,.08);
}

/* ======================== BUTTONS ======================== */
.t-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  border: 1px solid rgba(52,211,153,.3);
  color: var(--emerald);
  font-family: var(--serif);
  font-size: .88rem; letter-spacing: .1em;
  cursor: pointer; background: transparent;
  transition: all .3s; position: relative; overflow: hidden;
  border-radius: 2px;
}
.t-btn::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(52,211,153,.1), transparent);
  transition: left .5s;
}
.t-btn:hover::before { left: 100%; }
.t-btn:hover {
  background: rgba(52,211,153,.08);
  box-shadow: 0 0 24px rgba(52,211,153,.1);
  border-color: rgba(52,211,153,.55);
}
.t-btn:active { transform: scale(.98); }
.t-btn:disabled { opacity: .3; cursor: not-allowed; }

.t-btn.cyan { border-color: rgba(6,182,212,.35); color: var(--cyan); }
.t-btn.cyan:hover {
  background: rgba(6,182,212,.08);
  box-shadow: 0 0 24px rgba(6,182,212,.1);
  border-color: var(--cyan);
}
.t-btn.red { border-color: rgba(239,68,68,.25); color: #f87171; }
.t-btn.red:hover { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.5); }
.t-btn.dim { border-color: rgba(255,255,255,.1); color: var(--dim); }
.t-btn.dim:hover { border-color: rgba(255,255,255,.25); color: var(--text); }

.t-btn.accent-btn {
  border-color: rgba(251,191,36,.3);
  color: var(--amber);
}
.t-btn.accent-btn:hover {
  background: rgba(251,191,36,.06);
  border-color: rgba(251,191,36,.5);
  box-shadow: 0 0 20px rgba(251,191,36,.08);
}

.start-btn {
  width: 100%; justify-content: center;
  padding: 16px 24px;
  font-size: 1rem; letter-spacing: .12em;
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(6,182,212,.06), rgba(52,211,153,.06));
}
.start-btn:hover {
  background: linear-gradient(135deg, rgba(6,182,212,.12), rgba(52,211,153,.12));
}

/* ======================== RANGE SLIDER ======================== */
input[type=range] {
  width: 100%; height: 4px; appearance: none;
  background: rgba(255,255,255,.06); outline: none;
  border-radius: 2px;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px;
  background: var(--emerald); border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 12px rgba(52,211,153,.4);
  transition: box-shadow .2s;
}
input[type=range]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 20px rgba(52,211,153,.6);
}

/* ======================== DEBATE PANEL ======================== */
.debate-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 28px 120px;
  animation: panelFadeIn .4s ease;
}

.debate-topic-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.topic-label {
  font-size: .72rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--dim);
  font-family: var(--mono);
}
.topic-text {
  font-family: var(--serif);
  font-size: 1.15rem; margin-top: 4px; line-height: 1.5;
}
.round-badge {
  font-size: .82rem; letter-spacing: .12em; color: var(--dim);
  border: 1px solid rgba(255,255,255,.06);
  padding: 6px 16px;
  white-space: nowrap;
  background: rgba(255,255,255,.02);
}

/* ======================== PHYSICIST CARDS ======================== */
.physicist-cards {
  display: flex; gap: 16px;
  margin: 20px 0 24px;
}

.p-card {
  flex: 1;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(8px);
  position: relative; transition: all .35s;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-radius: 2px;
}
.p-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; transition: box-shadow .35s;
}
.p-card.side-a::before { background: var(--blue); box-shadow: 0 0 8px rgba(96,165,250,.2); }
.p-card.side-b::before { background: var(--red); box-shadow: 0 0 8px rgba(239,68,68,.2); }
.p-card.side-a:hover {
  border-color: rgba(96,165,250,.2);
  box-shadow: 0 0 30px rgba(96,165,250,.06), inset 0 0 20px rgba(96,165,250,.02);
}
.p-card.side-b:hover {
  border-color: rgba(239,68,68,.2);
  box-shadow: 0 0 30px rgba(239,68,68,.06), inset 0 0 20px rgba(239,68,68,.02);
}

.p-card-inner { display: flex; flex-direction: column; gap: 4px; }
.p-card-name {
  font-family: var(--serif);
  font-size: 1.1rem;
}
.p-card-era  { font-size: .8rem; color: var(--dim); }
.p-card-provider {
  font-size: .7rem; letter-spacing: .12em;
  padding: 4px 12px;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--dim);
  background: rgba(255,255,255,.02);
  font-family: var(--mono);
}

/* ======================== DIALOGUE ======================== */
.dialogue-area {
  min-height: 240px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}

/* bubbles */
.bub { animation: fadeUp .35s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bub-a .bub-text {
  background: rgba(96,165,250,.05);
  border: 1px solid rgba(96,165,250,.12);
  border-left: 3px solid var(--blue);
}
.bub-b .bub-text {
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.12);
  border-left: 3px solid var(--red);
}
.bub-host .bub-text {
  background: rgba(52,211,153,.05);
  border: 1px solid rgba(52,211,153,.12);
  border-left: 3px solid var(--emerald);
}

.bub-text {
  padding: 16px 22px;
  font-family: var(--serif);
  font-size: .98rem;
  line-height: 1.9;
  word-break: break-word;
  border-radius: 2px;
}

.typing::after {
  content: '\u258C'; animation: blink .7s infinite; color: var(--emerald);
}
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* speaker name above bubble */
.bub .text-blue-400 { color: var(--blue) !important; }
.bub .text-red-400  { color: var(--red) !important; }

/* divider */
.rd {
  display: flex; align-items: center; gap: 1rem;
  margin: 28px 0;
  color: var(--dim);
  font-size: .75rem; letter-spacing: .18em; text-transform: uppercase;
}
.rd::before, .rd::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}

/* ======================== CONTROL BAR ======================== */
.ctrl-bar {
  position: fixed; bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  background: rgba(5,5,8,.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  padding: 14px 28px;
  display: flex; align-items: center; gap: 12px;
  z-index: 100;
}
.ctrl-next { flex-shrink: 0; }
.ctrl-input-wrap { flex: 1; display: flex; gap: 10px; }
.ctrl-input { flex: 1; font-size: .92rem; }
.ctrl-send  { flex-shrink: 0; }
.ctrl-actions { display: flex; gap: 10px; flex-shrink: 0; }
.ctrl-reply-sel { width: auto; min-width: 120px; flex-shrink: 0; font-size: .82rem; padding: 8px 12px; }

/* ======================== SUMMARY ======================== */
.summary-wrap {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 28px 120px;
}

.sum-card {
  background: var(--glass);
  border: 1px solid rgba(52,211,153,.12);
  backdrop-filter: blur(8px);
  position: relative;
  padding: 28px;
  border-radius: 2px;
}
.sum-card::before, .sum-card::after {
  content: ''; position: absolute; width: 10px; height: 10px; pointer-events: none;
}
.sum-card::before { top: -1px; left: -1px; border-top: 1.5px solid var(--emerald); border-left: 1.5px solid var(--emerald); }
.sum-card::after  { bottom: -1px; right: -1px; border-bottom: 1.5px solid var(--emerald); border-right: 1.5px solid var(--emerald); }

.sum-label {
  font-size: .85rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--emerald); margin-bottom: 18px;
  font-family: var(--mono);
}
.sum-body {
  font-family: var(--serif);
  font-size: 1rem; line-height: 2;
  white-space: pre-wrap; color: var(--text);
}

/* ======================== LOADING ======================== */
.ld-overlay {
  position: fixed; inset: 0;
  background: rgba(5,5,8,.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(6px);
}
.ld-spin {
  width: 36px; height: 36px;
  border: 2px solid rgba(255,255,255,.06);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ld-text {
  margin-top: 16px;
  font-size: .82rem; letter-spacing: .12em; color: var(--dim);
  font-family: var(--mono);
}

/* ======================== THEME TOGGLE ======================== */
#theme-toggle {
  position: fixed; top: 8px; right: 6px; z-index: 200;
  font-family: var(--serif);
  font-size: .7rem; letter-spacing: .1em;
  border: 1px solid rgba(52,211,153,.4);
  color: var(--emerald);
  padding: 6px 14px;
  background: rgba(0,0,0,.5);
  cursor: pointer; transition: all .3s;
  display: inline-flex; align-items: center; gap: 6px;
  backdrop-filter: blur(6px);
  border-radius: 2px;
}
#theme-toggle:hover {
  background: rgba(52,211,153,.12);
  box-shadow: 0 0 14px rgba(52,211,153,.25);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .main-layout { flex-direction: column; }
  .intro-panel {
    width: 100%;
    min-width: 100%;
    min-height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .intro-panel::before { display: none; }
  .intro-content { padding: 32px 20px 28px; }
  .intro-title { font-size: 1.3rem; }
  .ctrl-bar { left: 0; }
  .debate-wrap, .summary-wrap { padding-left: 16px; padding-right: 16px; }
  .setup-wrap { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 600px) {
  .vs-row { flex-direction: column; gap: 12px; }
  .vs-badge { align-self: center; margin-top: 4px; }
  .physicist-cards { flex-direction: column; }
  .ctrl-bar { padding: 10px 12px; flex-wrap: wrap; }
  .ctrl-actions { flex-wrap: wrap; }
}

/* ======================== LIGHT THEME ======================== */
body.light-theme { background: #f5f5f0; color: #1a1a1a; }
body.light-theme::before { opacity: 0 !important; }
body.light-theme .vignette { opacity: 0; }
body.light-theme::selection { background: #059669; color: #fff; }
body.light-theme ::-webkit-scrollbar-track { background: #e5e5e0; }
body.light-theme ::-webkit-scrollbar-thumb { background: rgba(5,150,105,.4); }

body.light-theme .intro-panel {
  background: linear-gradient(170deg, rgba(5,150,105,.04) 0%, transparent 40%), #fafaf7;
  border-right-color: rgba(0,0,0,.08);
}
body.light-theme .intro-panel::before {
  background: linear-gradient(180deg, transparent 0%, rgba(5,150,105,.15) 30%, rgba(5,150,105,.15) 70%, transparent 100%);
}
body.light-theme .intro-badge { color: #b45309; border-color: rgba(180,83,9,.2); background: rgba(180,83,9,.04); }
body.light-theme .intro-title { color: #1a1a1a; }
body.light-theme .intro-title span { color: #059669; text-shadow: none; }
body.light-theme .intro-desc { color: #6b7280; }
body.light-theme .intro-divider { background: linear-gradient(90deg, rgba(5,150,105,.15), transparent 80%); }
body.light-theme .intro-section-title { color: #374151; }
body.light-theme .intro-steps li { color: #6b7280; }
body.light-theme .intro-steps li::before { border-color: rgba(5,150,105,.3); color: #059669; }
body.light-theme .physicist-tag { border-color: rgba(0,0,0,.06); color: #6b7280; background: rgba(0,0,0,.02); }
body.light-theme .physicist-tag:hover { border-color: rgba(5,150,105,.25); color: #059669; }
body.light-theme .intro-footer { border-top-color: rgba(0,0,0,.06); color: #9ca3af; }
body.light-theme .intro-footer strong { color: #059669; }

body.light-theme .site-hdr { background: rgba(245,245,240,.92); border-color: rgba(0,0,0,.08); }
body.light-theme .back-btn { border-color: rgba(0,0,0,.12); color: #6b7280; }
body.light-theme .back-btn::before, body.light-theme .back-btn::after { border-color: #059669; }
body.light-theme .back-btn:hover { color: #059669; border-color: #059669; }
body.light-theme .hdr-title { color: #9ca3af; }
body.light-theme .hdr-title span { color: #059669; text-shadow: none; }

body.light-theme .hud { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.08); }
body.light-theme .hud:hover { border-color: rgba(5,150,105,.12); box-shadow: 0 0 20px rgba(5,150,105,.04); }
body.light-theme .hud::before { border-color: #059669; }
body.light-theme .hud::after  { border-color: #059669; }
body.light-theme .block-label { border-bottom-color: rgba(0,0,0,.04); }

body.light-theme .p-card { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.06); }
body.light-theme .p-card.side-a::before { box-shadow: none; }
body.light-theme .p-card.side-b::before { box-shadow: none; }

body.light-theme .bub-a .bub-text { background: rgba(37,99,235,.04); border-color: rgba(37,99,235,.12); border-left-color: #2563eb; }
body.light-theme .bub-b .bub-text { background: rgba(220,38,38,.04); border-color: rgba(220,38,38,.12); border-left-color: #dc2626; }
body.light-theme .bub-host .bub-text { background: rgba(5,150,105,.04); border-color: rgba(5,150,105,.12); border-left-color: #059669; }

body.light-theme .t-btn { border-color: rgba(5,150,105,.3); color: #059669; }
body.light-theme .t-btn:hover { background: rgba(5,150,105,.06); border-color: rgba(5,150,105,.5); }
body.light-theme .t-btn.cyan { border-color: rgba(8,145,178,.3); color: #0891b2; }
body.light-theme .t-btn.dim { border-color: rgba(0,0,0,.1); color: #9ca3af; }
body.light-theme .t-btn.accent-btn { border-color: rgba(180,83,9,.25); color: #b45309; }
body.light-theme .t-btn.accent-btn:hover { background: rgba(180,83,9,.04); border-color: rgba(180,83,9,.4); }

body.light-theme .t-input { background: rgba(255,255,255,.85); border-color: rgba(5,150,105,.18); color: #065f46; }
body.light-theme .t-input:focus { border-color: rgba(5,150,105,.45); box-shadow: 0 0 10px rgba(5,150,105,.06); }
body.light-theme .t-input::placeholder { color: rgba(5,150,105,.25); }
body.light-theme select.t-input { color: #1a1a1a; }

body.light-theme .tag { border-color: rgba(0,0,0,.08); color: #6b7280; }
body.light-theme .tag:hover { border-color: #0891b2; color: #0891b2; background: rgba(8,145,178,.04); }

body.light-theme .ctrl-bar { background: rgba(245,245,240,.92); border-color: rgba(0,0,0,.08); }
body.light-theme .round-badge { border-color: rgba(0,0,0,.06); background: rgba(0,0,0,.02); }
body.light-theme .rd { color: #9ca3af; }

body.light-theme .sum-card { background: rgba(255,255,255,.75); border-color: rgba(5,150,105,.12); }
body.light-theme .sum-card::before, body.light-theme .sum-card::after { border-color: #059669; }

body.light-theme #theme-toggle { background: rgba(255,255,255,.7); border-color: rgba(5,150,105,.35); color: #059669; }
body.light-theme #theme-toggle:hover { background: rgba(236,253,245,.9); }
body.light-theme .ld-overlay { background: rgba(245,245,240,.88); }

body.light-theme .accent { color: #059669; }
body.light-theme .field-label { color: #6b7280; }
body.light-theme .physicist-meta { color: #6b7280; }
body.light-theme .topic-label { color: #9ca3af; }
body.light-theme .p-card-era { color: #6b7280; }
body.light-theme .p-card-provider { border-color: rgba(0,0,0,.06); color: #6b7280; background: rgba(0,0,0,.02); }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 768px) {
  .site-hdr { padding: 10px 16px; }
  .hdr-title { font-size: .72rem; }
  .setup-wrap { padding: 24px 12px 48px; }
  .block-body { padding: 16px; }
  .vs-row { flex-direction: column; gap: 12px; }
  .vs-badge { align-self: center; margin-top: 0; }
  .physicist-cards { flex-direction: column !important; }
  .ctrl-bar { flex-wrap: wrap; padding: 10px 12px; }
  .ctrl-bar > * { width: 100%; }
  .ctrl-actions { width: auto; }
  .ctrl-next { width: auto; }
  .debate-topic-bar { flex-direction: column; gap: 10px; align-items: flex-start; }
}