.lobby-page {
  --bg: #0B0F14;
  --card: #101b2b;
  --border: #344861;
  --ice: #3DF2E0;
  --hot: #E445FF;
  --lime: #FFD83D;
  --deep: #0E2A47;
  background-image: radial-gradient(ellipse at 68% 22%, var(--deep), transparent 52%), url(/grid.svg);
}

.lobby-page .top { background: #0b0f14f5; border-color: #264459; }
.lobby-page .nav { min-height: 88px; }
.lobby-page .logo { padding-block: 10px; }
.lobby-page .logo img { width: clamp(138px, 42vw, 224px); height: auto; }
.lobby-page .quiet { background: #141e31; }
.lobby-page .hero { gap: 12px; padding-block: clamp(30px, 6vw, 68px) 12px; }
.lobby-page .tag { color: var(--ice); }
.lobby-page .lede, .lobby-page .game p, .lobby-page .rewards p, .lobby-page .rewards small {
  font-family: system-ui, sans-serif;
}
.lobby-page h1 {
  color: #f7faff;
  font-size: clamp(2.75rem, 7vw, 6rem);
  letter-spacing: 0;
  line-height: .93;
  text-transform: uppercase;
  text-shadow: 3px 4px 0 #334973;
}
.lobby-page h1 em { color: var(--ice); text-shadow: 3px 4px 0 #275766; }
.lobby-page .lede { max-width: 40ch; }
.lobby-page .actions #start, .lobby-page #auth #submit {
  background: var(--ice);
  border-color: #9afff5;
  box-shadow: 3px 3px #216b75;
}
.lobby-page .actions a, .lobby-page #account {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: .55rem .9rem;
  border: 1px solid var(--ice);
  border-radius: 5px;
}
.lobby-page #account { border-color: var(--hot); }
.lobby-page .section-head h2 { color: var(--text); font-size: 1.85rem; text-transform: uppercase; }
.lobby-page .section-head::after { height: 2px; background: linear-gradient(90deg, var(--ice), #318c90 88%, transparent); }
.lobby-page .game {
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card) 55%);
  border: 1px solid var(--accent);
  border-bottom-width: 3px;
  border-radius: 10px;
}
.game.practice { --accent: #3DF2E0; }
.game.arena { --accent: #E445FF; }
.game.multiplayer { --accent: #FFD83D; }
.game-preview {
  justify-self: start;
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, var(--card));
  color: var(--text);
  box-shadow: none;
  margin-top: 12px;
}
.game-preview[aria-pressed="true"] { background: var(--accent); color: #0B0F14; }
#game-status { color: var(--muted); margin: 12px 0 0; }
.lobby-page .rewards { border-left: 3px solid var(--lime); }
#account-reward { color: var(--lime); border-left: 3px solid currentColor; padding-left: .7rem; }
.lobby-page #identity[data-reaction="loading"] { border-color: var(--ice); }
.lobby-page #identity[data-reaction="reward"] { border-color: var(--lime); box-shadow: 5px 5px #846626; }

.mascot { position: relative; width: min(100%, 560px); justify-self: center; --energy: 10px; }
.mascot .hero-wojak { width: 100%; height: auto; }
.mascot-effects { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.mascot-effects > path { fill: none; stroke-width: 4; stroke-linecap: square; opacity: 0; }
.mascot-effects .brain-light {
  stroke: var(--glow, var(--ice));
  filter: drop-shadow(0 0 var(--energy) var(--glow, var(--ice)));
  opacity: .45;
  animation: brain-pulse 3.8s ease-in-out infinite alternate;
}
.mascot[data-state] .brain-light { animation: none; opacity: .95; }
.mascot:is([data-state="win"], [data-state="reward"]) { --glow: #FFD83D; }
.mascot:is([data-state="incorrect"]) { --glow: #ff536c; }
.mascot[data-state="streak"] { --glow: #c88cff; }
.mascot[data-streak="2"] { --energy: 18px; }
.mascot[data-streak="3"] { --energy: 26px; --glow: #E445FF; }
.mascot[data-streak="3"] .brain-light { stroke-width: 6; }
.mascot-effects .eye-core { fill: #65dfff; filter: drop-shadow(0 0 7px #36dcff99); }
.mascot-effects .eye-light { fill: #c8f5ff; opacity: .95; filter: drop-shadow(0 0 5px #52dfff); }
.mascot-effects .eye-trail {
  opacity: .7; filter: drop-shadow(0 0 5px #52dfff);
  animation: eye-pulse 2.8s ease-in-out infinite alternate;
}
.mascot:is([data-state="select"], [data-state="welcome"], [data-state="reward"]) .eye-light {
  opacity: 1; stroke: #c8f5ff; filter: drop-shadow(0 0 8px #52dfff);
}
.mascot:is([data-state="select"], [data-state="welcome"], [data-state="reward"]) .eye-trail {
  animation: none; opacity: 1;
}
.mascot[data-state="loading"] .processing-light {
  opacity: 1; stroke: var(--ice); stroke-dasharray: 12 15; animation: processing .9s linear infinite;
}
.mascot[data-state="incorrect"] .glitch-light {
  opacity: .7; stroke: var(--glow); animation: glitch .32s steps(2, end) 2;
}
.credit-particles { opacity: 0; fill: #FFD83D; }
.mascot:is([data-state="reward"], [data-state="win"]) .credit-particles {
  opacity: .9; animation: credits .85s ease-out both; filter: drop-shadow(0 0 7px #FFD83D);
}
@keyframes brain-pulse { from { opacity: .26; } to { opacity: .7; } }
@keyframes eye-pulse { from { opacity: .5; } to { opacity: .8; } }
@keyframes processing { to { stroke-dashoffset: -54; } }
@keyframes glitch { 50% { transform: translateX(6px); } }
@keyframes credits { from { opacity: 0; transform: translateY(14px); } to { opacity: .9; transform: translateY(-8px); } }

@media (min-width: 760px) {
  .lobby-page .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .lobby-page .game { grid-template-rows: auto auto 1fr auto auto; }
}
@media (max-width: 759px) {
  .mascot { max-width: 420px; margin-block: -6px; }
  .game-preview { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot .mascot-effects *, .mascot[data-state] .mascot-effects * { animation: none; }
}
.play-practice { display:inline-flex; align-items:center; justify-self:start; min-height:44px; margin-top:12px; padding:8px 16px; background:#ffd260; color:#221606; box-shadow:3px 3px #945119; font-weight:700; } @media(max-width:759px){.play-practice{grid-column:2}}
