/* ═══════════════════════════════════════════════════════════
   Eduverso Run Tracker — Base Styles & Reset
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Modern Reset ────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100dvh;
    overflow-x: hidden;
}

/* Body background texture: subtle grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(0, 240, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(57, 255, 20, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--cyan-dim);
}

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

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    outline: none;
}

ul,
ol {
    list-style: none;
}

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

h1 {
    font-size: var(--text-3xl);
}

h2 {
    font-size: var(--text-2xl);
}

h3 {
    font-size: var(--text-xl);
}

h4 {
    font-size: var(--text-lg);
}

p+p {
    margin-top: var(--space-4);
}

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

.hidden {
    display: none !important;
}

.text-cyan {
    color: var(--cyan);
}

.text-green {
    color: var(--green);
}

.text-orange {
    color: var(--orange);
}

.text-magenta {
    color: var(--magenta);
}

.text-muted {
    color: var(--text-secondary);
}

.font-mono {
    font-family: var(--font-mono);
}

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

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

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

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

/* ── Loading Skeleton ────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            var(--bg-elevated) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Page Transitions ────────────────────────────────────── */
.page-enter {
    animation: pageIn var(--duration-normal) var(--ease-out) forwards;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Number Ticker Animation ─────────────────────────────── */
.stat-number {
    font-family: var(--font-mono);
    font-weight: var(--weight-bold);
    font-variant-numeric: tabular-nums;
}