/* Ura Games: the family's arcade machine. One 1280 × 720 stage, scaled to the screen; every menu is pixel type
   on a dark night, the remote (or keyboard, or a finger) moves a glowing choice. The engine's own home and
   overlays stay underneath, hidden: this shell drives them. */
:root {
  --ink: #0b0618;
  --night: #120a2a;
  --gold: #ffd43b;
  --brass: #f0b84a;
  --chalk: #f7efe6;
  --dust: #a99cc9;
  --hot: #ff7a3a;
  --px: "Press Start 2P", ui-monospace, monospace;
  --disp: "Pixelify Sans", "Press Start 2P", ui-monospace, monospace;
}
html, body { background: #000 !important; }
body:not(.playing) { padding: 0 !important; overflow: hidden; }
#home { display: none !important; }
.bar { display: none !important; }
#ovTitle, #ovOver, #ovWin { display: none !important; }
body.playing { padding: 0 !important; }
body.playing #fit { height: 100vh; }
body.playing #stage { box-shadow: none !important; }

#ura { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; pointer-events: none; }
#ura.on { pointer-events: auto; background: radial-gradient(ellipse at 50% 30%, #241452 0%, #0b0618 70%); }
#ura .stage { position: relative; width: 1280px; height: 720px; flex: none; transform-origin: center; color: var(--chalk); font-family: var(--px); }
#ura .scr { position: absolute; inset: 0; display: none; }
#ura .scr.on { display: block; animation: scrIn .25s steps(4); }
@keyframes scrIn { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
#ura canvas { image-rendering: pixelated; }
#ura .crt { position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply; }
#ura .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
#ura h1, #ura h2 { margin: 0; font-weight: 400; text-align: center; letter-spacing: 2px; }
#ura .big { font-size: 44px; color: var(--gold); text-shadow: 4px 4px 0 #b4380e, 8px 8px 0 #000; }
#ura .mid { font-size: 22px; }
#ura .small { font-size: 13px; color: var(--dust); }
#ura .blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#ura .hint { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 13px; color: var(--dust); }

/* ── who plays ── */
#ura .who { position: absolute; left: 0; right: 0; top: 150px; height: 460px; display: flex; align-items: flex-end; justify-content: center; gap: 30px; }
#ura .pl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; transition: transform .15s steps(3); }
#ura .pl canvas { display: block; }
#ura .pl .nm { font-size: 18px; color: var(--chalk); text-shadow: 3px 3px 0 #000; }
#ura .pl .cup { font-size: 11px; color: var(--dust); }
#ura .pl .pad { width: 150px; height: 18px; background: #000; box-shadow: 0 0 0 4px #2a1f4a; }
#ura .pl.kid .pad { width: 210px; }
#ura .pl.sel { transform: translateY(-14px); }
#ura .pl.sel .nm { color: var(--c); font-size: 24px; }
#ura .pl.sel .pad { background: var(--c); box-shadow: 0 0 0 4px #000, 0 0 40px 12px var(--c); animation: pad .5s steps(2) infinite; }
@keyframes pad { 50% { filter: brightness(1.5); } }
#ura .pl.sel::before { content: "▼"; position: absolute; top: -34px; color: var(--c); font-size: 22px; animation: hop .5s steps(2) infinite; }
@keyframes hop { 50% { transform: translateY(-8px); } }
#ura .ready { position: absolute; left: 0; right: 0; top: 330px; font-size: 40px; text-align: center; color: var(--gold); text-shadow: 4px 4px 0 #000; display: none; }
#ura .ready.on { display: block; animation: zoom .6s steps(6); }
@keyframes zoom { from { transform: scale(3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── game select ── */
#ura .topbar { position: absolute; left: 36px; right: 36px; top: 26px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
#ura .me { display: flex; align-items: center; gap: 12px; }
#ura .me canvas { width: 40px; height: 60px; }
#ura .me .n { color: var(--c); font-size: 18px; }
#ura .tab { font-size: 12px; color: var(--dust); padding: 8px 12px; box-shadow: 0 0 0 3px #2a1f4a; cursor: pointer; }
#ura .tab.sel { color: #000; background: var(--gold); box-shadow: 0 0 0 3px #000, 0 0 20px var(--gold); }
#ura .rail { position: absolute; left: 0; right: 0; top: 120px; height: 440px; }
#ura .cab { position: absolute; top: 40px; width: 300px; transition: left .22s steps(5), transform .22s steps(5), opacity .22s; cursor: pointer; }
#ura .cab .scr2 { position: relative; background: #000; padding: 10px; box-shadow: 0 0 0 6px var(--c), 0 0 0 10px #000; }
#ura .cab canvas { display: block; width: 280px; height: 158px; }
#ura .cab .t { margin-top: 32px; text-align: center; font-size: 13px; line-height: 1.6; color: var(--chalk); min-height: 42px; }
#ura .cab.sel { transform: scale(1.38); z-index: 3; }
#ura .cab.sel .scr2 { animation: flick 3s infinite; }
#ura .cab.sel .scr2::after { content: ""; position: absolute; inset: 10px; background: repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 2px, transparent 2px 4px); pointer-events: none; }
@keyframes flick { 0%, 96%, 100% { filter: none; } 97% { filter: brightness(1.8) contrast(1.4); } 98% { filter: brightness(.7); } }
#ura .cab.sel canvas { animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }
#ura .cab.sel .t { color: var(--c); text-shadow: 2px 2px 0 #000; }
#ura .cab:not(.sel) { opacity: .45; }
/* the marquee: bulbs chasing round the chosen screen */
#ura .bulbs { position: absolute; inset: -22px; pointer-events: none; display: none; }
#ura .cab.sel .bulbs { display: block; }
#ura .bulbs i { position: absolute; width: 8px; height: 8px; background: #553; box-shadow: 0 0 0 2px #000; }
#ura .bulbs i.lit { background: #fff6b0; box-shadow: 0 0 0 2px #000, 0 0 10px 3px var(--gold); }
#ura .press { position: absolute; left: 0; right: 0; top: 520px; text-align: center; font-size: 16px; color: var(--hot); }
#ura .scores { position: absolute; right: 36px; top: 560px; left: 36px; display: flex; justify-content: center; gap: 30px; font-size: 13px; }
#ura .scores .r { display: flex; align-items: center; gap: 8px; color: var(--chalk); }
#ura .scores .r .d { width: 12px; height: 12px; background: var(--c); box-shadow: 0 0 0 2px #000; }
#ura .scores .r.top { color: var(--gold); }
#ura .arrow { position: absolute; top: 230px; font-size: 30px; color: var(--gold); animation: blink 1s steps(2) infinite; }

/* ── a game's start card, pause, game over, win ── */
#ura .card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 900px; text-align: center; }
#ura .card .cv { display: block; margin: 0 auto 22px; width: 480px; height: 270px; box-shadow: 0 0 0 6px var(--c), 0 0 0 10px #000; background: #000; }
#ura .card p { font-size: 14px; line-height: 1.8; color: var(--dust); margin: 14px auto; max-width: 780px; }
#ura .opts { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 26px; font-size: 22px; }
#ura .opts.row { flex-direction: row; justify-content: center; gap: 70px; }
#ura .opt { position: relative; color: var(--chalk); cursor: pointer; padding: 4px 8px; }
#ura .opt.sel { color: var(--gold); }
#ura .opt.sel::before { content: "➜"; position: absolute; left: -48px; color: var(--hot); animation: nudge .5s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
#ura .hearts { display: flex; justify-content: center; gap: 14px; margin-bottom: 22px; }
#ura .hearts .e { color: #3a2a5a; }
#ura .hearts .f { color: #ff3355; }
#ura .over { font-size: 76px; background: linear-gradient(#ffd43b, #ff7a3a 55%, #c2412a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(6px 6px 0 #3a1505); letter-spacing: 4px; }
#ura .score { font-size: 20px; color: var(--chalk); margin-top: 22px; }
#ura .rec { font-size: 26px; color: var(--gold); margin-top: 18px; animation: rainbow 1s steps(6) infinite; }
@keyframes rainbow { 0% { color: #ff3355; } 33% { color: #ffd43b; } 66% { color: #3ccf6e; } 100% { color: #3d9be0; } }
#ura .fw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#ura .pause { background: rgba(5, 3, 15, .94); }

/* ── hall of fame ── */
#ura table { margin: 30px auto 0; border-collapse: separate; border-spacing: 0 10px; font-size: 14px; }
#ura th { color: var(--dust); font-weight: 400; padding: 0 22px 8px; font-size: 12px; }
#ura td { padding: 10px 22px; background: #1b1238; text-align: center; }
#ura td:first-child { text-align: left; color: var(--chalk); }
#ura td.top { color: var(--gold); }
#ura .tot td { background: #2a1f4a; color: var(--gold); }
#ura th .d { display: inline-block; width: 12px; height: 12px; background: var(--c); margin-right: 6px; box-shadow: 0 0 0 2px #000; }
