/* ── Tokens ───────────────────────────────────────────── */
:root {
  --bg: #15202b;
  --bg-soft: #1f2f40;
  --bg-deep: #0f1721;
  --ink: #f2f6fb;
  --muted: #b7c4d4;
  --brand: #00c1a8;
  --brand-deep: #0b8f7d;
  --brand-glow: rgba(0, 193, 168, 0.2);
  --accent: #ffb703;
  --accent-glow: rgba(255, 183, 3, 0.25);
  --danger: #ff6b6b;
  --ok: #2dd4a0;
  --ok-glow: rgba(45, 212, 160, 0.2);
  --line: rgba(242, 246, 251, 0.12);
  --line-strong: rgba(242, 246, 251, 0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 0.2s ease;
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Public Sans", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(0, 193, 168, 0.14), transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(255, 183, 3, 0.10), transparent 35%),
    radial-gradient(ellipse at 50% 50%, rgba(21, 32, 43, 1), transparent 100%),
    var(--bg);
}

h1, h2, h3 {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Index Page ───────────────────────────────────────── */
.shell {
  width: min(960px, 94vw);
  margin: 0 auto;
  padding: 24px 0 48px;
}
.index-shell { display: grid; gap: 18px; }

.hero { text-align: center; padding: 36px 12px 12px; }
.hero h1 {
  font-size: clamp(2.6rem, 9vw, 4.4rem);
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 8px;
}
.hero .subtitle { color: var(--muted); margin-top: 10px; line-height: 1.6; }

.card-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 26, 36, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 18px;
}
.panel h2 { font-size: 1.1rem; margin-bottom: 8px; }

.stack { display: grid; gap: 10px; margin-top: 10px; }

.note ul { margin: 8px 0 0; padding: 0 0 0 20px; color: var(--muted); line-height: 1.7; }
.note li strong { color: var(--ink); }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
  text-align: center;
  color: var(--ink);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-sm { padding: 8px 12px; font-size: 0.85rem; }
.btn-lg { padding: 15px 22px; font-size: 1.08rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #0b8f7d);
  color: #fff;
  box-shadow: 0 4px 16px var(--brand-glow);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 24px var(--brand-glow); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); }

.btn-bot {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--muted);
}
.btn-bot:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }

/* ── Form inputs ──────────────────────────────────────── */
input[type="text"], input[type="number"], input {
  width: 100%;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.98rem;
  font-family: inherit;
}
input:focus { outline: none; border-color: var(--brand); }

.inline { display: flex; gap: 8px; align-items: stretch; }
.inline input { flex: 1; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 0.8rem; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }

/* ── Game shell ───────────────────────────────────────── */
.game-shell {
  width: min(680px, 100vw);
  margin: 0 auto;
  padding: 10px 12px 30px;
  display: grid;
  gap: 14px;
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────────────── */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
}
.header-left { display: flex; flex-direction: column; gap: 2px; }
.session-badge {
  display: inline-block;
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand);
  letter-spacing: 0.08em;
}
.player-name-label { color: var(--muted); font-size: 0.8rem; }

.hud-mini { display: flex; gap: 8px; }
.mini-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}
.mini-coins { border-color: var(--accent); }
.mini-label { font-size: 0.62rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; }
.mini-value { font-family: "Space Grotesk", monospace; font-size: 1.15rem; font-weight: 700; }
.mini-coins .mini-value { color: var(--accent); }

/* ── Screen (sections) ───────────────────────────────── */
.screen { display: grid; gap: 12px; }

/* ── Lobby ───────────────────────────────────────────── */
.lobby-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 26, 36, 0.7);
  backdrop-filter: blur(10px);
  padding: 20px;
  display: grid;
  gap: 16px;
}
.share-area {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}
.share-area img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  background: #fff;
}
.share-area a { font-size: 0.82rem; word-break: break-all; }

.bot-controls { display: grid; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mini-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}
.mini-name { font-weight: 600; }
.bot-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.btn-remove-bot {
  background: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  line-height: 1;
}
.btn-remove-bot:hover { border-color: var(--danger); color: var(--danger); }

/* ── Grid (mission select) ───────────────────────────── */
.grid-header { padding: 0 4px; }
.grid-header h2 { font-size: 1.5rem; margin-top: 4px; }

.mission-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 560px) {
  .mission-grid { grid-template-columns: repeat(3, 1fr); }
}

.mission-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 26, 36, 0.7);
  backdrop-filter: blur(10px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.mission-card.mission-done { opacity: 0.55; }
.mission-card.mission-done::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.2rem;
  color: var(--ok);
  font-weight: 700;
}
.mission-card.mission-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
.mission-card:hover:not(.mission-done) { transform: translateY(-2px); border-color: var(--brand); }

.mc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.mc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  font-family: "Space Grotesk", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}
.mission-current .mc-num { background: var(--accent); color: var(--bg); }
.mission-done .mc-num { background: var(--ok); color: var(--bg); }
.mc-cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.mc-title {
  font-size: 1rem;
  line-height: 1.3;
  min-height: 2.6em;
}
.mc-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-diff {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.mc-diff.diff-leicht { background: rgba(45, 212, 160, 0.15); color: var(--ok); }
.mc-diff.diff-mittel { background: rgba(255, 183, 3, 0.15); color: var(--accent); }
.mc-diff.diff-schwer { background: rgba(255, 107, 107, 0.18); color: var(--danger); }
.mc-factor {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  background: var(--brand-glow);
  color: var(--brand);
  font-family: "Space Grotesk", monospace;
}
.mc-participants {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 2px;
}
.mc-multi { color: var(--accent); font-family: "Space Grotesk", monospace; font-weight: 700; }
.mc-action {
  margin-top: 4px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-family: inherit;
}
.mc-action:disabled { opacity: 0.35; cursor: not-allowed; background: var(--bg-soft); color: var(--muted); }

.resting-banner {
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: rgba(255, 107, 107, 0.08);
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: center;
}

/* ── Active mission ──────────────────────────────────── */
.mission-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.timer-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}
.timer-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.timer-value {
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  font-size: 1.5rem;
}
.timer-chip.timer-warn { border-color: var(--accent); }
.timer-chip.timer-warn .timer-value { color: var(--accent); }
.timer-chip.timer-danger { border-color: var(--danger); animation: chipPulse 0.8s ease-in-out infinite; }
.timer-chip.timer-danger .timer-value { color: var(--danger); }

@keyframes chipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
  50% { box-shadow: 0 0 14px 2px rgba(255, 107, 107, 0.3); }
}

.mission-card-active {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: rgba(16, 26, 36, 0.8);
  backdrop-filter: blur(10px);
  padding: 18px;
  display: grid;
  gap: 14px;
}
.mission-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-cat { background: var(--bg-soft); color: var(--muted); }
.badge-diff { background: rgba(255, 183, 3, 0.15); color: var(--accent); }
.badge-factor {
  background: var(--brand-glow);
  color: var(--brand);
  font-family: "Space Grotesk", monospace;
}
.mission-prompt { font-size: 1.05rem; line-height: 1.5; color: var(--ink); }

.choice-grid { display: grid; gap: 8px; }
.choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
  font-family: inherit;
  font-size: 0.98rem;
  text-align: left;
}
.choice-btn:hover { border-color: var(--brand); }
.choice-btn.selected {
  border-color: var(--brand);
  background: var(--brand-glow);
  box-shadow: 0 0 0 2px var(--brand-glow);
}
.choice-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-soft);
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
}
.choice-btn.selected .choice-num { background: var(--brand); color: #fff; }

.bet-zone {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  gap: 8px;
}
.bet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bet-label { font-weight: 700; font-size: 0.9rem; }
.bet-display { color: var(--accent); font-size: 1.1rem; font-family: "Space Grotesk", monospace; font-weight: 700; }
.bet-display strong { color: var(--accent); font-size: 1.3rem; }

input[type="range"] {
  width: 100%;
  height: 28px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  margin-top: -8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--bg-soft);
  border-radius: 999px;
}
input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: none;
  cursor: pointer;
}

.bet-quickrow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.btn-quick {
  padding: 7px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-quick:hover { border-color: var(--accent); color: var(--accent); }

/* ── Result screen ──────────────────────────────────── */
.result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 26, 36, 0.8);
  padding: 22px;
  display: grid;
  gap: 14px;
  text-align: center;
}
.result-icon {
  display: flex;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
}
.result-ok { background: var(--ok-glow); color: var(--ok); }
.result-bad { background: rgba(255, 107, 107, 0.18); color: var(--danger); }
.result-delta { font-size: 1.8rem; font-family: "Space Grotesk", monospace; font-weight: 700; }
.result-delta.delta-pos { color: var(--ok); }
.result-delta.delta-neg { color: var(--danger); }

.result-details {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  text-align: left;
}
.result-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}
.result-row strong { font-family: "Space Grotesk", monospace; }

/* ── Ended ──────────────────────────────────────────── */
.ended-card {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 183, 3, 0.06);
  padding: 24px;
  display: grid;
  gap: 14px;
  text-align: center;
}
.final-ranking {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.final-ranking li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}
.rank-pos { font-family: "Space Grotesk", monospace; font-weight: 700; color: var(--muted); }
.rank-name { flex: 1; text-align: left; font-weight: 600; }
.rank-coins { color: var(--accent); font-family: "Space Grotesk", monospace; }

/* ── Bonus Mission ──────────────────────────────────── */
.bonus-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ff8c00);
  color: var(--bg);
}
.bonus-card { border-left-color: var(--accent); }
.bonus-card .badge-factor { background: var(--accent-glow); color: var(--accent); }

/* ── Pause overlay ──────────────────────────────────── */
.pause-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 14, 22, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 900;
  animation: fadeIn 0.2s ease;
}
.pause-card {
  max-width: 480px;
  width: 100%;
  padding: 28px 24px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(21, 32, 43, 0.95);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 4px var(--accent-glow);
  text-align: center;
  display: grid;
  gap: 12px;
}
.pause-card h2 {
  font-size: 1.7rem;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Audio unlock button ────────────────────────────── */
.audio-unlock {
  position: fixed;
  bottom: 18px;
  right: 14px;
  z-index: 950;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--brand-glow);
  font-family: inherit;
}
.audio-unlock:hover { transform: translateY(-1px); }

/* ── Host pause button (header) ─────────────────────── */
#host-pause-btn {
  margin-left: 4px;
  align-self: center;
}

/* ── Wortgefecht Landing Page ──────────────────────────── */
body.page-landing {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(77, 163, 255, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(139, 92, 246, 0.12), transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(5, 9, 19, 1), transparent 100%),
    #050913;
  min-height: 100vh;
}

.landing-shell {
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 28px 0 56px;
  display: grid;
  gap: 22px;
}

.landing-header {
  display: flex;
  justify-content: center;
  padding: 6px 0 2px;
}
.team-logo {
  width: min(220px, 52vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(77, 163, 255, 0.25));
}

.landing-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 780px) {
  .landing-hero {
    grid-template-columns: minmax(260px, 400px) 1fr;
    gap: 44px;
    padding: 8px 4px;
  }
}

.hero-figure {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 34vh;
  min-height: 220px;
  overflow: hidden;
}
.oemer-img {
  height: 100%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.6));
}
@media (min-width: 780px) {
  .hero-figure {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .oemer-img {
    height: auto;
    width: min(380px, 32vw);
  }
}

.hero-content {
  display: grid;
  gap: 14px;
  max-width: 520px;
}
@media (min-width: 780px) {
  .hero-content { padding: 8px 0; }
}

.hero-title {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(2.8rem, 7.5vw, 4.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #5fe3a1 0%, #4da3ff 55%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0;
}
.hero-tagline {
  font-weight: 700;
  font-size: 1.05rem;
  color: #e9f1fb;
  letter-spacing: 0.01em;
  margin: -4px 0 2px;
}
.hero-lede {
  color: #9fb0c6;
  line-height: 1.6;
  font-size: 0.98rem;
  margin-bottom: 2px;
}

/* CTA Buttons */
.btn-cta {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 14px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  letter-spacing: 0.01em;
}
.btn-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-cta:active { transform: translateY(0); }

.btn-cta-primary {
  background: linear-gradient(135deg, #3ad68a 0%, #2d9de0 60%, #4da3ff 100%);
  box-shadow: 0 10px 28px rgba(58, 214, 138, 0.28), 0 4px 12px rgba(45, 157, 224, 0.22);
}
.btn-cta-blue {
  background: linear-gradient(135deg, #2d7fe8, #4da3ff);
  box-shadow: 0 8px 22px rgba(45, 127, 232, 0.3);
  flex: 0 0 auto;
  width: auto;
  padding: 15px 22px;
}
.btn-cta-purple {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.3);
}

/* Divider with text in the middle */
.cta-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #6f7f95;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  margin: 4px 0;
}
.cta-divider::before,
.cta-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(159, 176, 198, 0.25), transparent);
}

/* Join row: input + button side by side */
.join-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.code-input {
  flex: 1;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #f2f6fb;
  font-family: "Space Grotesk", monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.code-input::placeholder {
  color: rgba(159, 176, 198, 0.45);
  letter-spacing: 0.18em;
}
.code-input:focus {
  outline: none;
  border-color: #4da3ff;
  background: rgba(77, 163, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(77, 163, 255, 0.15);
}
.code-input.shake { animation: shake 0.38s ease; border-color: #ff6b6b; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Helper text with coloured left border */
.helper {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #9fb0c6;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 4px solid transparent;
  background: rgba(255, 255, 255, 0.03);
}
.helper-blue {
  border-left-color: #4da3ff;
  background: rgba(77, 163, 255, 0.06);
}
.helper-purple {
  border-left-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.06);
}

.landing-footlinks {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 4px;
}
.landing-footlinks .dot {
  color: #4a5e72;
  font-size: 0.9rem;
  line-height: 1;
  user-select: none;
}
.textlink {
  color: #9fb0c6;
  font-size: 0.86rem;
  text-decoration: none;
  border-bottom: 1px dashed rgba(159, 176, 198, 0.4);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.textlink:hover { color: #4da3ff; border-bottom-color: #4da3ff; }
.textlink-teacher { color: #c4b5fd; border-bottom-color: rgba(196,181,253,0.35); }
.textlink-teacher:hover { color: #d8cdff; border-bottom-color: #d8cdff; }

/* ── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  border: 1px solid var(--danger);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  font-size: 0.9rem;
  max-width: 90vw;
}

/* ── Streak-Chip (HUD) ─────────────────────────────── */
.mini-streak {
  background: linear-gradient(135deg, rgba(255,140,0,0.18), rgba(255,209,102,0.12));
  border-color: rgba(255,140,0,0.55) !important;
}
.mini-streak .mini-value { color: #ffb057; font-weight: 700; }
.mini-streak #streak-fire { margin-right: 2px; filter: drop-shadow(0 0 6px rgba(255,140,0,0.7)); }

@keyframes streakPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.mini-streak.streak-pulse { animation: streakPulse 0.5s ease; }
.mini-streak.streak-hot   { border-color: rgba(255,77,109,0.7) !important; background: linear-gradient(135deg, rgba(255,77,109,0.22), rgba(255,140,0,0.18)); }
.mini-streak.streak-blaze { border-color: rgba(255,77,109,0.9) !important; background: linear-gradient(135deg, rgba(255,77,109,0.32), rgba(255,209,102,0.22)); animation: streakPulse 0.9s ease-in-out infinite; }

/* ── Boss-Badge & Streak-Badge ─────────────────────── */
.badge-boss {
  background: linear-gradient(135deg, #ffd166, #ff8c00);
  color: #2a1500;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(255,140,0,0.5), inset 0 0 8px rgba(255,255,255,0.25);
  border: none !important;
}
.badge-streak {
  background: linear-gradient(135deg, rgba(255,140,0,0.32), rgba(139,92,246,0.22));
  color: #ffd6a5;
  border: 1px solid rgba(255,140,0,0.55) !important;
  font-weight: 700;
}

/* ── Boss-Mission auf dem Grid ─────────────────────── */
.mission-card.mission-boss {
  background: linear-gradient(160deg, rgba(255,140,0,0.16), rgba(139,92,246,0.14)) !important;
  border: 1.5px solid rgba(255,140,0,0.7) !important;
  box-shadow: 0 0 24px rgba(255,140,0,0.25);
  position: relative;
}
.mission-card.mission-boss::before {
  content: "👑";
  position: absolute;
  top: -14px;
  right: -10px;
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(255,140,0,0.6));
}
.mc-action-boss {
  background: linear-gradient(135deg, #ffd166, #ff8c00) !important;
  color: #2a1500 !important;
  font-weight: 700;
}
.mc-boss-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ffd166, #ff8c00);
  color: #2a1500;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 4px;
}
.mission-active-boss {
  box-shadow: 0 0 28px rgba(255,140,0,0.25), inset 0 0 18px rgba(255,140,0,0.05);
  border: 1px solid rgba(255,140,0,0.45);
}

/* ── 3-2-1 Start-Countdown-Overlay ─────────────────── */
.start-countdown {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 19, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: countdownFadeIn 0.2s ease;
}
@keyframes countdownFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.sc-card {
  text-align: center;
  padding: 40px 56px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(77,163,255,0.18), rgba(139,92,246,0.14));
  border: 1px solid rgba(77,163,255,0.4);
  min-width: 320px;
}
.sc-number {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(96px, 24vw, 200px);
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 40px rgba(77,163,255,0.6);
  margin: 18px 0 8px;
  animation: scPop 0.55s ease;
}
@keyframes scPop {
  0%   { transform: scale(0.55); opacity: 0; }
  55%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Erklärung nach Antwort ────────────────────────── */
.explanation-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(77,163,255,0.1), rgba(77,163,255,0.04));
  border: 1px solid rgba(77,163,255,0.3);
  text-align: left;
}
.explanation-box .eyebrow { color: #4da3ff; margin-bottom: 4px; }
.explanation-box p { margin: 0; line-height: 1.5; }

/* ── All-In Button ─────────────────────────────────── */
.btn-quick-allin {
  background: linear-gradient(135deg, #ff4d6d, #ffb357) !important;
  color: #2a0500 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 0 12px rgba(255,77,109,0.35);
  animation: allinGlow 2.4s ease-in-out infinite;
}
@keyframes allinGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(255,77,109,0.35); }
  50%      { box-shadow: 0 0 20px rgba(255,179,87,0.55); }
}

/* ── Modifier-Chips (Host-Lobby) ───────────────────── */
.host-modifiers {
  margin: 14px 0 4px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(77,163,255,0.06);
  border: 1px dashed rgba(77,163,255,0.3);
}
.modifier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.mod-chip {
  border: 1px solid rgba(159,176,198,0.35);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.mod-chip:hover {
  border-color: #4da3ff;
  background: rgba(77,163,255,0.12);
}
.mod-chip.mod-active {
  background: linear-gradient(135deg, #4da3ff, #8b5cf6);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 12px rgba(77,163,255,0.4);
}
.mod-chip.mod-reset {
  border-style: dashed;
  color: #9fb0c6;
}

/* ── Category-Icon in Mission-Badge ────────────────── */
.cat-icon {
  margin-right: 4px;
  filter: drop-shadow(0 0 3px rgba(77,163,255,0.35));
}

/* ── Download-Button im Ended-Panel ────────────────── */
#download-card-btn {
  background: linear-gradient(135deg, #8b5cf6, #4da3ff);
  border: none;
  color: #fff;
}

/* ── Audio-Unlock Button ───────────────────────────── */
.audio-unlock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(5,9,19,0.92);
  border: 1px solid rgba(77,163,255,0.55);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.audio-unlock:hover { border-color: #4da3ff; }

/* ── Beamer: Live-Reaktionen ───────────────────────── */
.reaction-layer {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1500;
  pointer-events: none;
  max-width: 360px;
}
.reaction-toast {
  background: linear-gradient(135deg, rgba(77,163,255,0.95), rgba(139,92,246,0.9));
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: reactionSlide 4.2s ease forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}
.reaction-toast .rx-icon { font-size: 1.6rem; }
.reaction-toast.rx-boss    { background: linear-gradient(135deg, #ffd166, #ff8c00); color: #2a1500; }
.reaction-toast.rx-streak  { background: linear-gradient(135deg, #ff8c00, #ff4d6d); }
.reaction-toast.rx-bigwin  { background: linear-gradient(135deg, #5fe3a1, #4da3ff); }
.reaction-toast.rx-break   { background: linear-gradient(135deg, #6b7280, #374151); }
@keyframes reactionSlide {
  0%   { opacity: 0; transform: translateX(80px); }
  10%  { opacity: 1; transform: translateX(0); }
  85%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(80px); }
}

/* ── Responsive countdown bigger space ─────────────── */
@media (max-width: 480px) {
  .sc-card { padding: 28px 32px; min-width: 260px; }
}

/* ── Emoji-Vibe Panel (Player Phone) ────────────────── */
.vibe-wrap {
  position: fixed;
  bottom: 22px;
  right: 18px;
  z-index: 600;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 8px;
}

.btn-vibe-toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(0, 193, 168, 0.55);
  background: rgba(15, 23, 33, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 1.55rem;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,0.55);
  transition: all 0.2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-vibe-toggle:hover:not(:disabled) { transform: scale(1.12); border-color: var(--brand); }
.btn-vibe-toggle:disabled { opacity: 0.5; cursor: not-allowed; }

.vibe-panel {
  background: rgba(15, 23, 33, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 193, 168, 0.3);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.75);
  width: 256px;
  animation: vibePanelPop 0.18s ease;
}
@keyframes vibePanelPop {
  from { opacity: 0; transform: scale(0.88) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.vibe-emojis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.vibe-e {
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 9px 4px;
  font-size: 1.45rem;
  cursor: pointer;
  transition: all 0.13s ease;
  line-height: 1;
}
.vibe-e:hover  { background: rgba(0, 193, 168, 0.2); transform: scale(1.18); }
.vibe-e:active { transform: scale(0.92); }

.vibe-presets {
  display: grid;
  gap: 5px;
}
.vibe-preset {
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.13s ease;
  font-family: inherit;
}
.vibe-preset:hover { background: rgba(0,193,168,0.13); border-color: var(--brand); }

/* ── Local Vibe Bubbles (player screen) ─────────────── */
.vibe-local-layer {
  position: fixed;
  bottom: 90px;
  left: 0;
  width: 100%;
  height: 60vh;
  pointer-events: none;
  z-index: 550;
  overflow: hidden;
}
.local-vibe-bubble {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: lvFloat 3s ease-out forwards;
  transform: translateX(-50%);
}
@keyframes lvFloat {
  0%   { opacity: 0; transform: translateX(-50%) translateY(0); }
  12%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-55vh); }
}
.lv-display {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.6));
}
.lv-name {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  white-space: nowrap;
}
