:root {
  --bg1: #14021f;
  --bg2: #2a0640;
  --bg3: #3d0a4f;
  --pink: #ff2d95;
  --hot: #ff3c6e;
  --violet: #9b5cff;
  --gold: #ffd166;
  --mint: #06d6a0;
  --red: #ff3c38;
  --white: #fff;
  --text: #fdf2ff;
  --muted: rgba(253, 242, 255, .65);
  --glass: rgba(255, 255, 255, .07);
  --glass2: rgba(255, 255, 255, .12);
  --border: rgba(255, 255, 255, .16);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --radius: 22px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; height: 100%; }

body {
  font-family: 'Fredoka', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg1);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(255, 45, 149, .35), transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(155, 92, 255, .35), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 209, 102, .18), transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2) 50%, var(--bg3));
  background-size: 200% 200%;
  animation: bgmove 18s ease-in-out infinite alternate;
  overflow-x: hidden;
  min-height: 100vh;
  user-select: none;
}

@keyframes bgmove {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

#bg, #fx { position: fixed; inset: 0; pointer-events: none; }
#bg { z-index: 0; }
#fx { z-index: 50; }

#flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 40; opacity: 0;
  box-shadow: inset 0 0 160px 40px var(--flash, rgba(255, 60, 56, .8));
}
#flash.on { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
#mini { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; justify-content: center; }
#mini::-webkit-scrollbar { display: none; }
.mini-chip {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 4px 10px 4px 4px; border-radius: 99px;
  background: var(--glass); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; transition: all .3s;
  backdrop-filter: blur(8px);
}
.mini-chip .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--c); font-size: 14px; }
.mini-chip.active { background: color-mix(in srgb, var(--c) 35%, transparent); border-color: var(--c); transform: scale(1.08); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent); }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--glass); color: var(--text); font-size: 16px; cursor: pointer;
  backdrop-filter: blur(8px); transition: transform .15s;
  flex-shrink: 0;
}
.icon-btn:hover { transform: scale(1.1); }
.icon-btn.hidden { visibility: hidden; }

/* ---------- Layout ---------- */
#app {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 70px 16px 30px;
}

.screen {
  width: 100%; max-width: 720px;
  animation: screenIn .55s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes screenIn {
  0% { opacity: 0; transform: translateY(30px) scale(.94); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: none; }
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .15);
  backdrop-filter: blur(16px);
}

.center { text-align: center; }
h1, h2, h3 { margin: 0; }
h2 { font-family: 'Bungee', sans-serif; font-weight: 400; font-size: clamp(20px, 5vw, 30px); line-height: 1.15; letter-spacing: .5px; }
.sub { color: var(--muted); margin: 8px 0 0; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { height: 18px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px;
  border: 0; border-radius: 99px; padding: 16px 28px; cursor: pointer;
  color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 10px 30px rgba(255, 45, 149, .45), inset 0 2px 0 rgba(255, 255, 255, .3);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 14px 40px rgba(255, 45, 149, .6), inset 0 2px 0 rgba(255, 255, 255, .3); }
.btn:active { transform: scale(.97); }
.btn:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; box-shadow: none; }
.btn::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); animation: shine 3.2s infinite;
}
.btn:disabled::after { display: none; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn.block { width: 100%; }
.btn.gold { background: linear-gradient(135deg, #ffd166, #ff9e3d); color: #3a1300; box-shadow: 0 10px 30px rgba(255, 180, 60, .45), inset 0 2px 0 rgba(255, 255, 255, .5); }
.btn.ghost { background: var(--glass2); box-shadow: none; border: 1px solid var(--border); }
.btn.small { font-size: 15px; padding: 10px 18px; }
.btn.big { font-size: 22px; padding: 20px 34px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ---------- Gate ---------- */
.logo {
  font-family: 'Pacifico', cursive; font-size: clamp(44px, 12vw, 84px); line-height: 1.1;
  color: #fff; margin: 0;
  text-shadow: 0 0 10px #fff, 0 0 30px var(--pink), 0 0 60px var(--pink), 0 0 90px var(--violet);
  animation: neon 3s ease-in-out infinite alternate;
}
.logo span { display: block; font-size: .62em; color: var(--gold); text-shadow: 0 0 12px var(--gold), 0 0 40px #ff9e3d; }
@keyframes neon {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: .55; }
  94% { opacity: 1; }
  96% { opacity: .7; }
  97% { opacity: 1; }
}
.tagline { font-family: 'Bungee', sans-serif; letter-spacing: 3px; font-size: clamp(13px, 3.5vw, 17px); margin-top: 14px; color: #ffd1ec; }
.badge18 {
  display: inline-grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  font-family: 'Bungee'; font-size: 24px; color: #fff;
  background: radial-gradient(circle at 30% 30%, #ff6fb1, #c4005b);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), 0 0 40px rgba(255, 45, 149, .8);
  animation: wobble 2.4s ease-in-out infinite; margin-bottom: 10px;
}
@keyframes wobble { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.08); } }
.lang-row { display: flex; gap: 10px; justify-content: center; margin: 22px 0; }
.lang-btn {
  font-family: 'Fredoka'; font-weight: 600; font-size: 16px; color: var(--text);
  padding: 10px 16px; border-radius: 16px; cursor: pointer;
  background: var(--glass); border: 2px solid var(--border); transition: all .2s;
}
.lang-btn .flag { font-size: 26px; display: block; }
.lang-btn.on { border-color: var(--gold); background: rgba(255, 209, 102, .15); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(255, 209, 102, .3); }
.cat-parade { display: flex; justify-content: center; gap: 8px; font-size: 30px; margin: 18px 0 4px; flex-wrap: wrap; }
.cat-parade span { animation: bob 2s ease-in-out infinite; display: inline-block; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.fineprint { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* ---------- Players ---------- */
.prow {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border-radius: 18px; background: var(--glass); border: 1px solid var(--border);
  animation: screenIn .4s both;
}
.avatar-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .6);
  background: var(--c); font-size: 26px; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 70%, transparent);
  transition: transform .2s;
}
.avatar-btn:hover { transform: rotate(-10deg) scale(1.1); }
.prow input {
  flex: 1; min-width: 0; font-family: 'Fredoka'; font-size: 18px; font-weight: 600; color: #fff;
  background: transparent; border: 0; border-bottom: 2px solid var(--border); padding: 8px 4px; outline: none;
}
.prow input:focus { border-color: var(--pink); }
.prow input::placeholder { color: rgba(255, 255, 255, .35); }
.del-btn { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 8px; }
.del-btn:hover { color: var(--red); }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  font-family: 'Fredoka'; font-weight: 600; font-size: 15px; color: var(--text);
  padding: 8px 14px; border-radius: 99px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--border); transition: all .2s;
}
.seg button.on { background: linear-gradient(135deg, var(--pink), var(--violet)); border-color: transparent; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.set-row label { font-weight: 600; }
.toggle { width: 56px; height: 32px; border-radius: 99px; background: var(--glass2); border: 1px solid var(--border); position: relative; cursor: pointer; transition: background .25s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .25s cubic-bezier(.3, 1.6, .5, 1); }
.toggle.on { background: linear-gradient(135deg, var(--pink), var(--violet)); }
.toggle.on::after { left: 27px; }
.section-title { font-family: 'Bungee'; font-size: 14px; letter-spacing: 1.5px; color: var(--gold); margin: 6px 0 2px; }

/* ---------- Category pick ---------- */
.pick-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.big-av {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; flex-shrink: 0;
  background: var(--c); border: 4px solid rgba(255, 255, 255, .7);
  box-shadow: 0 0 30px color-mix(in srgb, var(--c) 80%, transparent);
  animation: wobble 2.4s ease-in-out infinite;
}
.big-av.huge { width: 140px; height: 140px; font-size: 76px; margin: 0 auto 18px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 620px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat {
  position: relative; cursor: pointer; text-align: center;
  padding: 18px 10px 14px; border-radius: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255, 255, 255, .03));
  border: 2px solid color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, border-color .2s;
  font-family: 'Fredoka'; color: var(--text);
}
.cat:hover { transform: translateY(-4px) rotate(-1deg); }
.cat .ic { font-size: 40px; display: block; transition: transform .3s; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .4)); }
.cat .nm { font-weight: 700; font-size: 15px; display: block; margin-top: 8px; line-height: 1.15; }
.cat .chili { font-size: 11px; margin-top: 6px; display: block; min-height: 14px; }
.cat.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 40%, transparent), 0 10px 30px color-mix(in srgb, var(--c) 50%, transparent); transform: scale(1.04); }
.cat.on .ic { transform: scale(1.2) rotate(-8deg); }
.cat.on::after {
  content: '✓'; position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c); color: #1a0020; font-weight: 800;
  border: 3px solid #fff; animation: popin .35s cubic-bezier(.3, 1.8, .5, 1);
}
@keyframes popin { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.counter { font-family: 'Bungee'; font-size: 18px; }
.counter.full { color: var(--mint); }
.nope { animation: nope .4s; }
@keyframes nope { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- Turn / Spin ---------- */
.turn-name { font-family: 'Bungee'; font-size: clamp(28px, 8vw, 48px); line-height: 1.1; background: linear-gradient(90deg, #fff, var(--gold), var(--pink), #fff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradtext 4s linear infinite; }
@keyframes gradtext { to { background-position: 300% 0; } }
.round-pill { display: inline-block; padding: 6px 16px; border-radius: 99px; background: var(--glass2); border: 1px solid var(--border); font-weight: 600; margin-bottom: 16px; }
.spin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 460px; margin: 24px auto 0; }
.spin-grid .cat { cursor: default; opacity: .45; transform: scale(.95); }
.spin-grid .cat.hl { opacity: 1; transform: scale(1.08); border-color: var(--c); box-shadow: 0 0 40px color-mix(in srgb, var(--c) 80%, transparent); }
.spin-grid .cat.win { animation: winner .6s cubic-bezier(.3, 1.8, .5, 1) both; opacity: 1; }
@keyframes winner { 0% { transform: scale(1); } 50% { transform: scale(1.25) rotate(4deg); } 100% { transform: scale(1.12); } }

/* ---------- Question ---------- */
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.q-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.q-player .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--c); border: 3px solid rgba(255, 255, 255, .7); flex-shrink: 0; }
.q-player .nm { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-player .sc { font-size: 13px; color: var(--gold); font-weight: 600; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid var(--c); }

.timer { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.timer svg { transform: rotate(-90deg); width: 64px; height: 64px; }
.timer circle { fill: none; stroke-width: 6; }
.timer .track { stroke: rgba(255, 255, 255, .12); }
.timer .bar { stroke: var(--tc, var(--mint)); stroke-linecap: round; transition: stroke .3s; filter: drop-shadow(0 0 6px var(--tc, var(--mint))); }
.timer .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Bungee'; font-size: 20px; }
.timer.danger { animation: heartbeat .5s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.18); } }

.q-card { position: relative; padding: 30px 24px; text-align: center; margin-bottom: 16px; overflow: hidden; }
.q-card::before {
  content: ''; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), var(--pink), var(--violet), var(--gold), var(--pink));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinborder 4s linear infinite;
}
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spinborder { to { --ang: 360deg; } }
.q-text { font-size: clamp(20px, 4.8vw, 27px); font-weight: 600; line-height: 1.35; }
.q-text .w { display: inline-block; opacity: 0; animation: wordIn .4s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes wordIn { from { opacity: 0; transform: translateY(12px) rotate(4deg); } to { opacity: 1; transform: none; } }

.answers { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .answers { grid-template-columns: 1fr 1fr; } }
.answers.tf { grid-template-columns: 1fr 1fr; }
.ans {
  font-family: 'Fredoka'; font-size: 18px; font-weight: 600; color: #fff; text-align: left;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 18px; cursor: pointer; min-height: 64px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--ac) 55%, #1a0526), color-mix(in srgb, var(--ac) 25%, #1a0526));
  border: 2px solid color-mix(in srgb, var(--ac) 70%, transparent);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--ac) 40%, #000), 0 10px 24px rgba(0, 0, 0, .3);
  transition: transform .12s, box-shadow .12s, opacity .3s, filter .3s;
  opacity: 0; animation: ansIn .45s cubic-bezier(.2, 1.5, .4, 1) forwards;
}
.answers.tf .ans { justify-content: center; font-size: 22px; min-height: 90px; text-align: center; }
@keyframes ansIn { from { opacity: 0; transform: scale(.7) translateY(20px); } to { opacity: 1; transform: none; } }
.ans:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 9px 0 color-mix(in srgb, var(--ac) 40%, #000), 0 14px 30px rgba(0, 0, 0, .35); }
.ans:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--ac) 40%, #000); }
.ans .key { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255, 255, 255, .18); font-family: 'Bungee'; font-size: 15px; }
.ans:disabled { cursor: default; }
.ans.gone { opacity: .12 !important; filter: grayscale(1); transform: scale(.92); pointer-events: none; }
.ans.dim { opacity: .35 !important; filter: grayscale(.7); }
.ans.correct { --ac: #06d6a0 !important; opacity: 1 !important; animation: rightAns .6s cubic-bezier(.3, 1.8, .5, 1) both; box-shadow: 0 0 0 4px rgba(6, 214, 160, .4), 0 0 40px rgba(6, 214, 160, .7); }
.ans.wrong { --ac: #ff3c38 !important; opacity: 1 !important; animation: wrongAns .5s both; }
@keyframes rightAns { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1.03); } }
@keyframes wrongAns { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px) rotate(-2deg); } 40% { transform: translateX(10px) rotate(2deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }

.jokers { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.joker {
  font-family: 'Fredoka'; font-weight: 700; font-size: 15px; color: #3a1300; cursor: pointer;
  padding: 10px 18px; border-radius: 99px; border: 0;
  background: linear-gradient(135deg, #ffd166, #ff9e3d);
  box-shadow: 0 4px 0 #b86a14, 0 8px 20px rgba(255, 180, 60, .35);
  transition: transform .12s;
}
.joker:hover:not(:disabled) { transform: translateY(-2px) rotate(-2deg); }
.joker:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; box-shadow: none; }
.joker.active { animation: pulse .8s infinite; background: linear-gradient(135deg, #ff2d95, #ffd166); color: #fff; }

.result { margin-top: 18px; text-align: center; animation: screenIn .5s both; }
.result .verdict { font-family: 'Bungee'; font-size: clamp(26px, 7vw, 40px); }
.result .verdict.ok { color: var(--mint); text-shadow: 0 0 24px rgba(6, 214, 160, .7); }
.result .verdict.ko { color: var(--hot); text-shadow: 0 0 24px rgba(255, 60, 110, .7); }
.result .detail { color: var(--muted); margin: 6px 0 14px; font-size: 16px; }
.result .gain { font-family: 'Bungee'; font-size: 22px; color: var(--gold); }

/* Dare card */
.dare-wrap { perspective: 1200px; margin: 6px auto 16px; max-width: 420px; }
.dare {
  position: relative; height: 230px; transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.3, 1.4, .4, 1);
}
.dare.flip { transform: rotateY(180deg); }
.dare .face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center;
  border: 2px solid rgba(255, 255, 255, .4);
}
.dare .front { background: repeating-linear-gradient(45deg, #ff2d95 0 14px, #c4005b 14px 28px); font-size: 70px; box-shadow: 0 20px 50px rgba(255, 45, 149, .5); }
.dare .back { transform: rotateY(180deg); background: linear-gradient(160deg, #2a0640, #5a0f6e); box-shadow: 0 20px 50px rgba(155, 92, 255, .5); }
.dare .back .dt { font-family: 'Bungee'; color: var(--gold); font-size: 16px; margin-bottom: 10px; letter-spacing: 1px; }
.dare .back .dx { font-size: 19px; font-weight: 600; line-height: 1.35; }
.dare .back .dn { font-size: 12px; color: var(--muted); margin-top: 12px; }

/* Banner */
.banner {
  position: fixed; left: 50%; top: 42%; z-index: 60; pointer-events: none;
  font-family: 'Bungee'; font-size: clamp(30px, 9vw, 64px); white-space: nowrap;
  color: #fff; text-shadow: 0 0 20px var(--pink), 0 0 50px var(--violet), 0 4px 0 #6a0035;
  animation: banner 1.6s cubic-bezier(.2, 1.6, .4, 1) forwards;
}
@keyframes banner {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-20deg); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.15) rotate(-4deg); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(.8) rotate(-4deg); opacity: 0; }
}
.float-text {
  position: fixed; z-index: 60; pointer-events: none; font-family: 'Bungee'; font-size: 30px; color: var(--gold);
  text-shadow: 0 0 16px rgba(255, 209, 102, .8), 0 3px 0 #7a4a00;
  animation: floatUp 1.4s ease-out forwards; transform: translate(-50%, -50%);
}
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 20% { opacity: 1; transform: translate(-50%, -60%) scale(1.3); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }

body.shake #app { animation: shake .5s; }
@keyframes shake { 0%, 100% { transform: translate(0); } 15% { transform: translate(-12px, 4px) rotate(-1deg); } 30% { transform: translate(10px, -4px) rotate(1deg); } 45% { transform: translate(-8px, 2px); } 60% { transform: translate(6px, -2px); } 75% { transform: translate(-3px, 1px); } }

/* ---------- Scoreboard ---------- */
.board { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.brow { display: flex; align-items: center; gap: 10px; animation: screenIn .5s both; }
.brow .rk { font-family: 'Bungee'; width: 34px; text-align: center; font-size: 18px; flex-shrink: 0; }
.brow .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--c); flex-shrink: 0; border: 2px solid rgba(255, 255, 255, .7); }
.brow .barwrap { flex: 1; min-width: 0; position: relative; height: 44px; border-radius: 14px; background: var(--glass); overflow: hidden; }
.brow .barfill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 50%, transparent), var(--c)); transition: width 1.4s cubic-bezier(.2, 1, .3, 1); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 60%, transparent); }
.brow .bl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); gap: 8px; }
.brow .bl .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .bl .s { font-family: 'Bungee'; font-size: 15px; flex-shrink: 0; }

/* ---------- Final ---------- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 30px 0 20px; min-height: 280px; }
.pod { display: flex; flex-direction: column; align-items: center; width: 31%; max-width: 160px; }
.pod .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: var(--c); border: 3px solid #fff; margin-bottom: 6px; animation: bob 2s ease-in-out infinite; box-shadow: 0 0 24px color-mix(in srgb, var(--c) 70%, transparent); }
.pod.p1 .av { width: 86px; height: 86px; font-size: 46px; }
.pod .crown { font-size: 38px; animation: wobble 1.6s ease-in-out infinite; margin-bottom: -8px; }
.pod .pn { font-weight: 700; text-align: center; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .ps { font-family: 'Bungee'; color: var(--gold); font-size: 15px; margin-bottom: 6px; }
.pod .block {
  width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: start center; padding-top: 10px;
  font-family: 'Bungee'; font-size: 34px; color: rgba(255, 255, 255, .9);
  height: 0; transition: height 1.2s cubic-bezier(.2, 1.4, .4, 1);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 10px 30px rgba(0, 0, 0, .4);
}
.pod.p1 .block { background: linear-gradient(180deg, #ffd166, #e08a00); }
.pod.p2 .block { background: linear-gradient(180deg, #e6e6f0, #8f8fa8); }
.pod.p3 .block { background: linear-gradient(180deg, #ffad7a, #a5501f); }
.stats-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.stat-row { text-align: left; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--glass); font-size: 14px; }
.stat-row .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c); font-size: 17px; flex-shrink: 0; }
.stat-row .n { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row .m { color: var(--muted); text-align: right; }
.stat-row .s { font-family: 'Bungee'; color: var(--gold); }

@media (max-width: 480px) {
  .card { padding: 18px; }
  .btn.big { font-size: 19px; padding: 18px 26px; }
  .ans { font-size: 16px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Spielpakete ---------- */
.pack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .pack-grid { grid-template-columns: repeat(3, 1fr); } }
.pack {
  font-family: 'Fredoka'; color: var(--text); cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 8px; border-radius: 18px; background: var(--glass); border: 2px solid var(--border);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), border-color .2s, box-shadow .2s;
}
.pack:hover { transform: translateY(-3px); }
.pack .pi { font-size: 30px; }
.pack .pn { font-weight: 700; font-size: 16px; }
.pack .pd { font-size: 12px; color: var(--muted); line-height: 1.2; }
.pack.on { border-color: var(--gold); background: rgba(255, 209, 102, .14); box-shadow: 0 8px 24px rgba(255, 209, 102, .25); transform: scale(1.03); }

.drink-pill { display: inline-block; margin: 4px 0 14px; padding: 8px 16px; border-radius: 99px; background: rgba(255, 209, 102, .16); border: 1px solid rgba(255, 209, 102, .5); color: var(--gold); font-weight: 700; }

/* ---------- Highscores ---------- */
.hs-tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.hs-list { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.hs-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--glass); font-size: 14px; animation: screenIn .4s both; }
.hs-row .rk { font-family: 'Bungee'; width: 30px; text-align: center; flex-shrink: 0; }
.hs-row .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c); font-size: 17px; flex-shrink: 0; }
.hs-row .n { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-row .m { color: var(--muted); font-size: 12px; text-align: right; }
.hs-row .s { font-family: 'Bungee'; color: var(--gold); min-width: 54px; text-align: right; }
.hs-row.me { background: linear-gradient(90deg, rgba(255, 45, 149, .35), rgba(155, 92, 255, .25)); border: 1px solid var(--pink); box-shadow: 0 0 20px rgba(255, 45, 149, .4); }
.hs-empty { color: var(--muted); padding: 20px; text-align: center; }
.solo-score { font-family: 'Bungee'; font-size: clamp(54px, 16vw, 96px); line-height: 1; color: var(--gold); text-shadow: 0 0 30px rgba(255, 209, 102, .7), 0 5px 0 #7a4a00; margin: 6px 0; }
.record-msg { font-weight: 700; font-size: 18px; margin-bottom: 16px; }
.record-msg.new { font-family: 'Bungee'; font-size: clamp(24px, 7vw, 36px); background: linear-gradient(90deg, #fff, var(--gold), var(--pink), #fff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradtext 2s linear infinite; }
.link-btn { background: none; border: 0; color: var(--muted); font-family: 'Fredoka'; font-size: 13px; text-decoration: underline; cursor: pointer; margin-top: 12px; }

/* ---------- Offizielles Logo ---------- */
.logo-wrap { margin: 0; line-height: 0; }
.logo-img {
  width: min(100%, 380px); height: auto; display: block; margin: -16px auto -24px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .7)) drop-shadow(0 0 24px rgba(255, 45, 149, .8)) drop-shadow(0 0 50px rgba(155, 92, 255, .6));
  animation: logoGlow 3s ease-in-out infinite alternate;
}
@keyframes logoGlow {
  0% { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6)) drop-shadow(0 0 18px rgba(255, 45, 149, .6)) drop-shadow(0 0 40px rgba(155, 92, 255, .5)); }
  100% { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .9)) drop-shadow(0 0 30px rgba(255, 45, 149, .9)) drop-shadow(0 0 70px rgba(155, 92, 255, .7)); }
}

/* ---------- Bild- & Emoji-Fragen, Erklärung, Sprache pro Spieler ---------- */
.q-media {
  width: min(220px, 60vw); aspect-ratio: 1; margin: -6px auto 14px; border-radius: 22px; padding: 14px;
  background: radial-gradient(circle at 50% 40%, #fff6fb, #ffd3ea 70%, #f7a8d2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 0 0 3px rgba(255, 255, 255, .6);
  animation: popin .5s cubic-bezier(.3, 1.8, .5, 1);
}
.q-media svg, .q-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.q-emoji { font-size: clamp(48px, 14vw, 76px); letter-spacing: 6px; margin-bottom: 10px; animation: popin .5s cubic-bezier(.3, 1.8, .5, 1); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); }
.explain {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  margin: 4px auto 16px; max-width: 560px; padding: 14px 16px; border-radius: 16px;
  background: rgba(255, 209, 102, .1); border: 1px solid rgba(255, 209, 102, .35);
  font-size: 15px; line-height: 1.45; animation: screenIn .5s .25s both;
}
.explain b { color: var(--gold); font-size: 14px; }
.flag-btn {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; cursor: pointer; font-size: 22px;
  background: var(--glass2); border: 1px solid var(--border); transition: transform .15s;
}
.flag-btn:hover { transform: scale(1.12); }
.lang-row { flex-wrap: wrap; }
@media (max-width: 480px) { .lang-btn { padding: 8px 10px; font-size: 13px; } .lang-btn .flag { font-size: 22px; } }

/* ---------- Challenge ---------- */
.ch-btn {
  margin-top: 14px; background: linear-gradient(135deg, #ffd166, #ff2d95 60%, #9b5cff); color: #fff;
  box-shadow: 0 10px 34px rgba(255, 45, 149, .55), inset 0 2px 0 rgba(255, 255, 255, .4);
}
.prize {
  display: flex; flex-direction: column; gap: 4px; margin: 14px auto; max-width: 460px; padding: 14px 18px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 209, 102, .22), rgba(255, 45, 149, .18)); border: 1px solid rgba(255, 209, 102, .5);
  animation: pulse 2.4s ease-in-out infinite;
}
.prize b { font-family: 'Bungee'; color: var(--gold); letter-spacing: .5px; }
.ch-progress { height: 6px; border-radius: 99px; background: var(--glass2); overflow: hidden; margin: -4px 0 14px; }
.ch-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--pink)); border-radius: 99px; transition: width .5s; }
.ans.picked { outline: 3px solid #fff; outline-offset: 2px; animation: pulse .6s infinite; }
.ch-form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin: 18px auto 0; max-width: 460px; padding: 18px; border-radius: 20px; background: var(--glass); border: 1px solid var(--border); }
.ch-form h3 { font-family: 'Bungee'; font-weight: 400; color: var(--gold); text-align: center; font-size: 18px; }
.ch-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ch-form input[type=email], .ch-form input:not([type]) {
  font-family: 'Fredoka'; font-size: 17px; color: #fff; padding: 12px 14px; border-radius: 14px;
  background: rgba(0, 0, 0, .25); border: 1px solid var(--border); outline: none;
}
.ch-form input:focus { border-color: var(--pink); }
.ch-form .check { flex-direction: row; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 500; font-size: 13.5px; line-height: 1.4; cursor: pointer; }
.ch-form .check input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--pink); }
.ch-form a, .fineprint a { color: var(--gold); }
.ch-err { color: #ff8a87; font-weight: 600; min-height: 1em; text-align: center; }

/* ---------- Verlosung & Schätz-Finale ---------- */
.prize.raffle { animation: none; background: linear-gradient(135deg, rgba(6, 214, 160, .2), rgba(255, 209, 102, .2)); border-color: rgba(6, 214, 160, .55); margin: 16px auto; }
.prize.raffle b { color: #7dffd6; }
.prize.raffle .btn { margin-top: 10px; }
.joined-all { font-weight: 700; color: #7dffd6; margin-top: 6px; }
.joined { font-size: 11px; color: #7dffd6; font-weight: 700; white-space: nowrap; }
.gate-raffle { margin: 18px auto 0; max-width: 440px; font-family: 'Bungee'; font-size: 15px; color: #7dffd6; line-height: 1.3; }
.gate-raffle small { display: block; font-family: 'Fredoka'; font-size: 13px; color: var(--muted); margin-top: 4px; }
.guess-form { max-width: 420px; margin: 0 auto; }
.guess-input { display: flex; align-items: center; gap: 10px; background: rgba(0, 0, 0, .25); border: 2px solid var(--border); border-radius: 18px; padding: 6px 16px; margin-bottom: 8px; }
.guess-input:focus-within { border-color: var(--gold); box-shadow: 0 0 24px rgba(255, 209, 102, .35); }
.guess-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font-family: 'Bungee'; font-size: 30px; padding: 8px 0; text-align: center; }
.guess-input span { color: var(--gold); font-weight: 700; }
.guess-num { font-family: 'Bungee'; font-size: clamp(36px, 11vw, 64px); color: var(--gold); text-shadow: 0 0 30px rgba(255, 209, 102, .7), 0 4px 0 #7a4a00; margin: 4px 0 18px; }
.guess-row { opacity: 0; transform: translateX(-30px) scale(.9); transition: all .5s cubic-bezier(.3, 1.6, .5, 1); animation: none !important; }
.guess-row.shown { opacity: 1; transform: none; }

/* Echte Fotos (Geo) */
.q-media.photo { width: min(560px, 100%); aspect-ratio: 16 / 10; padding: 0; overflow: hidden; background: #000; border-radius: 18px; }
.q-media.photo img { object-fit: cover; }

/* Offizielles Logo im Spiel */
#topLogo {
  height: 34px; width: auto; flex-shrink: 0; cursor: default;
  filter: drop-shadow(0 0 6px rgba(255, 45, 149, .8)) drop-shadow(0 0 14px rgba(155, 92, 255, .5));
}
#topLogo.hidden { display: none; }
.logo-result {
  display: block; width: min(220px, 60%); height: auto; margin: -6px auto 8px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, .6)) drop-shadow(0 0 22px rgba(255, 45, 149, .7));
}
@media (max-width: 480px) { #topLogo { height: 26px; } }
/* Live-Mehrspieler: bestehende Spielart bleibt erhalten, dieser Einstieg ist zusätzlich. */
.live-btn{display:flex!important;align-items:center;justify-content:center;margin-top:10px;text-decoration:none;background:linear-gradient(135deg,#ff3978,#8f32ff)!important;color:#fff!important;border-color:#ffb3d0!important;box-shadow:0 8px 26px #ff397847}
