/* Night arcade: clearer hierarchy, readable playfield, responsive menus. */
:root { --panel: rgba(12, 20, 31, .96); --muted: #a3b3c5; --accent-2: #72f6dd; --radius: 22px; }
body { background: radial-gradient(ellipse at 12% 0, #16343d 0, transparent 55%), radial-gradient(ellipse at 100% 100%, #321b36, transparent 55%), #080e17; }
#app { max-width: 1440px; padding: max(14px, var(--safe-t)) max(18px, var(--safe-r)) max(12px, var(--safe-b)) max(18px, var(--safe-l)); gap: 10px; }
.brand h1 { font-family: var(--font-ui); font-size: 1.05rem; letter-spacing: .16em; text-shadow: none; }
.brand-mark { filter: none; }
.stat { border: 0; border-left: 1px solid #263342; border-radius: 0; padding: 5px 15px; background: none; }
.stat span:last-child { font-size: 1.1rem; }
.mission-bar { background: #101e2b; border: 0; border-radius: 6px; padding: 7px 12px; color: #b5c8d8; }
.stage-wrap { border: 1px solid #30404e; border-radius: 22px; box-shadow: 0 24px 80px #0006; }
.is-playing[data-game="runner"] .stage-wrap { background: linear-gradient(#0a172be0, #07101bf5), url('assets/bg-city.jpg') center / cover; }
.overlay { background: linear-gradient(110deg, #07131be8, #0b1228a8); backdrop-filter: blur(10px); padding: 24px; }
.screen-panel { max-width: 590px; border-color: #ffffff15; border-radius: 20px; height: auto; }
.screen-main { overflow-y: auto; justify-content: flex-start; padding: 24px; gap: 18px; }
.screen-footer { padding: 16px 24px; }
.screen-hub { max-width: 1000px; background: transparent; box-shadow: none; border: 0; }
.screen-hub .screen-main { gap: 22px; }
.screen-hub .start-hero { gap: 20px; }
.screen-hub h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.screen-hub .lead { max-width: 530px; font-size: .95rem; line-height: 1.6; }
.screen-hub .badge { color: #72f6dd; background: none; padding: 0; letter-spacing: .22em; }
.screen-hub .avatar-preview { width: 94px; height: 94px; border-radius: 24px; flex-shrink: 0; }
.screen-hub .nick-label { max-width: 350px; }
.nick-label input { background: #0a1420; border-color: #425162; border-radius: 10px; padding: 12px 14px; }
.game-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.game-card { position: relative; overflow: hidden; min-height: 215px; align-items: end; padding: 25px; grid-template-columns: 1fr auto; background: linear-gradient(0deg, #071521 4%, #071521a6 65%, #07152122), url('assets/bg-city.jpg') center 48% / cover; border-color: #4d777a; }
.game-card-race { background: linear-gradient(0deg, #131225 4%, #131225b0 65%, #13122522), url('assets/bg-road.jpg') center 56% / cover; border-color: #675176; }
.game-card::before { content: '01 / БЕСКОНЕЧНЫЙ ГОРОД'; position: absolute; top: 19px; left: 25px; color: #8fffe4; font-size: .65rem; letter-spacing: .14em; }
.game-card-race::before { content: '02 / НОЧНОЙ ЗАЕЗД'; color: #ffb4d8; }
.game-card-emoji { position: absolute; right: 25px; top: 28px; font-size: 3rem; }
.game-card-title { font-size: 1.35rem; }
.game-card-desc { max-width: 300px; color: #b9cbd4; line-height: 1.5; }
.game-card-go { border: 1px solid #ffffff40; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.game-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px #0005; }
.screen-hub .screen-footer { border: 0; background: transparent; padding-top: 0; }
.btn.primary { background: #82f3d5; color: #08211e; border-color: #82f3d5; text-shadow: none; box-shadow: 0 5px 22px #72f6dd18; }
.btn:focus-visible, .touch-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lead { line-height: 1.6; }
.arcade-hud { display: none; position: absolute; z-index: 3; top: 16px; left: 18px; right: 18px; justify-content: space-between; gap: 20px; pointer-events: none; }
.is-playing .arcade-hud { display: flex; }
.arcade-telemetry { width: 205px; padding: 12px 15px; background: #081521c9; border: 1px solid #b5f4ef25; border-radius: 12px; backdrop-filter: blur(8px); }
.arcade-telemetry:last-child { text-align: right; }
.arcade-telemetry small { display: block; font-size: 9px; letter-spacing: .12em; color: #a5bcc8; }
.arcade-telemetry strong { display: block; font-size: 23px; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.arcade-meter { height: 3px; background: #ffffff20; overflow: hidden; margin: 7px 0 10px; border-radius: 3px; }
.arcade-meter i { display: block; height: 100%; background: #72f6dd; transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }
.arcade-meter.power i { background: #ff8bbc; }
.arcade-notice { position: absolute; z-index: 4; top: 33%; left: 10%; right: 10%; text-align: center; pointer-events: none; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; text-shadow: 0 3px 15px #000; }
.is-playing .arcade-notice.visible { opacity: 1; transform: none; }
.arcade-notice strong { display: block; font-size: clamp(22px, 4vw, 44px); font-weight: 800; letter-spacing: .06em; }
.arcade-notice span { display: inline-block; font-size: 12px; margin-top: 8px; padding: 7px 14px; background: #07121cda; border-radius: 20px; color: #bce8dd; }
.stage-wrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; box-shadow: inset 0 0 100px #fe50a659; transition: opacity .3s; }
.is-playing.is-boosting .stage-wrap::after { opacity: 1; }
.touch-nitro { width: 72px; height: 72px; font-size: .8rem; border-color: #ff8bbc; color: #ffd4e6; }
.touch-nitro:disabled { opacity: .4; }
.touch-nitro:not(:disabled) { background: #7d285cbf; box-shadow: 0 0 24px #ff4d8d55; }
@media(max-width: 700px) {
  #app { padding: max(6px, var(--safe-t)) 6px max(6px, var(--safe-b)); gap: 5px; }
  .overlay { padding: 8px; }
  .screen-main, .screen-hub .screen-main { padding: 16px; gap: 14px; }
  .screen-hub .avatar-preview { width: 60px; height: 60px; }
  .screen-hub .lead { font-size: .8rem; line-height: 1.4; }
  .screen-footer { padding: 12px 16px; }
  .game-pick { grid-template-columns: 1fr; gap: 10px; }
  .game-card { min-height: 145px; padding: 18px; }
  .game-card::before { left: 18px; top: 14px; font-size: .58rem; }
  .game-card-emoji { top: 16px; right: 18px; font-size: 2rem; }
  .game-card-title { font-size: 1.1rem; }
  .game-card-desc { font-size: .7rem; }
  .stat span:last-child { font-size: .88rem; }
  .arcade-hud { top: 8px; left: 8px; right: 8px; gap: 8px; }
  .arcade-telemetry { width: 145px; padding: 8px 10px; }
  .arcade-telemetry strong { font-size: 17px; }
  .arcade-telemetry small { font-size: 8px; }
  .arcade-notice span { font-size: 10px; }
}
@media(max-height: 560px) and (min-width: 701px) {
  .overlay { padding: 8px; }
  .screen-hub .screen-main { gap: 10px; padding: 10px; }
  .screen-hub h2 { font-size: 2rem; }
  .screen-hub .avatar-preview { display: none; }
  .screen-hub .lead, .screen-hub .screen-footer { display: none; }
  .game-card { min-height: 135px; }
  .game-card-emoji { display: none; }
  .arcade-telemetry { padding: 7px 10px; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
