:root {
  --bg: #1b1036;
  --bg2: #2a1a52;
  --card: #34226a;
  --text: #fff8f0;
  --muted: #b9a9e6;
  --accent: #ffb627;
  --accent2: #f15bb5;
  --ok: #3ec300;
  --bad: #ff5d73;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(circle at 20% 10%, var(--bg2), var(--bg) 70%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 14px;
  padding: 14px 20px; background: var(--accent); color: #2a1a52;
  cursor: pointer; width: 100%; font-size: 1.1rem; text-decoration: none; display: block; text-align: center;
}
button:disabled { opacity: .45; cursor: default; }
button.secondary, .btn.secondary { background: var(--card); color: var(--text); }
input, textarea, select {
  font: inherit; font-size: 1.15rem; width: 100%; padding: 12px 14px;
  border-radius: 12px; border: 2px solid var(--card); background: #fff; color: #222;
}
textarea { min-height: 110px; resize: vertical; }
label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: .95rem; }

.dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .4em; vertical-align: middle; }
.chip {
  display: inline-flex; align-items: center; gap: .3em; padding: .35em .8em; margin: .25em;
  border-radius: 999px; background: var(--card); font-weight: 600;
}
.chip.done { outline: 3px solid var(--ok); }
.chip.off { opacity: .4; }

/* ---------- Handy ---------- */
.phone { max-width: 520px; margin: 0 auto; padding: 18px 16px 40px; }
.phone .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); font-size: .9rem; }
.phone .card { background: var(--card); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.phone .question { font-size: 1.3rem; font-weight: 700; }
.phone .answer-quote { font-size: 1.4rem; font-style: italic; }
.phone .players { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phone .players button { background: var(--bg2); color: var(--text); border: 3px solid transparent; padding: 16px 10px; }
.phone .players button.sel { border-color: var(--accent); }
.phone .big { font-size: 2rem; font-weight: 800; }
.phone .error { color: var(--bad); min-height: 1.2em; margin-top: 8px; }
.phone .timer { font-weight: 800; color: var(--accent); }
.stack > * + * { margin-top: 10px; }

/* ---------- Host / TV ---------- */
.host { min-height: 100vh; padding: 3vw 4vw; display: flex; flex-direction: column; font-size: 1.6vw; }
.host header { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 1.3vw; }
.host main { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 2vw; }
.host .logo { font-size: 2vw; font-weight: 900; letter-spacing: .05em; color: var(--accent); }
.host .title { font-size: 4.2vw; font-weight: 900; max-width: 85vw; }
.host .sub { font-size: 2vw; color: var(--muted); max-width: 75vw; }
.host .quote { font-size: 4vw; font-style: italic; font-weight: 700; max-width: 80vw; }
.host .quote::before { content: "«"; color: var(--accent2); }
.host .quote::after { content: "»"; color: var(--accent2); }
.host .code { font-size: 9vw; font-weight: 900; letter-spacing: .15em; color: var(--accent); line-height: 1; }
.host .lobby { display: grid; grid-template-columns: auto 1fr; gap: 4vw; align-items: center; text-align: left; }
.host .qr { background: #fff; padding: 1vw; border-radius: 1vw; }
.host .qr svg { width: 18vw !important; height: 18vw !important; display: block; }
.host .chips { display: flex; flex-wrap: wrap; justify-content: center; max-width: 85vw; font-size: 1.8vw; }
.host .timer { font-size: 3vw; font-weight: 900; color: var(--accent); min-width: 5vw; text-align: right; }
.host .ranking { width: min(70vw, 1100px); font-size: 2.2vw; }
.host .row { display: flex; align-items: center; gap: 1vw; padding: .6vw 1.2vw; margin: .5vw 0; background: var(--card); border-radius: 1vw; }
.host .row .name { flex: 1; text-align: left; font-weight: 700; }
.host .row .pts { font-weight: 900; }
.host .row .delta { color: var(--ok); font-weight: 700; min-width: 6vw; text-align: right; }
.host .bars { width: min(75vw, 1200px); font-size: 2vw; }
.host .bar { height: 2.4vw; background: var(--accent2); border-radius: .6vw; min-width: .6vw; transition: width .8s; }
.host .who { font-size: 1.4vw; color: var(--muted); text-align: left; }
.host .reveal-name .dot, .host .winner .dot { width: .5em; height: .5em; }
.host .reveal-name { font-size: 6vw; font-weight: 900; animation: pop .6s ease-out; }
.host .winner { font-size: 7vw; font-weight: 900; color: var(--accent); animation: pop .8s ease-out; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Startseite ---------- */
.home { max-width: 520px; margin: 0 auto; padding: 8vh 16px; text-align: center; }
.home .logo { font-size: 3rem; font-weight: 900; color: var(--accent); margin-bottom: 4px; }

/* ---------- Quiz ---------- */
:root { --A: #4361ee; --B: #ff8500; --C: #2a9d8f; --D: #d63384; }
.optA { background: var(--A) !important; } .optB { background: var(--B) !important; }
.optC { background: var(--C) !important; } .optD { background: var(--D) !important; }
.letter { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em;
  border-radius: 50%; background: rgba(0,0,0,.25); font-weight: 900; margin-right: .5em; flex: none; }

.host .badge { display: inline-block; padding: .3vw 1.2vw; border-radius: 999px; background: var(--card); font-size: 1.5vw; font-weight: 700; }
.host .grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2vw; width: min(88vw, 1500px); }
.host .opt { display: flex; align-items: center; text-align: left; padding: 1.3vw 1.6vw; border-radius: 1.2vw;
  font-size: 2.4vw; font-weight: 700; color: #fff; position: relative; overflow: hidden; transition: opacity .4s, transform .4s; }
.host .opt.dim { opacity: .3; }
.host .opt.right { outline: .5vw solid #fff; transform: scale(1.03); }
.host .opt .cnt { margin-left: auto; font-size: 2vw; font-weight: 900; padding-left: 1vw; }
.host .opt .fill { position: absolute; left: 0; bottom: 0; height: .6vw; background: rgba(255,255,255,.85); transition: width .8s; }
.host .timebar { width: min(88vw, 1500px); height: 1vw; background: var(--card); border-radius: 1vw; overflow: hidden; }
.host .timebar div { height: 100%; background: var(--accent); transition: width .25s linear; }
.host .paused { position: fixed; inset: 0; background: rgba(20,10,40,.8); display: flex; align-items: center; justify-content: center;
  font-size: 7vw; font-weight: 900; color: var(--accent); z-index: 10; }
.host .split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3vw; width: 92vw; align-items: start; }
.host .split .grid4 { grid-template-columns: 1fr; width: 100%; }
.host .split .opt { font-size: 2vw; padding: 1vw 1.4vw; }
.host .split .ranking { width: 100%; font-size: 1.6vw; }
.host .split .row { padding: .4vw 1vw; margin: .35vw 0; }
.host .chips.small { font-size: 1.3vw; }
.host .out { text-decoration: line-through; opacity: .55; }

.phone .opts { display: grid; gap: 10px; }
.phone .opts button { color: #fff; text-align: left; display: flex; align-items: center; font-size: 1.15rem; padding: 16px; min-height: 64px; }
.phone .opts button.gone { opacity: .15; }
.phone .opts button.mine { outline: 4px solid #fff; }
.phone .ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phone .plist { display: grid; gap: 6px; }
.phone .prow { display: flex; align-items: center; gap: 8px; background: var(--bg2); border-radius: 12px; padding: 8px 10px; }
.phone .prow .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone .prow select { width: auto; font-size: .95rem; padding: 6px 8px; }
.phone .prow button { width: auto; padding: 6px 10px; font-size: .9rem; background: var(--bad); color: #fff; }
.phone .prow.out .n { text-decoration: line-through; opacity: .6; }
.phone .correct-hint { background: var(--ok); color: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; }
.phone .row2 { display: flex; gap: 10px; } .phone .row2 > * { flex: 1; }
