/* YouGBT – Partyspiel-Design (nur Dark Mode). Mobile/iPad zuerst. */
:root {
  --bg: #1a1440;
  --bg2: #231b55;
  --panel: #2b2266;
  --panel2: #342a7a;
  --line: #12093a;
  --text: #fff8ec;
  --muted: #b7acec;
  --yellow: #ffd23f;
  --pink: #ff5d8f;
  --cyan: #3ddcff;
  --green: #3be08b;
  --orange: #ff8a3d;
  --purple: #8b5cf6;
  --red: #ff4d6d;
  --ok: var(--green);
  --warn: var(--yellow);
  --err: var(--red);
  --accent: var(--cyan);
  --primary: var(--pink);
  --radius: 22px;
  --pop: 0 6px 0 var(--line);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-rounded, "SF Pro Rounded", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(900px 600px at 50% -10%, #3a2a8c, var(--bg) 65%) fixed, var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--cyan); }
[hidden] { display: none !important; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .9em; background: rgba(0,0,0,.3); padding: 1px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center-text { text-align: center; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 10px; }

/* ---------- Hintergrund: Punkte + schwebende Formen (Parallaxe) ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-layer { position: absolute; inset: -60px; will-change: transform; }
.bg-dots { background-image: radial-gradient(rgba(255,255,255,.07) 2px, transparent 2.5px); background-size: 34px 34px; }
.sh { position: absolute; display: block; opacity: .22; animation: bob 9s ease-in-out infinite; }
.s1 { width: 70px; height: 70px; border-radius: 50%; border: 10px solid var(--pink); top: 12%; left: 6%; }
.s2 { width: 54px; height: 54px; background: var(--yellow); border-radius: 12px; top: 64%; left: 10%; transform: rotate(20deg); animation-delay: -2s; }
.s3 { width: 0; height: 0; border-left: 34px solid transparent; border-right: 34px solid transparent; border-bottom: 58px solid var(--cyan); top: 22%; right: 8%; animation-delay: -4s; }
.s4 { width: 90px; height: 22px; border-radius: 11px; background: var(--green); bottom: 12%; right: 16%; transform: rotate(-25deg); animation-delay: -6s; }
.s5 { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); top: 42%; left: 48%; animation-delay: -1s; }
.s6 { width: 46px; height: 46px; border: 8px solid var(--purple); border-radius: 10px; top: 80%; left: 40%; transform: rotate(35deg); animation-delay: -3s; }
.s7 { width: 26px; height: 26px; border-radius: 50%; border: 6px solid var(--yellow); top: 8%; left: 58%; animation-delay: -5s; }
.s8 { width: 60px; height: 16px; border-radius: 8px; background: var(--pink); top: 52%; right: 4%; transform: rotate(60deg); animation-delay: -7s; }
@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -18px; } }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(26, 20, 64, .92);
  border-bottom: 4px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; padding: 4px; }
.logo-mark {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-weight: 900; font-size: 1.3rem; color: var(--line);
  background: var(--yellow); box-shadow: 0 4px 0 #b98f00; transform: rotate(-8deg);
}
.logo-text { font-weight: 900; font-size: 1.35rem; letter-spacing: .5px; }
.logo-text b { color: var(--pink); }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  min-width: 42px; height: 42px; border-radius: 14px; border: 3px solid var(--line); background: var(--panel2);
  cursor: pointer; font-weight: 900; font-size: .9rem; display: inline-grid; place-items: center; padding: 0 8px;
  box-shadow: 0 4px 0 var(--line); transition: transform .1s, box-shadow .1s;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

/* ---------- Grundlayout ---------- */
.app { max-width: 1160px; margin: 0 auto; padding: 18px 16px 96px; }
.screen { animation: enter .35s cubic-bezier(.2,1.3,.4,1); }
.screen.narrow { max-width: 520px; margin: 0 auto; }
.screen.center { min-height: 50vh; display: grid; place-items: center; align-content: center; gap: 10px; }
@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.card {
  background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--pop);
  padding: 18px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 12px; font-size: 1.1rem; }
.title-sm { font-size: 1.6rem; font-weight: 900; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.row.center { justify-content: center; }
.tilt { transition: transform .25s ease-out; }

/* ---------- Buttons (klobig, 3D) ---------- */
.btn {
  border: 3px solid var(--line); background: var(--panel2); border-radius: 16px; padding: 11px 20px; font-weight: 900;
  cursor: pointer; position: relative; min-height: 48px; box-shadow: 0 5px 0 var(--line); letter-spacing: .3px;
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 5px 0 #b3264f; border-color: #b3264f; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 #b3264f; }
.btn-ghost { background: var(--panel2); }
.btn-sm { padding: 6px 12px; min-height: 38px; font-size: .9rem; border-radius: 12px; box-shadow: 0 4px 0 var(--line); }
.btn-lg { padding: 14px 30px; font-size: 1.2rem; border-radius: 18px; }
.btn.loading { color: transparent !important; text-shadow: none; }
.btn.loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}
.pulse { animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%,86%,100% { transform: rotate(0); } 90% { transform: rotate(-3deg) scale(1.04); } 95% { transform: rotate(3deg) scale(1.04); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Startseite ---------- */
.home { display: grid; gap: 22px; padding-top: 10px; }
.hero { text-align: center; }
.hero-title { font-size: clamp(3.4rem, 17vw, 6.8rem); margin: 0; line-height: 1; font-weight: 900; letter-spacing: -1px; }
.hl { display: inline-block; color: var(--yellow); text-shadow: 0 6px 0 var(--line); animation: jump 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * .12s); }
.hl:nth-child(2) { color: var(--pink); } .hl:nth-child(3) { color: var(--cyan); }
.hl:nth-child(4) { color: var(--green); } .hl:nth-child(5) { color: var(--orange); } .hl:nth-child(6) { color: var(--purple); }
@keyframes jump { 0%,70%,100% { transform: translateY(0) rotate(0); } 80% { transform: translateY(-14px) rotate(-4deg); } 90% { transform: translateY(0) rotate(2deg); } }
.hero-badge {
  display: inline-block; margin-top: 16px; padding: 8px 16px; border-radius: 999px; background: var(--line);
  font-weight: 900; font-size: .95rem; color: var(--yellow); transform: rotate(-2deg);
}
.home-actions { display: grid; gap: 14px; grid-template-columns: 1fr; max-width: 900px; width: 100%; margin: 0 auto; }
.big-btn {
  display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 24px; border: 4px solid var(--line); cursor: pointer;
  color: var(--line); font-weight: 900; box-shadow: 0 8px 0 var(--line); transition: transform .08s, box-shadow .08s;
}
.big-btn.c1 { background: var(--yellow); } .big-btn.c2 { background: var(--pink); color: #fff; } .big-btn.c3 { background: var(--cyan); }
.big-btn:hover:not(:disabled) { transform: translateY(-2px) rotate(-1deg); }
.big-btn:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 var(--line); }
.big-btn:disabled { opacity: .45; cursor: not-allowed; }
.big-icon { font-size: 2rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.35); flex: none; }
.big-title { font-size: 1.35rem; }
.best-line { text-align: center; margin: 0; font-size: 1.2rem; font-weight: 900; }
@media (min-width: 720px) {
  .home-actions { grid-template-columns: repeat(3, 1fr); }
  .big-btn { flex-direction: column; justify-content: center; padding: 28px 18px; text-align: center; }
  .big-icon { width: 76px; height: 76px; font-size: 2.6rem; }
}

/* ---------- Formulare ---------- */
.form-card { padding: 22px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field > span { font-weight: 900; font-size: .95rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.input, .answer, select, .form input {
  width: 100%; padding: 13px 15px; border-radius: 16px; border: 3px solid var(--line); background: var(--bg);
  outline: none; transition: border-color .15s; font-size: 16px; font-weight: 700;
}
.input:focus, .answer:focus, select:focus, .form input:focus { border-color: var(--yellow); }
.input::placeholder, .answer::placeholder { color: #8076b8; font-weight: 600; }
.code-input { font-size: 2rem; letter-spacing: 12px; text-align: center; text-transform: uppercase; font-weight: 900; color: var(--yellow); }
.name-preview { font-weight: 900; color: var(--cyan); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: 14px; border: 3px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 900;
  min-height: 44px; display: inline-flex; gap: 6px; align-items: center; box-shadow: 0 4px 0 var(--line); transition: transform .08s;
}
.chip.on { background: var(--yellow); color: var(--line); transform: translateY(2px); box-shadow: 0 2px 0 var(--line); }
.chip:disabled { cursor: default; }
.chip:disabled:not(.on) { opacity: .45; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input { flex: 1; accent-color: var(--pink); height: 32px; }
.range-val { font-weight: 900; font-size: 1.5rem; min-width: 2ch; text-align: center; color: var(--yellow); }
.settings-box { margin: 6px 0; }

/* ---------- Spiel: HUD ---------- */
.game { display: grid; gap: 14px; }
.hud {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: sticky; top: calc(66px + env(safe-area-inset-top)); z-index: 20; padding: 8px 10px; border-radius: 18px;
  background: var(--panel); border: 4px solid var(--line); box-shadow: var(--pop);
}
.hud-left, .hud-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hud-left { overflow-x: auto; scrollbar-width: none; }
.hud-left::-webkit-scrollbar { display: none; }
.hud-right { flex: none; }
.hud-pill { padding: 5px 12px; border-radius: 12px; font-weight: 900; font-size: .85rem; background: var(--line); white-space: nowrap; }
.hud-pill.special { background: var(--orange); color: var(--line); animation: wobble 1.6s ease-in-out infinite; }
.hud-pill.cat { color: var(--cyan); }
.hud-score { font-weight: 900; color: var(--yellow); white-space: nowrap; }
@keyframes wobble { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.timer { position: relative; width: 54px; height: 54px; display: inline-grid; place-items: center; }
.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-bg { fill: var(--line); stroke: rgba(255,255,255,.12); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--green); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.timer-num { font-weight: 900; font-size: 1.2rem; position: relative; }
.timer.warn .ring-fg { stroke: var(--yellow); }
.timer.crit .ring-fg { stroke: var(--red); }
.timer.crit { animation: beat .5s ease-in-out infinite alternate; }
@keyframes beat { to { transform: scale(1.14); } }

.game-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.stage { min-width: 0; display: grid; gap: 14px; align-content: start; }

/* Seitenleiste (mobil als Schublade) */
.side {
  position: fixed; inset: auto 0 0 0; z-index: 40; max-height: 82vh; display: grid; grid-template-rows: auto auto 1fr; gap: 6px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--panel);
  border: 4px solid var(--line); border-bottom: 0; transform: translateY(105%); transition: transform .3s cubic-bezier(.2,1.1,.4,1); overflow: hidden;
}
.side.open { transform: none; }
.side-tabs { display: flex; justify-content: space-between; align-items: center; }
.side-title { font-size: .85rem; margin: 4px 0; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 900; }
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35; width: 62px; height: 62px; border-radius: 20px;
  border: 4px solid var(--line); font-size: 1.6rem; cursor: pointer; background: var(--cyan); box-shadow: 0 6px 0 var(--line);
}
.fab:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--line); }
.fab-badge { position: absolute; top: -8px; right: -8px; min-width: 24px; height: 24px; border-radius: 12px; background: var(--red); color: #fff; font-size: .8rem; font-weight: 900; display: none; place-items: center; padding: 0 6px; line-height: 24px; border: 3px solid var(--line); }
@media (min-width: 1000px) {
  .game-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .game.solo .game-grid { grid-template-columns: minmax(0, 780px); justify-content: center; }
  .side { position: sticky; top: 150px; inset: auto; transform: none; border-radius: var(--radius); border-bottom: 4px solid var(--line); max-height: calc(100vh - 170px); box-shadow: var(--pop); }
  .side-close, .fab { display: none !important; }
}

/* Spielerliste */
.players { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 34vh; overflow: auto; }
.player { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 14px; background: var(--bg); animation: enter .3s; }
.player.me { box-shadow: inset 0 0 0 3px var(--yellow); }
.player.left { opacity: .4; }
.player.left .p-name { text-decoration: line-through; }
.player.empty { opacity: .45; background: transparent; border: 3px dashed var(--panel2); }
.p-name { flex: 1; min-width: 0; font-weight: 900; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-score { font-weight: 900; color: var(--yellow); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.on { background: var(--green); }
.dot.off { background: var(--orange); }
.badge { font-size: .75rem; font-weight: 900; padding: 3px 9px; border-radius: 10px; white-space: nowrap; background: var(--panel2); }
.badge.ok { background: var(--green); color: var(--line); }
.badge.wait { color: var(--muted); }
.badge.out { background: var(--red); color: #fff; }
.badge.hint { background: var(--yellow); color: var(--line); }
.badge.perfect { background: var(--yellow); color: var(--line); }
.avatar {
  --h: 280; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; font-weight: 900; color: var(--line); font-size: .95rem;
  background: hsl(var(--h) 90% 66%); border: 3px solid var(--line);
}
.avatar.sm { width: 32px; height: 32px; border-radius: 11px; font-size: .75rem; }
.avatar.lg { width: 60px; height: 60px; border-radius: 20px; font-size: 1.3rem; box-shadow: 0 4px 0 var(--line); }
.avatar.ghost { background: transparent; border: 3px dashed var(--panel2); }

/* Chat zwischen Spielern */
.chat { display: grid; grid-template-rows: auto 1fr auto auto auto; min-height: 0; gap: 6px; }
.chat-log { overflow-y: auto; min-height: 110px; max-height: 30vh; display: grid; align-content: start; gap: 4px; padding-right: 4px; }
@media (min-width: 1000px) { .chat-log { max-height: none; height: 100%; } }
.chat-msg { font-size: .92rem; padding: 6px 10px; border-radius: 14px; background: var(--bg); overflow-wrap: anywhere; animation: enter .25s; font-weight: 600; }
.chat-msg.mine { background: var(--panel2); }
.chat-name { --h: 280; font-weight: 900; margin-right: 6px; color: hsl(var(--h) 90% 70%); }
.chat-sys { font-size: .8rem; color: var(--muted); text-align: center; font-weight: 700; }
.chat-paused { margin: 0; font-size: .85rem; color: var(--yellow); text-align: center; font-weight: 900; }
.emoji-bar { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; min-height: 44px; align-items: center; flex-shrink: 0; }
.emoji { background: none; border: 0; font-size: 1.3rem; padding: 4px 5px; cursor: pointer; border-radius: 10px; min-width: 38px; }
.emoji:hover:not(:disabled) { transform: scale(1.25) rotate(-8deg); }
.emoji:disabled { opacity: .35; }
.chat-form { display: flex; gap: 6px; }
.chat-form .input { padding: 10px 12px; }

/* ---------- Lobby ---------- */
.lobby { display: grid; gap: 16px; }
.code-card { padding: 18px; text-align: center; display: grid; gap: 10px; justify-items: center; background: var(--yellow); color: var(--line); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--pop); }
.code-card .muted { color: var(--line); opacity: .7; font-weight: 900; }
.room-code { font-weight: 900; font-size: clamp(2.8rem, 14vw, 4.2rem); letter-spacing: .3em; padding-left: .3em; line-height: 1; }
.code-card .btn { background: #fff; color: var(--line); }
.lobby > .btn-lg { justify-self: center; min-width: 240px; }

/* ---------- Frage als Chat ---------- */
.chat-stage { display: grid; gap: 12px; }
.persona { display: flex; gap: 12px; align-items: center; }
.persona-name { font-weight: 900; font-size: 1.2rem; }
.persona-trait { font-size: .88rem; }
.persona-tag { display: inline-block; margin-top: 3px; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 8px; background: var(--orange); color: var(--line); }
.persona.annoying .avatar { animation: wobble 1s ease-in-out infinite; }
.thread { display: grid; gap: 10px; }
.bubble {
  max-width: min(92%, 640px); padding: 13px 17px; border-radius: 22px; font-size: 1.1rem; line-height: 1.45; white-space: pre-wrap;
  overflow-wrap: anywhere; position: relative; animation: pop .4s cubic-bezier(.2,1.5,.4,1); border: 4px solid var(--line); font-weight: 700;
}
.bubble.in { background: #fff; color: var(--line); border-bottom-left-radius: 6px; justify-self: start; box-shadow: var(--pop); }
.bubble.out { background: var(--pink); color: #fff; border-bottom-right-radius: 6px; justify-self: end; box-shadow: 0 6px 0 #b3264f; border-color: #b3264f; }
.bubble.old { opacity: .6; font-size: .95rem; box-shadow: none; }
.bubble.main-q { font-size: 1.25rem; font-weight: 900; }
.bubble-step { display: block; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; opacity: .6; margin-bottom: 2px; }
.bubble-step.joker { color: var(--yellow); opacity: 1; }
.q-text.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--pink); }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
.typing-bubble { padding: 18px 22px; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--purple); animation: bounce 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; background: var(--pink); } .dots i:nth-child(3) { animation-delay: .3s; background: var(--cyan); }
@keyframes bounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-9px); } }
.wait-stage { display: grid; gap: 14px; padding: 20px 0; }
.special-banner {
  text-align: center; font-weight: 900; font-size: 1.3rem; padding: 14px; border-radius: 18px; color: var(--line); border: 4px solid var(--line);
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 20px, var(--orange) 20px 40px); background-size: 200% 100%;
  animation: stripes 2s linear infinite; box-shadow: var(--pop);
}
@keyframes stripes { to { background-position: 113px 0; } }

/* Antwortfeld */
.composer { padding: 14px; display: grid; gap: 10px; background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--pop); }
.composer-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.composer-bottom { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.answer { min-height: 140px; resize: vertical; line-height: 1.45; }
.counter { font-size: .85rem; color: var(--muted); font-weight: 800; }
.counter.near { color: var(--yellow); }
.hint-shown { padding: 7px 12px; border-radius: 12px; background: var(--yellow); color: var(--line); font-weight: 900; animation: pop .4s; }
.hint-shown .muted { color: var(--line); opacity: .7; }
.joker-btn.on { background: var(--orange); color: var(--line); }
.joker-note { margin: 0; font-size: .9rem; color: var(--orange); font-weight: 900; }
.joker-off { font-weight: 900; padding: 6px 10px; }
.wait-box { padding: 22px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.wait-box p { margin: 0; font-weight: 900; }
.loader { display: inline-flex; gap: 8px; }
.loader span { width: 16px; height: 16px; border-radius: 50%; background: var(--yellow); animation: bounce 1s infinite; }
.loader span:nth-child(2) { animation-delay: .15s; background: var(--pink); } .loader span:nth-child(3) { animation-delay: .3s; background: var(--cyan); }
.loader.small span { width: 11px; height: 11px; }
.big-wait { font-size: 1.3rem; }

/* ---------- Roulette ---------- */
.spin-stage { display: grid; justify-items: center; gap: 14px; padding: 10px 0; }
.spin-stage h2 { margin: 0; }
.wheel { position: relative; width: min(84vw, 360px); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--line); box-shadow: 0 8px 0 var(--line); }
.wheel-svg { width: 100%; height: 100%; display: block; }
.wheel-rot { transform-origin: 0 0; }
.wheel-label { fill: var(--line); font-size: 8px; font-weight: 900; }
.wheel-hub { fill: var(--yellow); stroke: var(--line); stroke-width: 4; }
.wheel-pointer { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border: 16px solid transparent; border-top: 30px solid var(--yellow); z-index: 2; filter: drop-shadow(0 3px 0 var(--line)); }
.wheel-result { font-size: 1.5rem; font-weight: 900; opacity: 0; transform: scale(.5); transition: all .45s cubic-bezier(.2,1.6,.4,1); }
.wheel-result.show { opacity: 1; transform: none; }

/* ---------- Auflösung ---------- */
.chat-stage.compact .bubble { font-size: 1rem; }
.q-list { margin: 0; padding: 12px 12px 12px 34px; background: #fff; color: var(--line); border: 4px solid var(--line); border-radius: 18px; font-weight: 800; display: grid; gap: 4px; }
.results { display: grid; gap: 12px; }
.r-card { padding: 14px 16px; background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--pop); animation: slideIn .45s cubic-bezier(.2,1.3,.4,1) both; animation-delay: calc(var(--i) * 90ms); }
.r-card.me { border-color: var(--yellow); }
.r-card.perfect { background: #4a3a00; border-color: var(--yellow); }
@keyframes slideIn { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
.r-head { display: flex; align-items: center; gap: 10px; }
.r-name { flex: 1; font-weight: 900; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-points b { font-size: 1.6rem; color: var(--green); }
.r-points small { color: var(--muted); font-weight: 900; }
.bar { height: 12px; border-radius: 99px; background: var(--line); margin: 10px 0; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--green); animation: grow 1s cubic-bezier(.2,1,.3,1) both; }
@keyframes grow { from { width: 0; } }
.r-answer { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }
.r-reason { margin: 0 0 6px; color: var(--cyan); font-size: .92rem; font-weight: 800; }
.r-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-parts { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 6px; }
.sp-parts li { display: flex; gap: 8px; align-items: baseline; }
.sp-pts { flex: none; font-weight: 900; color: var(--green); min-width: 3.4em; }
.sp-ans { overflow-wrap: anywhere; font-weight: 600; }
.scoreboard, .ranking { padding: 16px 18px; background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--pop); }
.scoreboard h3, .ranking h3 { margin: 0 0 10px; }
.scoreboard ol, .ranking ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.scoreboard li, .ranking li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--bg); font-weight: 800; }
.scoreboard li.left, .ranking li.left { opacity: .45; }
.ranking li.me { box-shadow: inset 0 0 0 3px var(--yellow); }
.sb-name, .rk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-plus { color: var(--green); font-weight: 900; }
.sb-score, .rk-score { font-size: 1.15rem; color: var(--yellow); }
.rk { font-weight: 900; width: 2.2em; color: var(--cyan); }
.reveal-actions { display: grid; justify-items: center; gap: 6px; padding: 8px 0 20px; text-align: center; }
.reveal-actions p { margin: 0; font-weight: 800; }

/* Perfekte 100 */
.perfect-overlay { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; align-content: center; pointer-events: none; background: rgba(18, 9, 58, .55); animation: fadeIn .2s; }
.perfect-overlay.out { animation: fadeOut .5s forwards; }
.perfect-title { font-weight: 900; font-size: clamp(1.4rem, 6vw, 2.4rem); letter-spacing: 4px; color: #fff; background: var(--pink); padding: 6px 18px; border-radius: 14px; border: 4px solid var(--line); transform: rotate(-4deg); animation: zoom .5s cubic-bezier(.2,1.8,.4,1); }
.perfect-num { font-weight: 900; font-size: clamp(7rem, 32vw, 13rem); line-height: 1; color: var(--yellow); text-shadow: 0 10px 0 var(--line); animation: zoom .6s .1s cubic-bezier(.2,1.8,.4,1) both, jump 1.2s .8s ease-in-out; }
.perfect-names { font-weight: 900; font-size: 1.3rem; }
@keyframes zoom { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

/* Pause/Fehler */
.stalled { text-align: center; display: grid; justify-items: center; gap: 8px; }
.stalled-icon { font-size: 3rem; animation: bob 3s ease-in-out infinite; }
.stalled p { margin: 0; max-width: 520px; font-weight: 700; }

/* ---------- Finale ---------- */
.final-head { text-align: center; }
.final-title { font-size: clamp(2.4rem, 11vw, 4rem); margin: 6px 0; font-weight: 900; color: var(--yellow); text-shadow: 0 6px 0 var(--line); animation: zoom .6s cubic-bezier(.2,1.6,.4,1); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; max-width: 540px; margin: 10px auto 0; width: 100%; }
.pod { display: grid; justify-items: center; gap: 4px; text-align: center; animation: rise .8s cubic-bezier(.2,1.4,.4,1) both; animation-delay: var(--d); min-width: 0; }
.pod-name { font-weight: 900; font-size: .9rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-score { font-weight: 900; color: var(--yellow); }
.pod-block { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: center; font-weight: 900; font-size: 2.2rem; color: var(--line); border: 4px solid var(--line); border-bottom: 0; }
.pod.first .pod-block { height: 150px; background: var(--yellow); }
.pod.second .pod-block { height: 110px; background: var(--cyan); }
.pod.third .pod-block { height: 80px; background: var(--orange); }
.pod.first .avatar { animation: bob 2s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(80px); } to { opacity: 1; transform: none; } }
.duel, .solo-result { padding: 22px; text-align: center; display: grid; gap: 10px; justify-items: center; max-width: 520px; margin: 0 auto; width: 100%; background: var(--panel); border: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--pop); }
.duel-title { font-size: 1.4rem; font-weight: 900; }
.duel-row { display: flex; gap: 30px; justify-content: center; }
.duel-p { display: grid; justify-items: center; gap: 4px; opacity: .7; font-weight: 900; }
.duel-p.win { opacity: 1; transform: scale(1.12); }
.solo-score { font-size: clamp(4rem, 20vw, 6.5rem); font-weight: 900; line-height: 1; color: var(--yellow); text-shadow: 0 6px 0 var(--line); animation: zoom .7s cubic-bezier(.2,1.6,.4,1); }

/* ---------- Toast, Modal, Effekte ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; z-index: 90;
  padding: 12px 18px; border-radius: 16px; background: #fff; color: var(--line); border: 4px solid var(--line); box-shadow: var(--pop);
  font-weight: 900; max-width: min(92vw, 460px); text-align: center; transition: all .25s cubic-bezier(.2,1.4,.4,1); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }
.toast.ok { background: var(--green); }
.toast.warn { background: var(--yellow); }
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(10, 5, 35, .7); display: grid; place-items: center; padding: 16px; animation: fadeIn .15s; }
.modal { width: min(420px, 100%); background: var(--panel); border: 4px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 8px 0 var(--line); animation: pop .3s cubic-bezier(.2,1.5,.4,1); }
.modal h2 { margin: 0 0 8px; font-weight: 900; }
.modal-body p { margin: 0 0 6px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 85; }
.alert { padding: 12px 14px; border-radius: 16px; margin: 0 0 12px; font-weight: 800; border: 3px solid var(--line); }
.alert-err { background: var(--red); color: #fff; }
.alert-ok { background: var(--green); color: var(--line); }
.alert-warn { background: var(--yellow); color: var(--line); }
.noscript { text-align: center; padding: 40px; }

/* ---------- Admin ---------- */
.admin-main { max-width: 660px; padding-top: 30px; }
.form { display: grid; gap: 12px; margin-bottom: 18px; }
.form label { display: grid; gap: 6px; font-weight: 800; font-size: .92rem; }
.form.inline { margin-bottom: 8px; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; font-size: .92rem; font-weight: 700; }
.checks .pass { color: var(--green); } .checks .fail { color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stats div { padding: 12px; border-radius: 16px; background: var(--bg); display: grid; }
.stats b { font-size: 1.7rem; color: var(--yellow); }
.stats span { font-size: .82rem; color: var(--muted); }

/* ---------- Mobil ---------- */
.show-sm { display: none; }
@media (max-width: 520px) {
  .hide-sm { display: none; }
  .show-sm { display: inline !important; }
  .hud { padding: 6px 8px; gap: 6px; }
  .hud-pill { font-size: .78rem; padding: 4px 9px; }
  .timer { width: 48px; height: 48px; }
  .answer { min-height: 120px; }
  .chat-log, .players { max-height: 26vh; }
  .bubble.main-q { font-size: 1.12rem; }
}

/* ---------- Reduzierte Bewegung ---------- */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
.reduce-motion .bg-layer { transform: none !important; }
