/* ============================================================
   GameHub — Base / Reset
   ============================================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-normal);
    line-height: var(--lh-base);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Subtle dot-grid background */
    background-image: radial-gradient(
        rgba(99, 86, 192, 0.06) 1px,
        transparent 1px
    );
    background-size: 40px 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    line-height: var(--lh-tight);
    font-weight: var(--fw-bold);
    color: var(--text-primary);
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-base); }

@media (max-width: 640px) {
    h1 { font-size: var(--fs-3xl); }
    h2 { font-size: var(--fs-2xl); }
    h3 { font-size: var(--fs-xl); }
}

p { color: var(--text-secondary); }

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color var(--t-fast), opacity var(--t-fast);
}

a:hover { color: var(--text-primary); }

strong { font-weight: var(--fw-semibold); color: var(--text-primary); }
em     { font-style: italic; }
small  { font-size: var(--fs-sm); }

code, pre {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0.15em 0.4em;
}

pre {
    padding: var(--sp-4);
    overflow-x: auto;
    white-space: pre-wrap;
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

img, svg, video { display: block; max-width: 100%; }

ul, ol { list-style: none; }

input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button { cursor: pointer; }

table {
    border-collapse: collapse;
    width: 100%;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--r-full);
    transition: background var(--t-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* ── Focus visible ────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--neon-cyan);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

/* ── Selection ────────────────────────────────────────────── */
::selection {
    background: var(--neon-cyan-dim);
    color: var(--text-primary);
}

/* ── Utility ──────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.neon-text   { color: var(--neon-cyan); }
.neon-purple { color: var(--neon-purple); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
