/* ═══════════════════════════════════════════════════════════════════════════
   GERICHTSSAAL – QUIZ-TOOL  |  Schritt 3: Design
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── @font-face ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/playfair-display-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/playfair-display-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('fonts/lora-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('fonts/lato-latin-300-normal.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('fonts/lato-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('fonts/lato-latin-700-normal.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Courier Prime';
  src: url('fonts/courier-prime-latin-400-normal.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Farben */
  --bg:               #150A05;
  --surface:          #2A1208;
  --surface-alt:      #3D1E0D;
  --surface-border:   #5A2E12;
  --bordeaux:         #6B1D1D;
  --bordeaux-light:   #8B2525;
  --bordeaux-dark:    #4A1212;
  --gold:             #C9A84C;
  --gold-light:       #E8C56B;
  --gold-dark:        #9A7A2E;
  --parchment:        #F5E6C8;
  --parchment-light:  #FDF3E3;
  --muted:            #8A7060;
  --muted-light:      #A89070;
  --correct:          #1E4A2A;
  --correct-text:     #5EC97A;
  --wrong:            #4A1212;
  --wrong-text:       #F47070;
  --navy:             #0F1E38;
  --forest:           #0F2B1A;
  --amber:            #2E1A08;

  /* Schriften */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      'Lato', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'Courier Prime', 'Courier New', Courier, monospace;

  /* Abstände */
  --radius:    10px;
  --radius-lg: 14px;
  --gap:       1.1rem;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ───────────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  /* Holzmaserung-Effekt */
  background-image:
    repeating-linear-gradient(
      87deg,
      transparent 0px, transparent 3px,
      rgba(0,0,0,0.08) 3px, rgba(0,0,0,0.08) 4px
    ),
    repeating-linear-gradient(
      179deg,
      transparent 0px, transparent 12px,
      rgba(201,168,76,0.03) 12px, rgba(201,168,76,0.03) 13px
    );
  color: var(--parchment);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Site Header ────────────────────────────────────────────────────────── */
.site-header {
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(135deg, #1A0A04 0%, #2E1208 50%, #1A0A04 100%);
  border-bottom: 2px solid var(--gold-dark);
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
  position: relative;
}

/* Goldfaden oben */
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
}

.site-title {
  text-align: center;
  line-height: 1.2;
}

.title-main {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.title-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--muted-light);
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

.header-ornament {
  font-size: 1.6rem;
  color: var(--gold);
  opacity: 0.75;
  user-select: none;
  line-height: 1;
}

/* ── Screens wrap ───────────────────────────────────────────────────────── */
.screens-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  position: relative;
}

/* ── Screens ────────────────────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%;
  max-width: 660px;
  flex-direction: column;
  align-items: center;
  gap: var(--gap);
}

.screen.active {
  display: flex;
  margin: auto;
  animation: screenIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}

h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold-light);
  letter-spacing: 0.03em;
}

.label {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.muted {
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Goldene Trennlinie */
.gold-rule {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dark), transparent);
  border: none;
  margin: 0.5rem 0;
}

/* ── Room Code ──────────────────────────────────────────────────────────── */
.room-code-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 2rem;
  width: 100%;
  /* Pergament-Vignette */
  box-shadow: inset 0 0 30px rgba(201,168,76,0.04), 0 2px 12px rgba(0,0,0,0.4);
}

.big-code {
  font-family: var(--font-mono);
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--gold-light);
  text-shadow: 0 0 20px rgba(232,197,107,0.3);
  margin-top: 0.25rem;
}

/* ── QR ─────────────────────────────────────────────────────────────────── */
.qr-img {
  width: 172px;
  height: 172px;
  border: 3px solid var(--gold-dark);
  border-radius: var(--radius);
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.small-url {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
}

/* ── Player List ────────────────────────────────────────────────────────── */
.player-list-box {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.player-list-box ul {
  list-style: none;
  margin-top: 0.6rem;
}

.player-list-box li {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--parchment);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(90,46,18,0.4);
}
.player-list-box li:last-child { border-bottom: none; }
.player-list-box li::before {
  content: '· ';
  color: var(--gold-dark);
}

/* ── Story Details ──────────────────────────────────────────────────────── */
.story-details {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  cursor: pointer;
}

.story-details summary {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  list-style: none;
  user-select: none;
}
.story-details summary::before { content: '▶  '; font-size: 0.65rem; }
.story-details[open] summary::before { content: '▼  '; }

.story-text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--parchment-light);
  line-height: 1.7;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(90,46,18,0.4);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.15s ease;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.12);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
.btn:not(:disabled):active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--bordeaux) 0%, var(--bordeaux-dark) 100%);
  color: var(--parchment-light);
  border: 1px solid var(--gold-dark);
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}
.btn-primary:not(:disabled):hover {
  background: linear-gradient(135deg, var(--bordeaux-light) 0%, var(--bordeaux) 100%);
  border-color: var(--gold);
}

/* ── Timer ──────────────────────────────────────────────────────────────── */
.timer {
  font-family: var(--font-heading);
  font-size: 5.5rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  text-shadow: 0 0 30px rgba(232,197,107,0.4);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}

.timer[data-warning="true"] {
  color: #E07828;
  text-shadow: 0 0 30px rgba(224,120,40,0.5);
}

.timer[data-danger="true"] {
  color: #D02828;
  text-shadow: 0 0 40px rgba(208,40,40,0.6);
  animation: timerPulse 0.55s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1;    transform: scale(1); }
  50%       { opacity: 0.75; transform: scale(0.97); }
}

/* ── Question Text ──────────────────────────────────────────────────────── */
.question-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--parchment-light);
  line-height: 1.55;
  text-align: center;
}

/* ── Progress Bar ───────────────────────────────────────────────────────── */
.progress-bar-wrap {
  width: 100%;
  height: 4px;
  background: var(--surface-border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  transition: width 0.5s ease;
  width: 0%;
}

.progress-label {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  align-self: flex-end;
}

/* ── Station Badge ──────────────────────────────────────────────────────── */
.station-badge {
  width: 100%;
  background: linear-gradient(135deg, #1A0A04 0%, var(--bordeaux-dark) 100%);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 0.6rem 1.2rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold-light);
  text-align: center;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

/* ── Scenario Text ──────────────────────────────────────────────────────── */
.scenario-text {
  width: 100%;
  background: var(--surface);
  border-left: 3px solid var(--bordeaux);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.3rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--parchment);
  white-space: pre-line;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.15);
}

/* ── Question Preview Box ───────────────────────────────────────────────── */
.question-preview-box {
  width: 100%;
  background: var(--surface-alt);
  border: 1px dashed var(--gold-dark);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  text-align: left;
}

.question-preview-box p {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--parchment-light);
  margin-top: 0.35rem;
  line-height: 1.45;
}

/* ── Answer Count (Host) ─────────────────────────────────────────────────── */
.answer-count-box {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--muted-light);
  text-align: center;
}

/* ── Answer Buttons (Player) ─────────────────────────────────────────────── */
.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
}

.answer-btn {
  padding: 1.1rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--parchment-light);
  text-align: left;
  line-height: 1.45;
  transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}

.answer-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius) var(--radius) 0 0;
}

.answer-btn:not(:disabled):hover {
  border-color: var(--gold);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.answer-btn:not(:disabled):active { transform: translateY(0) scale(1); }

.answer-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  transition: opacity 0.15s ease;
}

.btn-a { background: linear-gradient(135deg, #6B1D1D 0%, #4A0F0F 100%); }
.btn-b { background: linear-gradient(135deg, #1D2D5A 0%, #0F1A38 100%); }
.btn-c { background: linear-gradient(135deg, #1D4A2D 0%, #0F2A1A 100%); }
.btn-d { background: linear-gradient(135deg, #5A3A1A 0%, #3A2010 100%); }

.answer-label {
  display: inline-block;
  width: 1.5rem;
  font-weight: 900;
  color: var(--gold);
}

/* ── Input Fields ────────────────────────────────────────────────────────── */
.input-field {
  width: 100%;
  max-width: 360px;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  color: var(--parchment-light);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
}

.input-field::placeholder { color: var(--muted); }
.input-field:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15), inset 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Center Box (Warten, Antwort) ────────────────────────────────────────── */
.center-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.big-nickname {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
}

.big-check {
  font-size: 5rem;
  color: var(--correct-text);
  line-height: 1;
  filter: drop-shadow(0 0 16px rgba(94,201,122,0.4));
}

.big-label {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--parchment-light);
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid var(--surface-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Correct Answer Box (Resolution, Host) ───────────────────────────────── */
.correct-answer-box {
  width: 100%;
  background: var(--correct);
  border: 2px solid var(--correct-text);
  border-radius: var(--radius);
  padding: 0.85rem 1.3rem;
  text-align: left;
  animation: glowCorrect 0.7s ease forwards;
  box-shadow: 0 0 0 rgba(94,201,122,0);
}

@keyframes glowCorrect {
  0%   { box-shadow: 0 0  0px rgba(94,201,122,0);    border-color: #2A6A3A; }
  50%  { box-shadow: 0 0 28px rgba(94,201,122,0.5);  border-color: var(--correct-text); }
  100% { box-shadow: 0 0 10px rgba(94,201,122,0.2);  border-color: var(--correct-text); }
}

.correct-answer-box .label { color: #86efac; }

.correct-answer-box p {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0fdf4;
  margin-top: 0.3rem;
}

/* ── Explanation Box ─────────────────────────────────────────────────────── */
.explanation-box {
  width: 100%;
  background: var(--surface);
  border-left: 3px solid var(--bordeaux);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.95rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--parchment);
  max-height: 240px;
  overflow-y: auto;
  box-shadow: inset 0 0 16px rgba(0,0,0,0.15);
}

.explanation-box::-webkit-scrollbar { width: 5px; }
.explanation-box::-webkit-scrollbar-track { background: var(--surface-alt); }
.explanation-box::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

.explanation-box p { margin-bottom: 0.35rem; }

/* ── Transition Box ──────────────────────────────────────────────────────── */
.transition-box {
  width: 100%;
  background: rgba(107,29,29,0.2);
  border: 1px solid var(--bordeaux);
  border-radius: var(--radius);
  padding: 0.8rem 1.15rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  color: #c4a0a0;
  text-align: left;
}

.transition-box::before {
  content: '⚖  ';
  font-style: normal;
  color: var(--gold-dark);
}

/* ── Player Result Card ──────────────────────────────────────────────────── */
.player-result {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.result-correct {
  background: var(--correct);
  border: 2px solid var(--correct-text);
  animation: glowCorrect 0.7s ease forwards;
}

.result-wrong {
  background: var(--wrong);
  border: 2px solid var(--wrong-text);
}

.result-none {
  background: var(--surface-alt);
  border: 1px solid var(--surface-border);
}

.result-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.result-correct .result-icon { color: var(--correct-text); filter: drop-shadow(0 0 10px rgba(94,201,122,0.5)); }
.result-wrong   .result-icon { color: var(--wrong-text); }
.result-none    .result-icon { color: var(--muted); }

.result-sub {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted-light);
  margin-top: 0.4rem;
}
.result-sub strong { color: var(--parchment-light); }

.score-change {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--correct-text);
  margin-top: 0.25rem;
}

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.leaderboard {
  list-style: none;
  width: 100%;
}

.leaderboard li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  margin-bottom: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.93rem;
  transition: background 0.2s;
}

.leaderboard li.me {
  background: rgba(107,29,29,0.35);
  border-color: var(--bordeaux);
  box-shadow: 0 0 0 1px rgba(201,168,76,0.2);
}

.rank {
  min-width: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 400;
}

.player-name { flex: 1; color: var(--parchment); }

.score {
  text-align: right;
  white-space: nowrap;
  color: var(--parchment-light);
  font-weight: 700;
}

.score small {
  color: var(--muted);
  font-weight: 400;
  margin-left: 0.3rem;
}

/* ── Final Leaderboard ───────────────────────────────────────────────────── */
.leaderboard-final li:nth-child(1) {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(201,168,76,0.15);
}
.leaderboard-final li:nth-child(1) .rank::before { content: '🥇 '; }
.leaderboard-final li:nth-child(2) {
  background: rgba(160,160,180,0.12);
  border-color: #9ca3af;
}
.leaderboard-final li:nth-child(2) .rank::before { content: '🥈 '; }
.leaderboard-final li:nth-child(3) {
  background: rgba(180,83,9,0.12);
  border-color: #b45309;
}
.leaderboard-final li:nth-child(3) .rank::before { content: '🥉 '; }

/* ── Finale Header ───────────────────────────────────────────────────────── */
.finale-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.finale-gavel {
  font-size: 3.5rem;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.4));
  animation: finaleGlow 2s ease-in-out infinite alternate;
}

@keyframes finaleGlow {
  from { filter: drop-shadow(0 0 10px rgba(201,168,76,0.2)); }
  to   { filter: drop-shadow(0 0 28px rgba(201,168,76,0.6)); }
}

/* ── Waiting Hint ────────────────────────────────────────────────────────── */
.waiting-hint {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.3rem;
}

/* ── Error ───────────────────────────────────────────────────────────────── */
.error-msg {
  font-family: var(--font-ui);
  color: var(--wrong-text);
  min-height: 1.2rem;
  font-size: 0.88rem;
  text-align: center;
}

/* ── Scrollbar (global) ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-border); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE – Handy
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 500px) {
  .screens-wrap { padding: 1rem 0.6rem; }
  .screen { gap: 0.9rem; }

  /* Header kompakter */
  .site-header-inner { padding: 0.65rem 1rem; }
  .title-main { font-size: 1.1rem; }
  .title-sub  { font-size: 0.68rem; }
  .header-ornament { font-size: 1.2rem; }

  /* Überschriften */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.25rem; }

  /* Timer */
  .timer { font-size: 4.5rem; }

  /* Antwort-Buttons: 1 Spalte auf Handy */
  .answer-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .answer-btn {
    padding: 1rem 1rem;
    font-size: 0.95rem;
  }

  /* Raum-Code */
  .big-code { font-size: 2.4rem; letter-spacing: 0.3em; }

  /* QR etwas kleiner */
  .qr-img { width: 140px; height: 140px; }

  /* Input */
  .input-field { max-width: 100%; }

  /* Button volle Breite */
  .btn { max-width: 100%; }

  /* Leaderboard kompakter */
  .leaderboard li { padding: 0.5rem 0.75rem; font-size: 0.87rem; }

  /* Explanation scrollhöhe kleiner */
  .explanation-box { max-height: 180px; }

  /* Raumcode-Box kompakter */
  .room-code-box { padding: 0.9rem 1.2rem; }

  /* Szenario-Karten: volle Breite */
  .scenario-card { font-size: 1rem; padding: 1rem 1.2rem; }

  /* Bild-Container */
  .question-img { max-height: 160px; }
}

/* ── Sekundär-Button ─────────────────────────────────────────────────────── */
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--gold-dark);
  color: var(--gold-light);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(201,168,76,0.15);
  transform: translateY(-1px);
}

/* ── Startseite (Video-Hintergrund · Neon-Palette) ───────────────────────── */
body.landing-page {
  background-color: #08081a;
  background-image: none;
  display: block;
  position: relative;
}

#bg-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(5, 5, 18, 0.78) 0%,
      rgba(5, 5, 18, 0.56) 45%,
      rgba(5, 5, 18, 0.92) 100%);
  z-index: 1;
}

.landing-main {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 1.6rem;
  text-align: center;
}

/* Logo */
.landing-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.landing-q {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 700;
  color: #5E1FA8;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 18px rgba(94, 31, 168, 0.80),
    0 0 50px rgba(94, 31, 168, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.95);
}

.landing-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  color: #e8feff;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-shadow:
    0 0 12px rgba(45, 226, 230, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.9);
  margin: 0;
}

/* Spruch */
.landing-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(235, 250, 255, 0.85);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9);
  max-width: 380px;
  line-height: 1.55;
}

/* Buttons */
.landing-nav {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 300px;
}

.btn-landing {
  font-size: 1rem;
  padding: 0.95rem 1.5rem;
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
  display: block;
}

/* Teilnehmer + Host: gleicher Violett-Outline-Stil */
.btn-landing.btn-primary,
.btn-landing.btn-secondary {
  background: rgba(94, 31, 168, 0.08);
  border: 1.5px solid rgba(138, 85, 215, 0.68);
  color: #d4b8ff;
  text-shadow: none;
  box-shadow: none;
}
.btn-landing.btn-primary:hover,
.btn-landing.btn-secondary:hover {
  background: rgba(94, 31, 168, 0.20);
  border-color: #8A55D7;
  color: #fff;
  box-shadow: 0 0 22px rgba(94, 31, 168, 0.52), 0 0 48px rgba(94, 31, 168, 0.20);
  transform: translateY(-1px);
}

/* Rechtslink */
.landing-legal {
  font-size: 0.78rem;
  color: rgba(45, 226, 230, 0.45);
  margin-top: 0.25rem;
}
.landing-legal a {
  color: rgba(45, 226, 230, 0.55);
  text-decoration: none;
}
.landing-legal a:hover {
  color: #2DE2E6;
  text-decoration: underline;
}

/* Ton-Toggle */
.sound-toggle {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid rgba(45, 226, 230, 0.40);
  background: rgba(5, 5, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #2DE2E6;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
}
.sound-toggle:hover {
  border-color: #2DE2E6;
  box-shadow: 0 0 10px rgba(45, 226, 230, 0.40);
}

@media (max-width: 500px) {
  .landing-q       { font-size: 3.5rem; }
  .landing-title   { font-size: 0.95rem; letter-spacing: 0.28em; }
  .landing-tagline { font-size: 0.92rem; }
  .landing-nav     { max-width: 100%; }
  .btn-landing     { font-size: 0.97rem; }
}

/* ── Szenario-Auswahl ────────────────────────────────────────────────────── */
.scenario-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.scenario-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--parchment);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.scenario-card:hover {
  border-color: var(--gold);
  background: rgba(201,168,76,0.07);
  box-shadow: 0 0 12px rgba(201,168,76,0.12);
}

/* ── Bilder in Fragen/Szenarien ──────────────────────────────────────────── */
.question-img-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.question-img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--surface-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLATTFORM-MODUS  |  /host + /player vor Spielstart
   ═══════════════════════════════════════════════════════════════════════════ */

body.platform-mode .site-header {
  display: none;
}

body.host-page.platform-mode {
  background-color: #08081a;
  background-image:
    linear-gradient(rgba(5, 3, 14, 0.78), rgba(5, 3, 14, 0.78)),
    url('/host-bg.jpg');
  background-size: cover;
  background-position: center;
}

body.player-page.platform-mode {
  background-color: #08081a;
  background-image:
    linear-gradient(rgba(5, 3, 14, 0.78), rgba(5, 3, 14, 0.78)),
    url('/player-bg.jpg');
  background-size: cover;
  background-position: center;
}

/* Inline-Logo (Q + Wordmark) */
.platform-logo-inline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.platform-q-small {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 700;
  color: #5E1FA8;
  line-height: 1;
  text-shadow:
    0 0 16px rgba(94, 31, 168, 0.75),
    0 0 40px rgba(94, 31, 168, 0.30),
    0 2px 8px rgba(0, 0, 0, 0.90);
}

.platform-wordmark {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(215, 195, 255, 0.85);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
}

.platform-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(200, 182, 235, 0.72);
  text-align: center;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
  max-width: 300px;
}

.platform-heading {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: rgba(215, 195, 255, 0.92);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

/* Primärer Plattform-Button */
.btn-platform-primary {
  background: rgba(94, 31, 168, 0.10);
  border: 1.5px solid rgba(138, 85, 215, 0.65);
  color: #d4b8ff;
  text-shadow: none;
  box-shadow: none;
}
.btn-platform-primary:not(:disabled):hover {
  background: rgba(94, 31, 168, 0.22);
  border-color: #8A55D7;
  color: #fff;
  box-shadow: 0 0 20px rgba(94, 31, 168, 0.48), 0 0 45px rgba(94, 31, 168, 0.18);
}

/* Input-Felder im Plattform-Modus */
body.platform-mode .input-field {
  background: rgba(10, 7, 24, 0.65);
  border-color: rgba(130, 75, 210, 0.50);
  color: #e0d5ff;
}
body.platform-mode .input-field:focus {
  border-color: rgba(138, 85, 215, 0.80);
  box-shadow: 0 0 0 3px rgba(94, 31, 168, 0.18);
  outline: none;
}
body.platform-mode .input-field::placeholder {
  color: rgba(180, 158, 218, 0.50);
}

/* Szenariokarten im Plattform-Modus */
body.platform-mode .scenario-card {
  background: rgba(5, 3, 20, 0.50);
  border-color: rgba(94, 31, 168, 0.42);
  color: rgba(215, 195, 255, 0.90);
}
body.platform-mode .scenario-card:hover {
  border-color: rgba(138, 85, 215, 0.82);
  background: rgba(94, 31, 168, 0.16);
  box-shadow: 0 0 16px rgba(94, 31, 168, 0.28);
  color: #fff;
}

/* ── Rechtliche Hinweise ─────────────────────────────────────────────────── */
.legal-screen {
  align-items: flex-start;
  max-width: 660px;
}

.legal-screen h1 {
  font-size: 1.7rem;
  margin-bottom: 0.25rem;
  width: 100%;
}

.legal-section {
  width: 100%;
  border-top: 1px solid var(--surface-border);
  padding-top: 1rem;
}

.legal-section h2 {
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.legal-section h3 {
  font-size: 0.95rem;
  color: var(--parchment-light);
  margin-bottom: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
}

.legal-section p,
.legal-section li {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--parchment-light);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.legal-section ul {
  padding-left: 1.2rem;
  margin-bottom: 0.75rem;
}

.legal-section a {
  color: var(--gold-dark);
  text-decoration: none;
}
.legal-section a:hover { text-decoration: underline; }

.legal-back {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  margin-top: 0.5rem;
  width: 100%;
}

.legal-back a {
  color: var(--gold-dark);
  text-decoration: none;
}
.legal-back a:hover { color: var(--gold-light); text-decoration: underline; }

/* ── Rechtshinweis-Link im Join-Screen ───────────────────────────────────── */
.join-legal {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.25rem;
}

.join-legal a {
  color: var(--gold-dark);
  text-decoration: none;
}
.join-legal a:hover { text-decoration: underline; }
