/* Neon Hockey Flick — premium arcade UI (2026-10-16).
   Loaded after the shared base + device fit rules; no legacy rink overrides. */
:root {
  color-scheme: dark;
  --panel: rgba(7, 19, 36, .94);
  --cyan: #53efff;
  --pink: #ff5dad;
  --gold: #ffe18a;
  --ink: #f3faff;
}
html, body { min-height: 100%; }
body {
  background: #030914;
}
#stage {
  isolation: isolate;
  background:
    radial-gradient(ellipse 50% 55% at 47% 30%, rgba(10, 91, 128, .28), transparent 82%),
    linear-gradient(120deg, #020916, #0a0d24 53%, #070c19);
}
#stage::before {
  content: ''; pointer-events: none; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(110, 231, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent, #000 48%, transparent);
}
.bg-glow {
  background:
    radial-gradient(ellipse 38% 40% at 12% 18%, rgba(28, 211, 255, .26), transparent),
    radial-gradient(ellipse 42% 46% at 90% 85%, rgba(237, 43, 154, .22), transparent);
}
#frame {
  width: min(100vw, 56.25dvh);
  height: min(100dvh, 177.7778vw);
  max-width: 100%;
  max-height: 100dvh;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(103, 236, 255, .36), 0 0 48px rgba(29, 179, 255, .11), 0 24px 80px rgba(0, 0, 0, .65);
}
canvas#game { width: 100%; height: 100%; filter: none; }
.hud {
  background: linear-gradient(180deg, rgba(2, 10, 26, .96), rgba(3, 12, 26, .75) 69%, transparent);
  border: 0;
  box-shadow: none;
  padding: max(8px, env(safe-area-inset-top)) 9px 16px;
}
.hud-row { gap: 5px; }
.scoreboard {
  min-width: 0;
  padding: 3px 9px;
  border: 1px solid rgba(116, 215, 245, .26);
  border-radius: 10px;
  background: rgba(4, 14, 34, .79);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 6px 14px rgba(0,0,0,.18);
}
.sb-side { gap: 5px; }
.sb-label { font-size: 9px; letter-spacing: .12em; }
.sb-score { font-size: 25px; }
.sb-sep { font-size: 16px; }
.hud-btn {
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: 1px solid rgba(100, 220, 251, .3);
  border-radius: 12px;
  background: rgba(4, 25, 48, .9);
  color: #f6fcff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 5px 12px rgba(0,0,0,.2);
}
.hud-btn:hover { background: rgba(17, 66, 92, .95); }
.power-wrap {
  gap: 7px;
  padding: 7px 8px;
  margin-top: 5px;
  border: 1px solid rgba(99, 211, 245, .13);
  border-radius: 10px;
  background: rgba(4, 17, 40, .7);
}
.power-label { color: var(--gold); font-size: 10px; }
.power-bar { height: 8px; border-radius: 20px; background: #1d3245; }
.power-bar > span { background: linear-gradient(90deg, #ffbb55, #ff67a6); }
.rally-chip { color: #bdeaff; font-size: 10px; }
.screen {
  z-index: 12;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 50% 19%, rgba(5, 101, 152, .24), transparent 55%),
    linear-gradient(180deg, rgba(2, 12, 30, .93), rgba(1, 6, 19, .95));
  backdrop-filter: blur(8px);
}
.screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent 49.7%, rgba(66, 212, 255, .1) 50%, transparent 50.3%),
              radial-gradient(circle at 50% 50%, transparent 18%, rgba(67, 208, 255, .08) 18.3%, transparent 18.9%);
  opacity: .6;
}
.panel {
  position: relative;
  width: 100%;
  max-width: 410px;
  max-height: calc(100dvh - 24px);
  padding: clamp(18px, 4vh, 30px) clamp(17px, 4vw, 27px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(135deg, rgba(31, 87, 125, .2), transparent 47%),
    linear-gradient(160deg, rgba(9, 24, 46, .97), rgba(5, 12, 27, .98));
  border: 1px solid rgba(94, 231, 255, .44);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(240, 252, 255, .1), 0 0 0 5px rgba(42, 203, 255, .035), 0 25px 65px rgba(0,0,0,.55);
  text-align: center;
  color: var(--ink);
}
.panel::after {
  content: ''; display: block;
  position: absolute; left: 20%; right: 20%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .8;
  pointer-events: none;
}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; margin: 0 0 14px;
  color: #a8eaff;
  border: 1px solid rgba(100, 212, 251, .32);
  border-radius: 99px;
  background: rgba(45, 160, 218, .10);
  letter-spacing: .16em; font: 700 10px/1.3 var(--mono);
  text-shadow: none;
}
.logo {
  margin: 0 0 16px;
  font: 700 clamp(36px, 9vw, 52px)/.93 var(--font);
  letter-spacing: -.025em; color: var(--ink);
  text-shadow: 0 0 32px rgba(36, 216, 255, .4);
}
.logo span {
  display: block; color: var(--cyan);
  text-shadow: 0 0 25px rgba(35, 211, 255, .45);
}
.logo em {
  display: block; margin-top: 5px;
  font-size: .43em; font-weight: 700; letter-spacing: .38em;
  color: var(--pink); text-shadow: 0 0 20px rgba(255, 65, 170, .4);
}
.subtitle { max-width: 320px; margin: 0 auto 13px; color: #becfdf; line-height: 1.5; font-size: 13px; }
.match-badges {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  margin: 0 0 16px;
}
.match-badges span {
  padding: 5px 9px; border: 1px solid rgba(115, 216, 246, .2);
  border-radius: 9px; background: rgba(85, 163, 235, .09);
  color: #b6d6ea; font: 700 10px/1.2 var(--mono);
}
.difficulty-picker { border: 0; padding: 0; margin: 0 0 15px; min-width: 0; }
.difficulty-picker legend {
  width: 100%; margin: 0 0 8px;
  color: #c9dbea; font-size: 10px; font-weight: 700; letter-spacing: .13em;
  text-align: center;
}
.difficulty-options {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px; gap: 4px; background: rgba(0, 10, 27, .72);
  border: 1px solid rgba(93, 214, 244, .2); border-radius: 13px;
}
.difficulty-options button {
  min-width: 0; min-height: 43px; padding: 8px 4px;
  background: transparent; border: 1px solid transparent;
  border-radius: 10px; color: #9fb6c8; font: 700 12px var(--font);
  cursor: pointer;
}
.difficulty-options button[aria-pressed="true"] {
  color: #001f2e; background: linear-gradient(135deg, #8ef6ff, #40c1ed);
  border-color: #b7f9ff; box-shadow: 0 4px 14px rgba(54, 212, 246, .2);
}
.btn {
  min-height: 48px; padding: 13px 15px; margin-bottom: 9px;
  border-radius: 13px; font: 700 14px/1.35 var(--font);
  letter-spacing: .13em; box-shadow: none;
}
.btn.primary {
  color: #041928; background: linear-gradient(130deg, #a3f7ff, #3de0ff 58%, #46b8ed);
  box-shadow: 0 8px 28px rgba(24, 202, 243, .25);
}
.btn.ghost { color: #e7f8ff; background: rgba(73, 139, 185, .1); border: 1px solid rgba(111, 200, 246, .26); }
.btn.ghost:hover { background: rgba(78, 159, 214, .2); }
.screen-title {
  color: #f2fbff; text-align: center; letter-spacing: .1em;
  font: 700 clamp(25px, 7vw, 34px)/1.15 var(--font);
  text-shadow: none; margin-bottom: 14px;
}
.screen-copy { color: #afc5d5; font-size: 13px; line-height: 1.5; margin: -3px auto 20px; max-width: 280px; }
.best-line { margin-top: 14px; padding: 0; border: 0; color: #a9bfd3; }
.best-line span { color: var(--gold); font-weight: 700; }
.auth-row { margin-top: 13px; padding-top: 12px; align-items: center; border-top: 1px solid rgba(116, 213, 243, .15); }
.auth-status { color: #a4bdce; }
.auth-link { color: var(--pink); }
.controls-hint { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(116, 213, 243, .12); color: #92b0c5; }
kbd { background: rgba(89, 173, 219, .16); border: 1px solid rgba(123, 223, 244, .26); border-radius: 5px; color: #e3faff; }
.how-list { color: #c2d9e6; text-align: left; }
.how-list b { color: var(--cyan); }
.how-list li { margin-bottom: 11px; }
.how-list li::before { color: var(--pink); }
.final-score {
  padding: 5px 0 14px; margin-bottom: 9px; border: 0;
  color: var(--gold); text-shadow: 0 0 20px rgba(250,198,75,.23);
  font: 700 44px var(--mono);
}
.stat-row { border-bottom: 1px solid rgba(124, 189, 212, .14); padding: 7px 2px; }
.stat-row span { color: #a2bccc; }
.stat-row b { color: var(--cyan); }
.screen-title.win { color: #88ffc9; }
.screen-title.lose { color: #ff9fb2; }
.leaderboard {
  max-height: 158px; overflow-y: auto;
  margin: 12px 0; padding: 10px;
  border: 1px solid rgba(94, 191, 221, .2);
  border-radius: 12px; background: rgba(0, 9, 24, .45);
}
.lb-title { color: #d0ecf7; }
.lb-list li { border-radius: 7px; border: 0; }
.lb-name { color: #cae1ec; }
.lb-rank { color: var(--cyan); }
.lb-pts { color: var(--gold); }
.nn-score-nudge { background: rgba(24, 97, 133, .17); color: #e3f5ff; border-radius: 12px; border-color: rgba(110,213,243,.3); }
.nn-nudge-signup { border-radius: 9px; color: #031d2d; background: var(--cyan); }
.nn-nudge-later { color: #daeef8; border-radius: 9px; }
#screen-gameover .panel, #screen-how .panel, #screen-pause .panel { margin: auto; }
#screen-gameover .btn:last-child, #screen-pause .btn:last-child, #screen-how .btn:last-child { margin-bottom: 0; }
#screen-start .panel { margin-top: 0; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (max-width: 390px) {
  .hud { padding-left: 5px; padding-right: 5px; }
  .hud-group.right { gap: 3px; }
  .scoreboard { gap: 4px; padding: 3px 5px; }
  .sb-side { gap: 3px; }
  .sb-score { font-size: 20px; }
  .sb-label { font-size: 7px; letter-spacing: .05em; }
  .sb-sep { font-size: 13px; }
  .rally-chip { font-size: 9px; }
}
@media (max-height: 720px) {
  .panel { padding-top: 15px; padding-bottom: 15px; }
  .logo { font-size: clamp(29px, 8vw, 40px); margin-bottom: 10px; }
  .subtitle { margin-bottom: 10px; }
  .tag { margin-bottom: 9px; }
  .difficulty-picker { margin-bottom: 9px; }
  .best-line, .auth-row, .controls-hint { margin-top: 8px; }
  .screen-copy { margin-bottom: 12px; }
}
@media (max-height: 500px) {
  .screen { align-items: flex-start; }
  .panel { max-height: calc(100dvh - 14px); padding: 12px 15px; margin: auto; }
  .logo { font-size: 28px; }
  .controls-hint { display: none; }
  #screen-gameover .leaderboard { max-height: 85px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.active, .bg-glow, .flash.hit, .goal-banner.show { animation: none; }
  .bg-glow { animation: none; }
}
