/* ============================================================
   COMPETEAI // NEXUS — Cyberpunk HUD Design System
   Fonts: Space Grotesk (display) + Inter (body)
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
    /* Surfaces */
    --void: #05050e;
    --panel: #0c0c1d;
    --panel-2: #11112a;

    /* Neon palette */
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff2d78;
    --neon-green: #3dff8f;
    --neon-amber: #ffb800;
    --neon-violet: #8b5cf6;
    --neon-orange: #ff9e2c;
    --neon-yellow: #ffd719;

    /* Text */
    --text-primary: #f2f4ff;
    --text-secondary: rgba(235, 240, 255, 0.66);
    --text-muted: rgba(215, 226, 255, 0.38);

    /* HUD lines & fills */
    --hud-line: rgba(0, 240, 255, 0.28);
    --hud-line-dim: rgba(0, 240, 255, 0.12);
    --line-subtle: rgba(160, 190, 255, 0.10);
    --fill-1: rgba(140, 170, 255, 0.05);
    --fill-2: rgba(140, 170, 255, 0.09);

    /* Glows */
    --glow-cyan: 0 0 18px rgba(0, 240, 255, 0.35), 0 0 46px rgba(0, 240, 255, 0.12);
    --glow-magenta: 0 0 18px rgba(255, 45, 120, 0.35), 0 0 46px rgba(255, 45, 120, 0.12);
    --glow-green: 0 0 18px rgba(61, 255, 143, 0.35), 0 0 46px rgba(61, 255, 143, 0.12);
    --glow-amber: 0 0 18px rgba(255, 184, 0, 0.35), 0 0 46px rgba(255, 184, 0, 0.12);

    /* Radii & chamfer */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --chamfer: 14px;
    --chamfer-sm: 9px;

    /* Motion */
    --t-fast: 150ms;
    --t-med: 250ms;
    --t-slow: 400ms;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

    /* Subject colors */
    --subject-technology: #8b5cf6;
    --subject-math: #00f0ff;
    --subject-science: #3dff8f;
    --subject-islamic-studies: #ffb800;
    --subject-pakistan-history: #ff9e2c;
    --subject-languages: #ff2d78;

    /* Ink on bright segments */
    --ink: #061021;
}

/* ------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--void);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

#blazor-app {
    position: relative;
    z-index: 1;
}

::selection {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.18);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.35);
}

/* ------------------------------------------------------------
   3. AMBIENT BACKGROUND LAYERS (rendered by MainLayout)
   ------------------------------------------------------------ */
.ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.032) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 100%);
}

.ambient-aurora {
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 55% 42% at 18% 8%, rgba(139, 92, 246, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 48% 38% at 85% 88%, rgba(0, 240, 255, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse 40% 34% at 70% 15%, rgba(255, 45, 120, 0.06) 0%, transparent 60%);
    animation: aurora-drift 26s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    from { transform: translate3d(-2%, -1%, 0) scale(1); }
    to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

.ambient-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 120% 100% at 50% 45%, transparent 55%, rgba(2, 2, 8, 0.75) 100%);
}

.ambient-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.16) 0px,
        rgba(0, 0, 0, 0.16) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.5;
    mix-blend-mode: multiply;
}

/* ------------------------------------------------------------
   4. TYPOGRAPHY UTILITIES
   ------------------------------------------------------------ */
.font-display {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.digits {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.overline-label {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-muted);
}

.gradient-text {
    background: linear-gradient(135deg, var(--neon-cyan) 20%, var(--neon-violet) 60%, var(--neon-magenta) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ------------------------------------------------------------
   5. GLITCH TEXT EFFECT
   ------------------------------------------------------------ */
.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.glitch::before {
    color: var(--neon-magenta);
    z-index: -1;
    animation: glitch-a 1.6s infinite steps(1);
}

.glitch::after {
    color: var(--neon-cyan);
    z-index: -2;
    animation: glitch-b 1.6s infinite steps(1);
}

@keyframes glitch-a {
    0%, 86%, 100% { opacity: 0; transform: none; clip-path: none; }
    87% { opacity: 0.8; transform: translate(-4px, 2px); clip-path: inset(10% 0 62% 0); }
    89% { opacity: 0.8; transform: translate(3px, -1px); clip-path: inset(58% 0 8% 0); }
    91% { opacity: 0.8; transform: translate(-2px, 1px); clip-path: inset(28% 0 44% 0); }
    93% { opacity: 0; transform: none; }
}

@keyframes glitch-b {
    0%, 86%, 100% { opacity: 0; transform: none; clip-path: none; }
    87.5% { opacity: 0.7; transform: translate(4px, -2px); clip-path: inset(52% 0 18% 0); }
    90% { opacity: 0.7; transform: translate(-3px, 2px); clip-path: inset(6% 0 74% 0); }
    92.5% { opacity: 0.7; transform: translate(2px, -1px); clip-path: inset(40% 0 32% 0); }
    94% { opacity: 0; transform: none; }
}

/* ------------------------------------------------------------
   6. HUD PANELS, CHAMFER & CORNER BRACKETS
   ------------------------------------------------------------ */
.chamfer {
    clip-path: polygon(
        var(--chamfer) 0, 100% 0,
        100% calc(100% - var(--chamfer)),
        calc(100% - var(--chamfer)) 100%,
        0 100%, 0 var(--chamfer)
    );
}

.chamfer-sm {
    clip-path: polygon(
        var(--chamfer-sm) 0, 100% 0,
        100% calc(100% - var(--chamfer-sm)),
        calc(100% - var(--chamfer-sm)) 100%,
        0 100%, 0 var(--chamfer-sm)
    );
}

.hud-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(19, 23, 50, 0.60), rgba(9, 11, 26, 0.78));
    border: 1px solid var(--hud-line-dim);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color var(--t-med) var(--ease-out), filter var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}

.hud-panel:hover {
    border-color: var(--hud-line);
}

/* Corner brackets — top-left + bottom-right L-marks */
.hud-frame::before,
.hud-frame::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-style: solid;
    border-color: var(--hud-line);
    transition: width var(--t-med) var(--ease-out), height var(--t-med) var(--ease-out);
    pointer-events: none;
}

.hud-frame::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.hud-frame::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.hud-frame:hover::before,
.hud-frame:hover::after {
    width: 24px;
    height: 24px;
}

/* Hover scan sweep line */
.sweep {
    position: relative;
    overflow: hidden;
}

.sweep::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(0, 240, 255, 0.07), transparent);
    transform: skewX(-18deg);
    transition: left 0.65s var(--ease-out);
    pointer-events: none;
}

.sweep:hover::after {
    left: 130%;
}

/* ------------------------------------------------------------
   7. TERMINAL PANEL
   ------------------------------------------------------------ */
.terminal {
    background: rgba(4, 8, 18, 0.72);
    border: 1px solid rgba(0, 240, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.terminal-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.12);
    background: rgba(0, 240, 255, 0.03);
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.terminal-dot.r { background: var(--neon-magenta); box-shadow: 0 0 6px rgba(255, 45, 120, 0.6); }
.terminal-dot.y { background: var(--neon-amber); box-shadow: 0 0 6px rgba(255, 184, 0, 0.6); }
.terminal-dot.g { background: var(--neon-green); box-shadow: 0 0 6px rgba(61, 255, 143, 0.6); }

.terminal-title {
    margin-left: 8px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.terminal-body {
    padding: 14px 16px;
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* Terminal prompt line */
.prompt-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.prompt-line::before {
    content: '>';
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
}

.caret {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--neon-cyan);
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: caret-blink 1s steps(1) infinite;
}

@keyframes caret-blink {
    0%, 55% { opacity: 1; }
    56%, 100% { opacity: 0; }
}

/* ------------------------------------------------------------
   8. BUTTONS
   ------------------------------------------------------------ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 30px;
    border: none;
    cursor: pointer;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: transparent;
    transition: filter var(--t-fast) ease, transform var(--t-fast) ease, background var(--t-med) ease, border-color var(--t-med) ease, color var(--t-med) ease;
    outline: none;
}

.btn:focus-visible {
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.8));
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.btn .material-symbols-rounded {
    font-size: 1.15rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
    color: #04101a;
    clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm));
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.25));
}

.btn-primary:hover {
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.55));
}

.btn-outline {
    border: 1px solid var(--hud-line);
    color: var(--neon-cyan);
    clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm));
    background: rgba(0, 240, 255, 0.04);
}

.btn-outline:hover {
    background: rgba(0, 240, 255, 0.12);
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.35));
}

.btn-danger {
    border: 1px solid rgba(255, 45, 120, 0.35);
    color: var(--neon-magenta);
    background: rgba(255, 45, 120, 0.05);
    clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm));
}

.btn-danger:hover {
    background: rgba(255, 45, 120, 0.14);
    filter: drop-shadow(0 0 12px rgba(255, 45, 120, 0.35));
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;
    background: rgba(140, 170, 255, 0.05);
    border: 1px solid var(--line-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: all var(--t-fast) ease;
    outline: none;
}

.icon-btn .material-symbols-rounded {
    font-size: 1rem;
}

.icon-btn:hover {
    border-color: var(--hud-line);
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.25));
}

.icon-btn:focus-visible {
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.8));
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 6px 0;
    transition: color var(--t-fast) ease, gap var(--t-fast) ease;
}

.back-link .material-symbols-rounded {
    font-size: 1.1rem;
}

.back-link:hover {
    color: var(--neon-cyan);
    gap: 10px;
}

/* ------------------------------------------------------------
   9. ICON CHIPS
   ------------------------------------------------------------ */
.material-symbols-rounded {
    user-select: none;
}

.icon-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm));
    background: color-mix(in srgb, var(--chip-color, var(--neon-cyan)) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--chip-color, var(--neon-cyan)) 35%, transparent);
    color: var(--chip-color, var(--neon-cyan));
}

.icon-chip .material-symbols-rounded {
    font-size: 1.6rem;
}

.icon-chip.sm {
    width: 40px;
    height: 40px;
}

.icon-chip.sm .material-symbols-rounded {
    font-size: 1.25rem;
}

/* ------------------------------------------------------------
   10. ANIMATIONS & STAGGER
   ------------------------------------------------------------ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 14px rgba(0, 240, 255, 0.25), inset 0 0 8px rgba(0, 240, 255, 0.08); }
    50% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), inset 0 0 12px rgba(0, 240, 255, 0.14); }
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(0, 240, 255, 0.8); }
    50% { opacity: 0.25; box-shadow: none; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s var(--ease-out) forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.35s var(--ease-out) forwards; }

.stagger-1 { animation-delay: 0.05s; opacity: 0; }
.stagger-2 { animation-delay: 0.1s; opacity: 0; }
.stagger-3 { animation-delay: 0.15s; opacity: 0; }
.stagger-4 { animation-delay: 0.2s; opacity: 0; }
.stagger-5 { animation-delay: 0.25s; opacity: 0; }

/* ------------------------------------------------------------
   11. LAYOUT
   ------------------------------------------------------------ */
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.content-shell {
    position: relative;
    z-index: 1;
}

/* ------------------------------------------------------------
   12. MUDBLAZOR OVERRIDES
   ------------------------------------------------------------ */
.mud-theme-dark {
    background: transparent !important;
}

.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5 {
    font-family: 'Space Grotesk', 'Inter', sans-serif !important;
    font-weight: 700 !important;
}

.mud-button-filled {
    border-radius: var(--radius-md) !important;
}

.mud-card {
    background: transparent !important;
    border: none !important;
}

/* Blazor error UI */
#blazor-error-ui {
    background: rgba(9, 11, 26, 0.95);
    border-top: 1px solid rgba(255, 45, 120, 0.45);
    color: var(--neon-magenta);
    bottom: 0;
    box-shadow: 0 -4px 24px rgba(255, 45, 120, 0.15);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 10000;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

#blazor-error-ui .reload {
    color: var(--neon-cyan);
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   13. HOME PAGE
   ------------------------------------------------------------ */
.home-hero {
    text-align: center;
    padding: 4.5rem 0 3rem;
}

.home-logo {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(2.6rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--text-primary);
    text-shadow:
        0 0 24px rgba(0, 240, 255, 0.35),
        0 0 80px rgba(139, 92, 246, 0.2);
}

.home-logo .logo-dim {
    color: var(--text-muted);
    text-shadow: none;
}

.home-tagline {
    margin-top: 1.1rem;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.92rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.home-tagline::before {
    content: '>';
    color: var(--neon-cyan);
    font-weight: 700;
}

.home-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 22px 24px;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-family: inherit;
}

.action-card:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 18px rgba(0, 240, 255, 0.12));
}

.action-card:active {
    transform: translateY(0);
}

.action-card:focus-visible {
    outline: none;
    border-color: var(--hud-line);
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.4));
}

.action-card .ac-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.action-card .ac-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 3px;
}

.action-card .ac-arrow {
    margin-left: auto;
    color: var(--text-muted);
    transition: color var(--t-fast) ease, transform var(--t-fast) ease;
}

.action-card:hover .ac-arrow {
    color: var(--neon-cyan);
    transform: translateX(4px);
}

.stat-strip {
    max-width: 420px;
    margin: 1.75rem auto 0;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.stat-strip .ss-value {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* --- home shell & particle canvas --- */
.home-shell {
    position: relative;
    min-height: 100vh;
}

.home-particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.home-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- company logo --- */
.home-brand-logo {
    display: block;
    max-height: 110px;
    max-width: min(340px, 72vw);
    margin: 0 auto 1.25rem;
    object-fit: contain;
    filter:
        drop-shadow(0 0 18px rgba(0, 240, 255, 0.45))
        drop-shadow(0 0 60px rgba(139, 92, 246, 0.25));
    animation: logo-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes logo-in {
    from {
        opacity: 0;
        transform: translateY(-14px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.home-hero .home-logo {
    animation: home-glow 2.5s ease-in-out infinite;
}

@keyframes home-glow {
    0%,
    100% {
        text-shadow:
            0 0 24px rgba(0, 240, 255, 0.35),
            0 0 80px rgba(139, 92, 246, 0.2);
    }
    50% {
        text-shadow:
            0 0 34px rgba(0, 240, 255, 0.55),
            0 0 100px rgba(139, 92, 246, 0.35);
    }
}

/* ------------------------------------------------------------
   14. CATEGORY SELECT — RADAR WHEEL
   ------------------------------------------------------------ */
.wheel-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
}

.wheel-wrapper {
    position: relative;
    width: 372px;
    height: 372px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dial-ring {
    position: absolute;
    inset: 0;
    animation: dial-rotate 40s linear infinite;
    opacity: 0.7;
}

.dial-ring circle {
    fill: none;
    stroke: rgba(0, 240, 255, 0.25);
    stroke-width: 1;
    stroke-dasharray: 3 9;
}

@keyframes dial-rotate {
    to { transform: rotate(360deg); }
}

.wheel-pointer {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 22px solid var(--neon-cyan);
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.8));
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: -34px;
    left: -1.5px;
    width: 3px;
    height: 12px;
    background: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.8);
}

.wheel {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow:
        0 0 0 1px rgba(0, 240, 255, 0.25),
        0 0 34px rgba(0, 240, 255, 0.14),
        0 0 90px rgba(139, 92, 246, 0.12),
        inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.wheel svg {
    display: block;
    border-radius: 50%;
}

.wheel-segment {
    cursor: pointer;
    transition: filter 0.2s ease;
}

.wheel-segment:hover {
    filter: brightness(1.25) saturate(1.15);
}

.wheel-segment:active {
    filter: brightness(1.45);
}

.wheel-segment.disabled {
    pointer-events: none;
    cursor: default;
}

.wheel-segment-exhausted {
    filter: grayscale(0.85) brightness(0.38);
    cursor: not-allowed;
}

.wheel-segment-exhausted:hover,
.wheel-segment-exhausted:active {
    filter: grayscale(0.85) brightness(0.38);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.spin-btn {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    background:
        radial-gradient(circle at 50% 35%, rgba(0, 240, 255, 0.10), transparent 65%),
        linear-gradient(160deg, var(--panel-2), var(--void));
    color: var(--neon-cyan);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    cursor: pointer;
    text-transform: uppercase;
    position: relative;
    z-index: 6;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: 0 0 0 5px var(--void), 0 0 0 6px rgba(0, 240, 255, 0.25);
}

.spin-btn:not(:disabled) {
    animation: pulse-glow 2.2s ease-in-out infinite;
}

.spin-btn:hover:not(:disabled) {
    color: #fff;
    border-color: #fff;
    transform: scale(1.06);
    filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.6));
}

.spin-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.spin-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    animation: none;
}

.spin-btn:focus-visible:not(:disabled) {
    filter: drop-shadow(0 0 12px rgba(0, 240, 255, 0.8));
}

.spin-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 600;
}

@keyframes wheelWinGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.25), 0 0 34px rgba(0, 240, 255, 0.14); }
    50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 0 70px rgba(0, 240, 255, 0.55); }
}

.wheel-win {
    animation: wheelWinGlow 0.5s ease-in-out 3 !important;
}

/* ------------------------------------------------------------
   15. QUIZ PAGE
   ------------------------------------------------------------ */
.quiz-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.75rem;
}

.gen-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.05);
    padding: 4px 11px;
    white-space: nowrap;
}

.gen-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-cyan);
    animation: blink-dot 1.2s ease-in-out infinite;
}

.score-readout {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-variant-numeric: tabular-nums;
}

.score-readout .sr-hits {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.score-readout .sr-hits b {
    color: var(--neon-green);
    font-weight: 700;
}

.score-readout .sr-points {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon-amber);
    text-shadow: 0 0 12px rgba(255, 184, 0, 0.35);
}

/* Progress ticks */
.ticks {
    display: flex;
    gap: 5px;
    margin-bottom: 1.75rem;
}

.tick {
    flex: 1;
    height: 5px;
    background: var(--fill-2);
    transform: skewX(-18deg);
    transition: background var(--t-med) ease, box-shadow var(--t-med) ease;
}

.tick.on {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}

.tick.cur {
    background: rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* Timer */
.timer-wrap {
    position: relative;
    width: 116px;
    height: 116px;
    margin: 0 auto 2rem;
}

.timer-wrap.danger {
    animation: timer-pulse 1s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.timer-ring {
    transform: rotate(-90deg);
    transform-origin: center;
}

.timer-ring-bg {
    stroke: rgba(140, 170, 255, 0.08);
}

.timer-ring-progress {
    transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
    filter: drop-shadow(0 0 6px currentColor);
}

.timer-digits {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-value {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.timer-unit {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.56rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-top: 3px;
}

/* Question panel */
.q-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.6rem;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.q-counter .qc-current {
    color: var(--neon-cyan);
}

.difficulty-tag {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid;
}

.difficulty-easy { color: var(--neon-green); border-color: rgba(61, 255, 143, 0.4); background: rgba(61, 255, 143, 0.07); }
.difficulty-medium { color: var(--neon-yellow); border-color: rgba(255, 215, 25, 0.4); background: rgba(255, 215, 25, 0.07); }
.difficulty-hard { color: var(--neon-orange); border-color: rgba(255, 158, 44, 0.4); background: rgba(255, 158, 44, 0.07); }
.difficulty-expert { color: var(--neon-magenta); border-color: rgba(255, 45, 120, 0.4); background: rgba(255, 45, 120, 0.07); }

.question-panel {
    padding: 30px 28px;
    margin-bottom: 1.6rem;
}

.question-panel h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.18rem;
    font-weight: 500;
    line-height: 1.65;
    color: var(--text-primary);
}

/* Option buttons */
.options {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px 18px;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(12, 16, 36, 0.55);
    border: 1px solid var(--line-subtle);
    clip-path: polygon(var(--chamfer-sm) 0, 100% 0, 100% calc(100% - var(--chamfer-sm)), calc(100% - var(--chamfer-sm)) 100%, 0 100%, 0 var(--chamfer-sm));
    transition: border-color var(--t-fast) ease, background var(--t-fast) ease, transform var(--t-fast) ease, filter var(--t-fast) ease;
    outline: none;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--hud-line);
    background: rgba(0, 240, 255, 0.055);
    transform: translateX(5px);
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.14));
}

.option-btn:active:not(:disabled) {
    transform: translateX(2px) scale(0.995);
}

.option-btn:focus-visible {
    border-color: var(--neon-cyan);
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.5));
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.85;
}

.opt-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.07);
    border: 1px solid rgba(0, 240, 255, 0.22);
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    transition: all var(--t-fast) ease;
}

.option-btn:hover:not(:disabled) .opt-letter {
    background: rgba(0, 240, 255, 0.16);
    color: #fff;
}

/* Boot / loading screen */
.boot-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 1.4rem;
    text-align: center;
}

.boot-core {
    width: 84px;
    height: 84px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.boot-core .material-symbols-rounded {
    font-size: 2.4rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.6));
    animation: core-flicker 2.4s ease-in-out infinite;
}

.boot-core::before,
.boot-core::after {
    content: '';
    position: absolute;
    border: 1px solid rgba(0, 240, 255, 0.35);
}

.boot-core::before {
    inset: 0;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    animation: hex-spin 6s linear infinite;
}

.boot-core::after {
    inset: 9px;
    border-color: rgba(139, 92, 246, 0.4);
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    animation: hex-spin 4s linear infinite reverse;
}

@keyframes hex-spin {
    to { transform: rotate(360deg); }
}

@keyframes core-flicker {
    0%, 100% { opacity: 1; }
    48% { opacity: 1; }
    50% { opacity: 0.55; }
    52% { opacity: 1; }
    78% { opacity: 1; }
    80% { opacity: 0.7; }
    82% { opacity: 1; }
}

.boot-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'Space Grotesk', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
}

.boot-lines .bl::before {
    content: '> ';
    color: var(--neon-cyan);
}

.load-bar {
    width: 220px;
    height: 3px;
    background: var(--fill-2);
    overflow: hidden;
    transform: skewX(-18deg);
}

.load-bar > div {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-violet), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.boot-note {
    font-size: 0.74rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* Hold screen (player outran generation) */
.hold-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 1rem;
    text-align: center;
}

.hold-screen .hs-icon {
    font-size: 0;
}

.hold-screen .hs-icon .material-symbols-rounded {
    font-size: 3rem;
    color: var(--neon-amber);
    filter: drop-shadow(0 0 16px rgba(255, 184, 0, 0.4));
    animation: core-flicker 1.8s ease-in-out infinite;
}

/* ------------------------------------------------------------
   16. RESULTS PAGE
   ------------------------------------------------------------ */
.result-hero {
    text-align: center;
    padding: 1.5rem 0 2.25rem;
    position: relative;
}

.result-icon {
    position: relative;
    display: inline-flex;
    margin-bottom: 0.9rem;
}

.result-icon .material-symbols-rounded {
    font-size: 4.6rem;
}

.result-icon.win .material-symbols-rounded {
    color: var(--neon-green);
    filter: drop-shadow(0 0 22px rgba(61, 255, 143, 0.55));
    animation: icon-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.result-icon.loss .material-symbols-rounded {
    color: var(--neon-magenta);
    filter: drop-shadow(0 0 22px rgba(255, 45, 120, 0.45));
    animation: icon-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes icon-pop {
    0% { transform: scale(0); }
    55% { transform: scale(1.22); }
    75% { transform: scale(0.94); }
    100% { transform: scale(1); }
}

.result-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(2rem, 6vw, 2.7rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
}

.result-title.win {
    color: var(--neon-green);
    text-shadow: 0 0 26px rgba(61, 255, 143, 0.45);
}

.result-title.loss {
    color: var(--neon-magenta);
    text-shadow: 0 0 26px rgba(255, 45, 120, 0.4);
}

.result-subtitle {
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Space Grotesk', monospace;
}

/* Win motes (falling neon particles) */
.motes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.mote {
    position: absolute;
    top: -4vh;
    width: 5px;
    height: 5px;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    animation: mote-fall linear infinite;
}

.mote.cyan { background: var(--neon-cyan); box-shadow: 0 0 8px rgba(0, 240, 255, 0.8); }
.mote.green { background: var(--neon-green); box-shadow: 0 0 8px rgba(61, 255, 143, 0.8); }
.mote.magenta { background: var(--neon-magenta); box-shadow: 0 0 8px rgba(255, 45, 120, 0.8); }
.mote.amber { background: var(--neon-amber); box-shadow: 0 0 8px rgba(255, 184, 0, 0.8); }

@keyframes mote-fall {
    0% { transform: translateY(-6vh) rotate(0deg); opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { transform: translateY(108vh) rotate(540deg); opacity: 0; }
}

/* Accuracy ring */
.accuracy-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.accuracy-ring-wrap {
    position: relative;
    width: 148px;
    height: 148px;
}

.accuracy-ring-wrap svg {
    transform: rotate(-90deg);
}

.accuracy-ring-bg {
    fill: none;
    stroke: rgba(140, 170, 255, 0.08);
    stroke-width: 8;
}

.accuracy-ring-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.1s var(--ease-out);
    filter: drop-shadow(0 0 8px currentColor);
}

.accuracy-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.accuracy-ring-count {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.accuracy-ring-of {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    margin-top: 4px;
}

/* Stat tiles */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 480px;
}

.tile {
    padding: 16px 12px;
    text-align: center;
}

.tile .tile-icon .material-symbols-rounded {
    font-size: 1.3rem;
}

.tile .tile-value {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.tile .tile-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: 3px;
}

/* Question breakdown */
.result-q-section {
    margin-bottom: 1.75rem;
}

.result-q-section-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-q-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hud-line-dim), transparent);
}

.result-q-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-q-card {
    padding: 16px 18px;
}

.result-q-card.correct {
    border-left: 3px solid var(--neon-green);
}

.result-q-card.wrong {
    border-left: 3px solid var(--neon-magenta);
}

.result-q-header {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
}

.result-q-num {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: var(--fill-2);
    clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
    flex-shrink: 0;
}

.result-q-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.result-q-status .material-symbols-rounded {
    font-size: 1rem;
}

.result-q-status.correct { color: var(--neon-green); }
.result-q-status.wrong { color: var(--neon-magenta); }

.result-q-points {
    margin-left: auto;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--neon-amber);
    font-variant-numeric: tabular-nums;
}

.result-q-points.zero {
    color: var(--text-muted);
}

.result-q-text {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.55;
    margin-bottom: 10px;
}

.result-q-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.result-q-time {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.result-q-breakdown {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-top: 4px;
}

.result-q-breakdown span {
    color: var(--text-secondary);
}

.result-q-explanation {
    margin-top: 10px;
    padding: 10px 13px;
    background: rgba(255, 45, 120, 0.045);
    border: 1px solid rgba(255, 45, 120, 0.14);
    border-left: 2px solid rgba(255, 45, 120, 0.45);
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.result-q-explanation strong {
    color: var(--neon-green);
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.result-actions > * {
    flex: 1;
}

/* Empty / error state */
.result-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    gap: 0.5rem;
}

.result-empty .re-icon .material-symbols-rounded {
    font-size: 3.6rem;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   17. STATS PAGE
   ------------------------------------------------------------ */
.stats-bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 12px;
    margin-bottom: 2rem;
}

.stat-tile {
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-tile .st-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-tile .st-icon .material-symbols-rounded {
    font-size: 1.25rem;
}

.stat-tile .st-value {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-tile .st-label {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.58rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.subject-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
}

.subject-row .sr-info {
    flex: 1;
    min-width: 0;
}

.subject-row .sr-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.subject-row .sr-games {
    color: var(--text-muted);
    font-size: 0.73rem;
    margin-top: 2px;
}

.sbar-track {
    margin-top: 8px;
    height: 5px;
    background: var(--fill-2);
    overflow: hidden;
    transform: skewX(-18deg);
}

.sbar-fill {
    height: 100%;
    background: linear-gradient(90deg, color-mix(in srgb, var(--subject-color, var(--neon-cyan)) 55%, transparent), var(--subject-color, var(--neon-cyan)));
    box-shadow: 0 0 10px color-mix(in srgb, var(--subject-color, var(--neon-cyan)) 60%, transparent);
    transform-origin: left;
    animation: bar-grow 0.9s var(--ease-out);
}

@keyframes bar-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.subject-row .sr-acc {
    text-align: right;
    flex-shrink: 0;
}

.subject-row .sr-acc-val {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--subject-color, var(--neon-cyan));
    font-variant-numeric: tabular-nums;
}

.subject-row .sr-acc-lbl {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
}

.wl-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.wl-badge.win {
    color: var(--neon-green);
    background: rgba(61, 255, 143, 0.09);
    border: 1px solid rgba(61, 255, 143, 0.35);
}

.wl-badge.loss {
    color: var(--neon-magenta);
    background: rgba(255, 45, 120, 0.09);
    border: 1px solid rgba(255, 45, 120, 0.35);
}

.history-row .hr-info {
    flex: 1;
    min-width: 0;
}

.history-row .hr-subject {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
}

.history-row .hr-date {
    font-family: 'Space Grotesk', monospace;
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-top: 2px;
    letter-spacing: 0.05em;
}

.history-row .hr-score {
    text-align: right;
    flex-shrink: 0;
}

.history-row .hr-pts {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--neon-amber);
    font-variant-numeric: tabular-nums;
}

.history-row .hr-correct {
    font-family: 'Space Grotesk', monospace;
    color: var(--text-muted);
    font-size: 0.68rem;
    margin-top: 2px;
}

.reset-zone {
    text-align: center;
    padding: 1.25rem 0 0.5rem;
}

/* Section headers */
.section-head {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hud-line-dim), transparent);
}

.list-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 2rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.empty-state .es-icon .material-symbols-rounded {
    font-size: 3.2rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 1rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ------------------------------------------------------------
   18. SYSTEM PAGES (404 / ERROR)
   ------------------------------------------------------------ */
.system-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    gap: 1.25rem;
}

.system-code {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: clamp(3.4rem, 12vw, 6rem);
    font-weight: 700;
    line-height: 1;
    color: var(--neon-magenta);
    text-shadow: 0 0 30px rgba(255, 45, 120, 0.4);
}

.system-msg {
    font-family: 'Space Grotesk', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
}

/* ------------------------------------------------------------
   19. REDUCED MOTION
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ambient-scanlines {
        display: none;
    }

    .motes {
        display: none;
    }
}
