:root {
  --bg: #05070d;
  --panel: rgba(10, 15, 28, .72);
  --panel2: rgba(18, 26, 49, .62);
  --text: #eef5ff;
  --muted: #93a7c8;
  --blue: #20a7ff;
  --cyan: #52ffe0;
  --pink: #ff3ea5;
  --orange: #ff8a2a;
  --danger: #ff416d;
  --good: #38f7a6;
  --border: rgba(255,255,255,.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow-x: hidden; }
body { background:
  radial-gradient(circle at 18% 22%, rgba(32, 167, 255, .35), transparent 26%),
  radial-gradient(circle at 83% 18%, rgba(255, 62, 165, .24), transparent 24%),
  radial-gradient(circle at 50% 90%, rgba(255, 138, 42, .20), transparent 30%),
  linear-gradient(135deg, #05070d 0%, #08111f 45%, #120717 100%);
}
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .09; z-index: 0; background-image: linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle, #000 35%, transparent 78%); }
.orb { position: fixed; width: 360px; height: 360px; border-radius: 999px; filter: blur(70px); opacity: .34; pointer-events: none; animation: float 9s ease-in-out infinite; }
.orb-a { left: -80px; top: 80px; background: var(--blue); }
.orb-b { right: -120px; top: 50px; background: var(--pink); animation-delay: -3s; }
.orb-c { left: 38%; bottom: -180px; background: var(--orange); animation-delay: -5s; }
@keyframes float { 0%,100%{ transform: translate3d(0,0,0) scale(1);} 50%{ transform: translate3d(20px,-24px,0) scale(1.12);} }
.app-shell { position: relative; z-index: 2; min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.screen { width: min(1160px, 100%); display: none; }
.screen.active { display: block; }
.hero-card, .panel { border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04)), var(--panel); backdrop-filter: blur(22px); box-shadow: 0 30px 90px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.12); border-radius: 30px; padding: 28px; }
.hero-card { margin-bottom: 22px; overflow: hidden; position: relative; }
.hero-card:after { content: ""; position: absolute; inset: -2px; background: linear-gradient(120deg, transparent, rgba(82,255,224,.16), transparent, rgba(255,62,165,.12)); transform: translateX(-70%); animation: scan 5s linear infinite; pointer-events: none; }
@keyframes scan { to { transform: translateX(70%); } }
.reveal { animation: pop .55s ease both; }
.delay-1 { animation-delay: .12s; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.brand-row { display: flex; gap: 18px; align-items: center; }
.brand-mark { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 22px; font-weight: 1000; letter-spacing: -2px; font-size: 26px; color: white; background: linear-gradient(135deg, var(--blue), var(--pink) 52%, var(--orange)); box-shadow: 0 0 44px rgba(32,167,255,.42), 0 0 34px rgba(255,62,165,.24); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(46px, 8vw, 96px); line-height: .9; letter-spacing: -5px; text-transform: uppercase; }
h2 { font-size: clamp(24px, 3vw, 36px); letter-spacing: -1px; margin-bottom: 18px; }
.eyebrow { color: var(--cyan); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.lead { margin: 28px 0; max-width: 850px; color: #c9d8ef; font-size: 18px; line-height: 1.65; }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.big-button, .ghost, .copy-btn, .choice { border: 0; color: var(--text); cursor: pointer; font-weight: 900; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
.big-button { min-height: 62px; border-radius: 20px; padding: 18px 22px; font-size: 16px; }
.big-button:hover, .copy-btn:hover, .choice:hover, .ghost:hover { transform: translateY(-2px); }
.primary { background: linear-gradient(135deg, var(--blue), var(--pink)); box-shadow: 0 18px 50px rgba(32,167,255,.26); }
.secondary { background: rgba(255,255,255,.08); border: 1px solid var(--border); }
.full { width: 100%; margin-top: 18px; }
.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; color: #cfe2ff; }
.pack-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pack-tile { padding: 18px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid var(--border); min-height: 130px; position: relative; overflow: hidden; }
.pack-tile:before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 99px; background: rgba(32,167,255,.18); right: -70px; top: -70px; }
.pack-tile strong { display: block; font-size: 20px; margin-bottom: 8px; }
.pack-tile p { color: var(--muted); line-height: 1.45; }
.wide { max-width: 780px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 8px; color: #c9d8ef; font-weight: 800; }
input, select { width: 100%; border-radius: 18px; border: 1px solid var(--border); background: rgba(0,0,0,.24); color: var(--text); padding: 16px 18px; outline: none; font-size: 16px; }
input:focus, select:focus { border-color: rgba(82,255,224,.6); box-shadow: 0 0 0 4px rgba(82,255,224,.1); }
.code-input { text-transform: uppercase; letter-spacing: .24em; font-weight: 1000; }
.lobby-layout, .game-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; align-items: start; }
.room-code-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
#room-code { font-size: clamp(42px, 7vw, 76px); letter-spacing: .12em; line-height: 1; text-shadow: 0 0 28px rgba(82,255,224,.42); }
.copy-btn { border-radius: 16px; padding: 14px 16px; background: rgba(82,255,224,.14); border: 1px solid rgba(82,255,224,.28); }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; margin-top: 10px; }
.room-meta { display: grid; gap: 10px; margin: 22px 0; }
.room-meta span { padding: 12px 14px; border: 1px solid var(--border); background: rgba(255,255,255,.05); border-radius: 16px; color: #cfe2ff; }
.players-list, .scoreboard, .round-results, .final-scoreboard { display: grid; gap: 10px; }
.player-row, .score-row, .result-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: rgba(255,255,255,.06); }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 14px; font-weight: 1000; background: linear-gradient(135deg, rgba(32,167,255,.5), rgba(255,62,165,.5)); }
.player-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.host-badge { color: var(--cyan); font-size: 12px; font-weight: 900; margin-left: 8px; }
.hidden { display: none !important; }
.question-card { min-height: 520px; }
.topline { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 900; margin-bottom: 12px; }
.timer-wrap { height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); margin-bottom: 28px; }
.timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--pink)); transform-origin: left center; }
#question-text { font-size: clamp(28px, 4vw, 48px); line-height: 1.1; margin: 26px 0; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.choice { min-height: 170px; border-radius: 26px; padding: 22px; text-align: left; font-size: 22px; line-height: 1.2; background: rgba(255,255,255,.08); border: 1px solid var(--border); }
.choice:first-child { box-shadow: inset 0 0 0 1px rgba(32,167,255,.18); }
.choice:last-child { box-shadow: inset 0 0 0 1px rgba(255,62,165,.18); }
.choice.selected { transform: scale(.98); opacity: .7; border-color: rgba(82,255,224,.7); }
.choice.correct { border-color: rgba(56,247,166,.7); background: rgba(56,247,166,.14); }
.choice.wrong { border-color: rgba(255,65,109,.7); background: rgba(255,65,109,.13); }
#answer-feedback { margin-top: 16px; font-weight: 800; }
.score-row strong, .result-row strong { font-size: 18px; }
.score-points { color: var(--cyan); font-weight: 1000; }
.finish-panel { text-align: center; }
.final-scoreboard { margin: 24px 0; text-align: left; }
.toast { position: fixed; z-index: 10; right: 22px; bottom: 22px; padding: 14px 18px; border-radius: 18px; background: rgba(5,7,13,.88); border: 1px solid var(--border); color: var(--text); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 820px) {
  .app-shell { padding: 18px; place-items: start center; }
  .menu-grid, .pack-preview, .form-grid, .lobby-layout, .game-layout, .choices { grid-template-columns: 1fr; }
  h1 { letter-spacing: -3px; }
  .hero-card, .panel { border-radius: 24px; padding: 20px; }
  .choice { min-height: 110px; font-size: 18px; }
  .brand-mark { width: 60px; height: 60px; }
}
