* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0d1530; color: #fff; font-family: Inter, system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
.hidden { display: none !important; }
.lg { font-family: "Luckiest Guy", Impact, sans-serif; font-weight: 400; }

#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
#top { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); text-align: center; }
#top b { display: block; font-family: "Luckiest Guy", Impact, sans-serif; font-weight: 400; font-size: 32px; letter-spacing: 2px; color: #ffd34d; -webkit-text-stroke: 1px #5a2a00; }
#top span { font-size: 16px; font-weight: 800; }
#scores { position: absolute; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; }
#scores div { display: flex; align-items: center; gap: 8px; background: rgba(10,14,40,.55); padding: 6px 12px; border-radius: 10px; font-weight: 800; font-size: 15px; min-width: 150px; }
#scores div.me { box-shadow: 0 0 0 2px #ffd34d; }
#scores i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.75); }
#scores b { margin-left: auto; font-family: "Luckiest Guy", Impact, sans-serif; font-weight: 400; font-size: 20px; color: #ffd34d; }
#center { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-family: "Luckiest Guy", Impact, sans-serif; font-size: 96px; color: #fff; -webkit-text-stroke: 3px #3a1d6e; text-shadow: 0 7px 0 #3a1d6e; white-space: nowrap; text-align: center; }
#center small { display: block; font-size: 26px; -webkit-text-stroke: 1px #3a1d6e; text-shadow: 0 3px 0 #3a1d6e; }
#center.pop { animation: pop .35s cubic-bezier(.2,1.8,.4,1); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.3); } }
#target { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); padding: 8px 34px; border-radius: 999px; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 44px; letter-spacing: 3px; color: #fff; -webkit-text-stroke: 2px rgba(0,0,0,.45); border: 4px solid #fff; box-shadow: 0 8px 0 rgba(0,0,0,.25); }
#help { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 14px; font-weight: 700; background: rgba(0,0,0,.35); padding: 6px 14px; border-radius: 8px; white-space: nowrap; }
#help b { color: #ffd34d; }

#tags { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
#tags div { position: absolute; transform: translate(-50%, -100%); font-weight: 800; font-size: 14px; white-space: nowrap; text-align: center; text-shadow: 0 2px 3px rgba(0,0,0,.8); }
#tags div span { display: block; font-family: "Luckiest Guy", Impact, sans-serif; font-weight: 400; font-size: 24px; color: #ffd34d; -webkit-text-stroke: 1px #3a1d6e; }

#intro, #results { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 5; padding: 16px; background: rgba(10,14,40,.35); }
.card { width: min(560px, 100%); max-height: 100%; overflow: auto; background: rgba(16,20,48,.92); border: 2px solid rgba(255,255,255,.14); border-radius: 20px; padding: 24px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.5); text-align: center; }
#intro .card { animation: slide .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes slide { from { transform: translateY(-60px) scale(.8); opacity: 0; } }
.num { font-size: 13px; letter-spacing: 4px; color: #9fb0e0; font-weight: 800; }
.icon { font-size: 64px; margin: 6px 0 0; }
#intro h1, #results h2 { font-family: "Luckiest Guy", Impact, sans-serif; font-weight: 400; font-size: 46px; color: #ffd34d; -webkit-text-stroke: 1px #5a2a00; text-shadow: 0 5px 0 #5a2a00; letter-spacing: 1px; }
#intro p { margin: 10px 0 12px; font-size: 18px; color: #e6eaff; line-height: 1.4; }
.keys { display: inline-block; background: rgba(255,255,255,.08); border-radius: 10px; padding: 8px 14px; font-weight: 800; color: #ffd34d; }
#rlist { margin: 14px 0 6px; display: flex; flex-direction: column; gap: 8px; }
#rlist div { display: grid; grid-template-columns: 40px 18px 1fr auto 60px; align-items: center; gap: 10px; text-align: left; background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 12px; font-weight: 800; animation: slide .4s both; }
#rlist div.me { box-shadow: 0 0 0 2px #ffd34d; }
#rlist .m { font-size: 26px; text-align: center; } #rlist i { width: 16px; height: 16px; border-radius: 50%; }
#rlist .v { color: #c9d1ee; font-size: 14px; } #rlist .p { font-family: "Luckiest Guy", Impact, sans-serif; font-weight: 400; font-size: 24px; color: #7dff8a; text-align: right; }
.sub { color: #9fb0e0; font-size: 14px; font-weight: 700; margin-top: 6px; }

#podium { position: fixed; inset: 0; z-index: 5; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 24px 16px; }
.ptitle { font-family: "Luckiest Guy", Impact, sans-serif; font-size: clamp(40px, 8vw, 84px); color: #ffd34d; -webkit-text-stroke: 2px #5a2a00; text-shadow: 0 7px 0 #5a2a00; text-align: center; animation: slide .7s cubic-bezier(.2,1.5,.4,1) both; }
.pbtns { display: flex; gap: 12px; pointer-events: auto; flex-wrap: wrap; justify-content: center; }
.pbtns .go { width: auto; padding: 12px 40px; text-decoration: none; display: inline-block; }

#menu { position: fixed; inset: 0; display: flex; align-items: center; justify-content: flex-start; padding: 16px 16px 16px max(16px, 4vw); z-index: 10;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,140,60,.3), transparent 50%), radial-gradient(ellipse at 80% 90%, rgba(80,120,255,.3), transparent 50%), rgba(10,14,40,.35); }
#menu .card { text-align: left; width: min(580px, 100%); }
.logo { font-family: "Luckiest Guy", Impact, sans-serif; font-size: 76px; line-height: 1; color: #ffd34d; -webkit-text-stroke: 2px #5a2a00; text-shadow: 0 6px 0 #5a2a00; transform: rotate(-2deg); }
.logo span { color: #ff7ac8; -webkit-text-stroke-color: #5a0a3a; text-shadow: 0 6px 0 #5a0a3a; }
.tag { margin: 12px 0 10px; color: #d8def5; font-size: 16px; line-height: 1.4; }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.games div { background: rgba(255,255,255,.06); border-radius: 12px; padding: 10px 12px; }
.games b { display: block; font-size: 16px; } .games small { color: #c9d1ee; font-size: 13px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .games, .btns { grid-template-columns: 1fr; } .logo { font-size: 56px; } }
h3 { margin: 16px 0 8px; font-size: 13px; letter-spacing: 4px; color: #9fb0e0; }
.go { margin-top: 16px; width: 100%; padding: 14px; border: 0; border-radius: 12px; cursor: pointer; font-family: "Luckiest Guy", Impact, sans-serif; font-size: 26px; letter-spacing: 1px; text-align: center;
  background: linear-gradient(180deg, #ffe066, #ffb400); color: #3a1d6e; box-shadow: 0 6px 0 #b36b00; }
.go.blue, .go.alt { background: linear-gradient(180deg, #5fd2ff, #2a8ff0); color: #fff; box-shadow: 0 6px 0 #1a5fb0; }
.go:active { transform: translateY(3px); box-shadow: 0 3px 0 #b36b00; }
.go:disabled { filter: grayscale(1); opacity: .6; cursor: default; }
#slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#slots div { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); border: 2px dashed rgba(255,255,255,.18); font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
#slots div.on { border-style: solid; border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); }
#slots i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
#lstatus { margin-top: 10px; font-size: 14px; color: #c9d1ee; min-height: 18px; text-align: center; }
.small { margin-top: 14px; font-size: 12px; color: #9fb0e0; }

#touch { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#stick { position: absolute; left: 30px; bottom: 30px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.35); pointer-events: auto; }
#stick i { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: rgba(255,255,255,.6); }
#jbtn { position: absolute; right: 36px; bottom: 40px; width: 110px; height: 110px; border-radius: 50%; border: 0; pointer-events: auto; font-size: 54px; color: #3a1d6e; background: linear-gradient(180deg, #ffe066, #ffb400); box-shadow: 0 6px 0 #b36b00; }
#help:empty { display: none; }
body.g0 #center { top: 86%; font-size: 64px; }
body.g0 #center small { font-size: 20px; }
