/* Home page – requires shared/arcade.css (tokens, reset, base buttons) */
body { min-height: 100dvh; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
       background: radial-gradient(circle at 20% 0%, #082f4966, transparent 55%), radial-gradient(circle at 90% 100%, #4c1d9533, transparent 50%), #030712; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
               background-image: linear-gradient(#22d3ee0d 1px, transparent 1px), linear-gradient(90deg, #22d3ee0d 1px, transparent 1px); background-size: 42px 42px; }
.wrap { width: min(1080px, 100%); margin: 0 auto; }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; }
h1 { font-size: clamp(34px, 7vw, 64px); text-transform: uppercase; line-height: .95; text-shadow: var(--glow); }
h2 { font-size: clamp(20px, 3vw, 28px); text-transform: uppercase; }
p { color: var(--muted); line-height: 1.5; }
.tiny { font-size: 12px; color: var(--dim); }
.footer-note { text-align: center; margin-top: 24px; }

button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; letter-spacing: .06em;
               text-decoration: none; box-shadow: 0 0 22px #06b6d444; transition: filter .15s, transform .15s; }
button:active, .btn:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.secondary { box-shadow: none; }
.small { padding: 8px 14px; font-size: 12px; }

.panel { padding: clamp(18px, 4vw, 32px); border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: 0 0 50px #06b6d41f, inset 0 0 40px #0ea5e90d; }

/* Login */
#loginView { min-height: calc(100dvh - 40px); display: grid; place-items: center; }
#loginView .panel { width: min(520px, 100%); text-align: center; }
.logo { font-size: 54px; filter: drop-shadow(0 0 16px #22d3ee); }
form { display: grid; gap: 12px; margin-top: 22px; text-align: left; }
label { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7dd3fc; }
input, select { width: 100%; padding: 14px 16px; border: 1px solid #38bdf866; border-radius: 12px; background: #0c1c2b; color: white; font: inherit; font-size: 17px; }
input::placeholder { color: #4b6b80; }
.error { min-height: 1.3em; margin: 0; color: #fda4af; font-size: 13px; }
.known { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.chip { padding: 8px 14px; border-radius: 999px; border-color: #38bdf866; background: #0c1c2b; box-shadow: none; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 700; }

/* Home */
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 28px; }
.player { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: #06101ecc; }
.player b { color: var(--cyan); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 34px; }
.card { --c: var(--cyan); position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
        border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, #06101e), #06101e 60%); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 18%, transparent);
        transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 0 44px color-mix(in srgb, var(--c) 35%, transparent); }
.card .icon { font-size: 44px; filter: drop-shadow(0 0 12px var(--c)); }
.card h3 { font-size: 22px; text-transform: uppercase; }
.card p { margin: 0; font-size: 14px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; background: #ffffff12; color: #a5f3fc; font-size: 11px; font-weight: 700; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { padding: 8px 10px; border: 1px solid #38bdf833; border-radius: 10px; background: #020617b8; }
.stat span { display: block; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: #7dd3fc; }
.stat b { font-size: 18px; }
.card .actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.card.soon { --c: #64748b; border-style: dashed; align-items: center; justify-content: center; text-align: center; min-height: 260px; opacity: .75; }
.card.soon:hover { transform: none; }

/* Leaderboard */
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.board-head select { width: auto; min-width: 220px; font-size: 15px; padding: 10px 14px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #38bdf81f; }
th { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #7dd3fc; font-weight: 800; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.rank { width: 56px; font-weight: 900; font-size: 18px; }
tr.me td { background: #22d3ee14; }
tr.me td:nth-child(2) { color: var(--cyan); font-weight: 800; }
.empty { padding: 30px 10px; text-align: center; color: var(--dim); }

@media (max-width: 600px) {
  header { justify-content: center; text-align: center; }
  .hide-sm { display: none; }
  th, td { padding: 10px 6px; }
  .board-head select { width: 100%; }
}
