:root { --b1: #22e6ff; --b2: #ff4fd8; --bg: #07060f; --panel: #12101f; --text: #f3f1ff; --muted: #a9a3c9; --accent: #22e6ff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

/* ---------- home ---------- */
body.home { min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, var(--g1, #3b0d5c) 0%, transparent 60%), radial-gradient(900px 500px at 110% 10%, var(--g2, #06334a) 0%, transparent 55%), var(--bg); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 18px 12px; backdrop-filter: blur(14px); background: rgba(7,6,15,.6); border-bottom: 1px solid rgba(255,255,255,.06); }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; letter-spacing: .08em; }
.logo b { font-weight: 900; background: linear-gradient(90deg, var(--b1), var(--b2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo i { font-style: normal; font-weight: 600; color: var(--muted); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--b1), var(--b2)); color: #07060f; font-size: 16px; box-shadow: 0 0 20px var(--b2glow, rgba(255,79,216,.5)); }
.pill { font-size: 13px; color: var(--muted); border: 1px solid rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
main { max-width: 1100px; margin: 0 auto; padding: 0 18px 30px; }
.hero { padding: 26px 0 8px; }
.hero h1 { font-size: clamp(34px, 9vw, 60px); line-height: 1.02; margin: 0 0 12px; font-weight: 900; letter-spacing: -.02em; }
.hero h1 span { background: linear-gradient(90deg, var(--h1, #ffe14d), var(--b2) 60%, var(--h3, #a77bff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 560px; }
h2 { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 10px 30px -10px var(--c); }
.card:active { transform: scale(.97); }
.thumb { position: relative; aspect-ratio: 4 / 3; background: #0b0a16; }
.thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800; background: rgba(7,6,15,.8); border: 1px solid var(--c); padding: 4px 8px; border-radius: 999px; }
.meta { padding: 10px 12px 12px; }
.meta h3 { margin: 0 0 3px; font-size: 16px; font-weight: 800; color: var(--c); }
.meta p { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.35; min-height: 2.7em; }
.stats { display: flex; justify-content: space-between; font-size: 12px; color: #d8d3f5; }
.recent { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--c); border-radius: 14px; padding: 6px 14px 6px 6px; }
.chip img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.chip b { display: block; font-size: 14px; } .chip small { color: var(--muted); font-size: 12px; }
.foot { text-align: center; color: #6f6992; font-size: 13px; padding: 20px 18px max(24px, env(safe-area-inset-bottom)); }

/* ---------- play ---------- */
body.play { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; background: #0c0a18; border-bottom: 1px solid rgba(255,255,255,.07); }
.iconbtn { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: #171429; color: var(--text); font-size: 22px; cursor: pointer; padding: 0; line-height: 1; }
.iconbtn:active { transform: scale(.94); }
.gtitle { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.mini-brand { font-size: 10px; letter-spacing: .2em; color: var(--muted); font-weight: 700; }
#gname { font-weight: 900; font-size: 17px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud { display: flex; gap: 12px; margin-right: 4px; }
.hud div { text-align: center; line-height: 1.05; }
.hud small { display: block; font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.hud b { font-size: 18px; font-variant-numeric: tabular-nums; }
#stage { position: relative; flex: 1 1 auto; display: grid; place-items: center; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); min-height: 0; }
#screen { display: block; border-radius: 14px; touch-action: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 0 40px -8px var(--accent); background: #000; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,4,12,.62); backdrop-filter: blur(4px); padding: 20px; }
.overlay[hidden] { display: none; }
.ovcard { width: min(320px, 100%); text-align: center; background: rgba(18,16,31,.95); border: 1px solid var(--accent); border-radius: 22px; padding: 24px 20px 18px; box-shadow: 0 0 50px -10px var(--accent); }
.ovcard h1 { margin: 0 0 6px; font-size: 30px; font-weight: 900; color: var(--accent); text-shadow: 0 0 20px var(--accent); }
.ovsub { margin: 0 0 10px; font-weight: 800; font-size: 17px; }
#ov-text { color: var(--muted); font-size: 14.5px; line-height: 1.45; margin: 0 0 18px; }
.cta { width: 100%; font: inherit; font-size: 19px; font-weight: 900; padding: 14px; border-radius: 14px; border: 0; background: var(--accent); color: #07060f; cursor: pointer; box-shadow: 0 0 24px -4px var(--accent); }
.cta:active { transform: scale(.97); }
.ghost { display: block; width: 100%; margin-top: 10px; font: inherit; font-size: 15px; font-weight: 700; padding: 11px; border-radius: 12px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.16); cursor: pointer; }
.ghost[hidden] { display: none; }
@media (max-width: 360px) { .hud { gap: 8px; } .hud b { font-size: 16px; } #gname { font-size: 15px; } }

.note { margin: -4px 0 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.note a, .foot a { color: var(--accent); text-decoration: underline; }
.thumb img[src$=".jpg"] { object-fit: cover; }
/* credits */
body.credits main { max-width: 760px; padding-top: 10px; }
.credit { background: var(--panel); border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 14px 16px; margin: 0 0 12px; }
.credit h3 { margin: 0 0 4px; font-size: 17px; }
.credit p { margin: 2px 0; color: var(--muted); font-size: 14px; line-height: 1.45; word-break: break-word; }
.credit a { color: var(--accent); }

/* top games picked in the Admin app */
.card.feat { border-color: var(--c); }
