*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0d1117;
    --surface:  #161b22;
    --surface2: #21262d;
    --border:   #30363d;
    --text:     #e6edf3;
    --muted:    #7d8590;
    --accent:   #f0b429;
    --radius:   12px;
}

body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; min-height: 100vh; }

/* ── Header ── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-nav { max-width: 960px; margin: 0 auto; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 1.2rem; text-decoration: none; font-weight: 700; color: var(--text); }
.btn-ghost-sm { background: none; border: 1px solid var(--border); color: var(--muted); padding: 0.3rem 0.6rem; border-radius: 6px; font-size: 0.82rem; text-decoration: none; }
.btn-ghost-sm:hover { color: var(--text); }

/* ── Lobby ── */
.lobby { max-width: 800px; margin: 3rem auto; padding: 0 1rem; }
.lobby-title { font-size: 1.8rem; margin-bottom: 1.5rem; text-align: center; }
.game-grid { display: flex; flex-direction: column; gap: 1rem; }
.game-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; text-decoration: none; color: var(--text); transition: border-color 0.15s; }
.game-card:hover { border-color: var(--accent); }
.game-emoji { font-size: 2.5rem; flex-shrink: 0; }
.game-info { flex: 1; }
.game-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; }
.game-desc { font-size: 0.88rem; color: var(--muted); }
.game-play { font-size: 0.9rem; color: var(--accent); font-weight: 600; flex-shrink: 0; }

/* ── Leaderboard ── */
.leaderboard-page { max-width: 600px; margin: 2rem auto; padding: 0 1rem; }
.leaderboard-page h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
.game-label { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.score-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.score-table th { background: var(--surface2); color: var(--muted); padding: 0.5rem 0.75rem; text-align: left; font-weight: 600; }
.score-table td { padding: 0.5rem 0.75rem; border-top: 1px solid var(--border); }
.score-table tr.gold   td { background: #2d2200; }
.score-table tr.silver td { background: #1e2020; }
.score-table tr.bronze td { background: #221510; }
.empty { color: var(--muted); padding: 2rem 0; }
a { color: var(--accent); }
