/* ========================================
   HACKERSWAR — OFFENSIVE AESTHETIC
   Red Team. Pentest. Exploit. Dominate.
   ======================================== */

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

:root {
    /* Core — near-black with subtle depth */
    --bg-void: #030303;
    --bg-base: #080808;
    --bg-surface: #0d0d0d;
    --bg-elevated: #111111;
    --bg-hover: #181818;
    --bg-panel: #0a0a0a;

    /* Offensive Palette */
    --off-green: #00e676;
    --off-green-dim: #00c853;
    --off-cyan: #00e5ff;
    --off-cyan-dim: #00b8d4;
    --off-red: #ff1744;
    --off-red-dim: #d50000;
    --off-amber: #ff9100;
    --off-amber-dim: #ff6d00;
    --off-purple: #e040fb;
    --off-purple-dim: #aa00ff;

    /* Text */
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --text-muted: #555555;
    --text-dim: #333333;

    /* Borders */
    --border-subtle: rgba(255,255,255,0.04);
    --border-light: rgba(255,255,255,0.08);
    --border-medium: rgba(255,255,255,0.12);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    /* Backward-compatible aliases */
    --accent-sage: var(--off-green);
    --accent-sage-glow: rgba(0, 230, 118, 0.08);
    --accent-sand: var(--off-amber);
    --accent-sand-glow: rgba(255, 145, 0, 0.08);
    --accent-rose: var(--off-red);
    --accent-sky: var(--off-cyan);
    --bg-secondary: var(--bg-base);
    --bg-primary: var(--bg-surface);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 80px;

    /* Radius — sharp, tactical */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;

    /* Shadows — minimal, hard */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.8);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);

    /* Transitions */
    --transition-fast: 0.1s ease;
    --transition-base: 0.2s ease;

    /* Layout */
    --nav-height: 64px;
    --max-width: 1280px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a #080808;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #222; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--off-green); }

::selection { background: rgba(0, 230, 118, 0.2); color: #fff; }

body {
    font-family: var(--font-sans);
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 14px;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

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

a:hover { color: #fff; }

img { max-width: 100%; height: auto; }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes type {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* ========================================
   LAYOUT
   ======================================== */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.main-content { flex: 1; padding: var(--space-lg); }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    width: 100%;
    padding: var(--space-3xl) var(--space-lg);
    position: relative;
}

.section-sm { padding: var(--space-2xl) var(--space-lg); }

/* ========================================
   NAVIGATION
   ======================================== */
.main-nav {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    background: rgba(3,3,3,0.95);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.nav-brand .brand-icon {
    width: 28px;
    height: 28px;
    color: var(--off-green);
}

.nav-brand .brand-text {
    color: var(--text-primary);
}

.nav-brand span:last-child {
    color: var(--off-green);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex: 1;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-link.active {
    color: var(--off-green);
    background: rgba(0, 230, 118, 0.08);
}

.nav-link svg { width: 16px; height: 16px; opacity: 0.7; }

.nav-link.admin-link { color: var(--off-purple); }
.nav-link.admin-link:hover { background: rgba(224, 64, 251, 0.08); }

.nav-auth { display: flex; align-items: center; gap: var(--space-sm); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    border-radius: 0;
    transition: var(--transition-fast);
}

/* User Menu */
.user-menu { position: relative; }

.user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-mono);
    font-size: 12px;
}

.user-toggle:hover { border-color: var(--off-green); }

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--off-green);
    border: 1px solid var(--border-light);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: var(--transition-fast);
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-family: var(--font-mono);
}

.dropdown-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.dropdown-item.danger { color: var(--off-red); }
.dropdown-item.danger:hover { background: rgba(255, 23, 68, 0.08); }

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.notification-bell:hover { border-color: var(--off-green); color: var(--off-green); }

.notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-sm);
    background: var(--off-red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--off-green);
    color: #000;
    border-color: var(--off-green);
}

.btn-primary:hover {
    background: #fff;
    border-color: #fff;
    color: #000;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-medium);
}

.btn-secondary:hover {
    border-color: var(--off-cyan);
    color: var(--off-cyan);
    background: rgba(0, 229, 255, 0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-subtle);
}

.btn-ghost:hover {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.btn-danger {
    background: var(--off-red);
    color: #fff;
    border-color: var(--off-red);
}

.btn-danger:hover { background: var(--off-red-dim); }

.btn-success {
    background: var(--off-green);
    color: #000;
    border-color: var(--off-green);
}

.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-lg { padding: 12px 24px; font-size: 13px; }

/* ========================================
   CARDS
   ======================================== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.card:hover {
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.card-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.card-body { padding: var(--space-lg); }

/* ========================================
   FORMS
   ======================================== */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: var(--transition-fast);
    outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--off-green);
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.1);
}

.form-input::placeholder { color: var(--text-dim); }

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 230, 118, 0.1);
    color: var(--off-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.badge-warning {
    background: rgba(255, 145, 0, 0.1);
    color: var(--off-amber);
    border: 1px solid rgba(255, 145, 0, 0.2);
}

.badge-danger {
    background: rgba(255, 23, 68, 0.1);
    color: var(--off-red);
    border: 1px solid rgba(255, 23, 68, 0.2);
}

.badge-info {
    background: rgba(0, 229, 255, 0.1);
    color: var(--off-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

/* ========================================
   FLASH MESSAGES
   ======================================== */
.flash-container {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    right: 12px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
    font-family: var(--font-mono);
    border-left: 3px solid;
}

.flash-success {
    background: var(--bg-surface);
    border-color: var(--off-green);
    color: var(--off-green);
}

.flash-error {
    background: var(--bg-surface);
    border-color: var(--off-red);
    color: var(--off-red);
}

.flash-warning {
    background: var(--bg-surface);
    border-color: var(--off-amber);
    color: var(--off-amber);
}

.flash-info {
    background: var(--bg-surface);
    border-color: var(--off-cyan);
    color: var(--off-cyan);
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition-fast);
}

.flash-close:hover { opacity: 1; }

/* ========================================
   TABLES
   ======================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--font-mono);
}

.data-table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-elevated);
}

.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-table tbody tr { transition: var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-void);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 230, 118, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--off-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
}

.hero-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--off-green);
    animation: pulse 2s infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2px;
}

.hero-title .accent {
    color: var(--off-green);
}

.hero-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-stat-value {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.hero-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-terminal {
    width: 100%;
    max-width: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-dot.red { background: var(--off-red); }
.terminal-dot.yellow { background: var(--off-amber); }
.terminal-dot.green { background: var(--off-green); }

.terminal-title {
    margin-left: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.terminal-body {
    padding: 18px;
    color: var(--text-secondary);
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.terminal-prompt { color: var(--off-green); }
.terminal-command { color: var(--text-primary); }
.terminal-output { color: var(--text-muted); margin-bottom: 10px; padding-left: 14px; }
.terminal-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--off-green);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@media (max-width: 900px) {
    .hero-container { grid-template-columns: 1fr; gap: var(--space-2xl); }
    .hero-title { font-size: 36px; }
    .hero-visual { order: -1; }
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.section-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 480px;
}

.section-action { margin-left: auto; }

/* ========================================
   CATEGORY CARDS
   ======================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition-base);
    text-decoration: none;
    display: block;
}

.category-card:hover {
    border-color: var(--off-green);
    transform: translateY(-2px);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--off-green);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-subtle);
}

.category-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.category-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.category-meta {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ========================================
   FEATURE CARDS
   ======================================== */
.feature-card {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.feature-card:hover {
    border-color: var(--border-medium);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    border: 1px solid var(--border-subtle);
    color: var(--off-green);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: var(--bg-void);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 230, 118, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--off-green);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xl);
    letter-spacing: -0.5px;
}

.auth-logo .brand-icon {
    width: 24px;
    height: 24px;
    color: var(--off-green);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.auth-footer a { color: var(--off-green); }

/* ========================================
   DASHBOARD
   ======================================== */
.dashboard {
    max-width: var(--max-width);
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.dashboard-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.dashboard-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-xl);
}

@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-medium);
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.points { color: var(--off-amber); }
.stat-value.rank { color: var(--off-cyan); }
.stat-value.bloods { color: var(--off-red); }
.stat-value.solves { color: var(--off-green); }
.stat-value.streak { color: var(--off-amber); }

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Streak */
.streak-card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 145, 0, 0.2);
}

.streak-display {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.streak-count {
    font-family: var(--font-mono);
    font-size: 40px;
    font-weight: 700;
    color: var(--off-amber);
    line-height: 1;
}

.streak-count span {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.streak-info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.streak-info-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Progress Ring */
.progress-ring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
}

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

.progress-ring-bg {
    fill: none;
    stroke: var(--bg-elevated);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--off-green);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring-text {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    fill: var(--text-primary);
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.activity-item:hover { background: var(--bg-elevated); }

.activity-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.success { background: rgba(0, 230, 118, 0.1); color: var(--off-green); }
.activity-icon.error { background: rgba(255, 23, 68, 0.1); color: var(--off-red); }
.activity-icon.info { background: rgba(0, 229, 255, 0.1); color: var(--off-cyan); }

.activity-content { flex: 1; min-width: 0; }

.activity-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-title a { color: var(--off-cyan); }

.activity-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.activity-time {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Recommendations */
.recommendation-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 12px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    text-decoration: none;
}

.recommendation-card:hover {
    border-color: var(--off-green);
    background: rgba(0, 230, 118, 0.02);
}

.rec-info { flex: 1; min-width: 0; }
.rec-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.rec-points {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--off-amber);
    white-space: nowrap;
}

/* Category Progress */
.category-progress-item { margin-bottom: var(--space-md); }
.category-progress-item:last-child { margin-bottom: 0; }

.category-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.category-progress-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.category-progress-count {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.category-progress-bar {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 0;
    overflow: hidden;
}

.category-progress-fill {
    height: 100%;
    background: var(--off-green);
    transition: width 0.8s ease;
}

/* Active Labs */
.lab-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    margin-bottom: var(--space-xs);
}

.lab-item:last-child { margin-bottom: 0; }
.lab-item:hover { background: var(--bg-elevated); }
.lab-item.running { border-color: rgba(0, 230, 118, 0.3); }
.lab-item.starting { border-color: rgba(255, 145, 0, 0.3); }

.lab-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.lab-status {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

.lab-status.running {
    background: rgba(0, 230, 118, 0.1);
    color: var(--off-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.lab-status.starting {
    background: rgba(255, 145, 0, 0.1);
    color: var(--off-amber);
    border: 1px solid rgba(255, 145, 0, 0.2);
}

/* ========================================
   LABS PAGE
   ======================================== */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
}

.filter-tab {
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
}

.filter-tab:hover {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border-color: var(--border-light);
}

.filter-tab.active {
    background: rgba(0, 230, 118, 0.1);
    color: var(--off-green);
    border-color: var(--off-green);
}

/* Challenge Grid */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.challenge-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.challenge-card:hover {
    border-color: var(--off-green);
    transform: translateY(-1px);
}

.challenge-card.solved { border-color: rgba(0, 230, 118, 0.3); }

.challenge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: 14px 16px 0;
}

.challenge-category {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.challenge-difficulty {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--diff-bg, var(--bg-elevated));
    color: var(--diff-color, var(--text-muted));
    border: 1px solid rgba(255,255,255,0.06);
    font-family: var(--font-mono);
}

.challenge-body {
    padding: 10px 16px 14px;
    flex: 1;
}

.challenge-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.challenge-description {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.challenge-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.01);
}

.challenge-points {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--off-amber);
}

.challenge-solves {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.challenge-solved-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--off-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

.challenge-status {
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
}

/* ========================================
   CHALLENGE DETAIL
   ======================================== */
.challenge-detail {
    max-width: 880px;
    margin: 0 auto;
}

.challenge-detail-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}

.challenge-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.challenge-detail-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -1px;
}

.challenge-detail-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.challenge-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    border-left: 2px solid var(--off-green);
}

.challenge-box-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
    text-transform: uppercase;
}

.challenge-box-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.challenge-box-content code {
    background: var(--bg-base);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--off-green);
    border: 1px solid var(--border-subtle);
}

/* Flag Form */
.flag-form {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.flag-input {
    flex: 1;
    min-width: 220px;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    transition: var(--transition-fast);
    outline: none;
}

.flag-input:focus {
    border-color: var(--off-green);
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.1);
}

.flag-input::placeholder { color: var(--text-dim); }

.flag-input.solved {
    border-color: var(--off-green);
    background: rgba(0, 230, 118, 0.05);
    color: var(--off-green);
}

.flag-input.wrong {
    border-color: var(--off-red);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Lab Section */
.lab-box { border-left: 2px solid var(--off-amber); }

.lab-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    margin-left: auto;
    font-family: var(--font-mono);
}

.lab-badge-running {
    background: rgba(0, 230, 118, 0.1);
    color: var(--off-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.lab-badge-starting {
    background: rgba(255, 145, 0, 0.1);
    color: var(--off-amber);
    border: 1px solid rgba(255, 145, 0, 0.2);
    animation: pulse 1.5s infinite;
}

.lab-badge-stopped {
    background: rgba(255, 23, 68, 0.1);
    color: var(--off-red);
    border: 1px solid rgba(255, 23, 68, 0.2);
}

.lab-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.lab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.lab-btn { display: inline-flex; align-items: center; gap: 4px; }

.lab-message {
    margin-top: var(--space-md);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-mono);
}

.lab-message-success {
    background: rgba(0, 230, 118, 0.08);
    color: var(--off-green);
    border: 1px solid rgba(0, 230, 118, 0.15);
}

.lab-message-error {
    background: rgba(255, 23, 68, 0.08);
    color: var(--off-red);
    border: 1px solid rgba(255, 23, 68, 0.15);
}

.lab-message-info {
    background: rgba(0, 229, 255, 0.08);
    color: var(--off-cyan);
    border: 1px solid rgba(0, 229, 255, 0.15);
}

.lab-url-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
}

.lab-url-code {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--off-cyan);
    word-break: break-all;
}

/* ========================================
   LEADERBOARD
   ======================================== */
.leaderboard-container {
    max-width: 920px;
    margin: 0 auto;
}

.leaderboard-header { margin-bottom: var(--space-xl); }

.leaderboard-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.leaderboard-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* Podium */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    padding: var(--space-xl);
}

.podium-item {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    min-width: 140px;
    transition: var(--transition-base);
}

.podium-item:hover { transform: translateY(-4px); }

.podium-item.first {
    order: 2;
    padding: var(--space-2xl) var(--space-xl);
    background: var(--bg-elevated);
    border-color: var(--off-amber);
}

.podium-item.second { order: 1; }
.podium-item.third { order: 3; }

.podium-rank {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.podium-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 auto var(--space-md);
    border: 1px solid var(--border-light);
}

.podium-item.first .podium-avatar {
    background: rgba(255, 145, 0, 0.1);
    color: var(--off-amber);
    border-color: var(--off-amber);
}

.podium-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-family: var(--font-display);
}

.podium-points {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--off-amber);
    font-weight: 600;
}

/* Leaderboard Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--font-mono);
}

.leaderboard-table th {
    text-align: left;
    padding: 14px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-elevated);
}

.leaderboard-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.leaderboard-table tr { transition: var(--transition-fast); }
.leaderboard-table tr:hover { background: rgba(255,255,255,0.02); }

.leaderboard-table tr.current-user {
    background: rgba(0, 230, 118, 0.04);
}

.leaderboard-table tr.current-user td { color: var(--text-primary); }

.leaderboard-rank {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-muted);
    width: 50px;
    font-size: 14px;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.leaderboard-username {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 13px;
}

.leaderboard-points {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--off-amber);
    text-align: right;
    font-size: 14px;
}

.leaderboard-solves {
    text-align: center;
    font-family: var(--font-mono);
}

.leaderboard-bloods {
    text-align: center;
    font-family: var(--font-mono);
    color: var(--off-red);
}

/* ========================================
   PROFILE
   ======================================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--off-green);
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.profile-info { flex: 1; }

.profile-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.profile-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.profile-stats {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
}

.profile-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

/* ========================================
   ADMIN
   ======================================== */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-xl);
    max-width: var(--max-width);
    margin: 0 auto;
}

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
}

.admin-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    height: fit-content;
    position: sticky;
    top: calc(var(--nav-height) + var(--space-lg));
}

.admin-nav-title {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-sm);
}

.admin-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-family: var(--font-mono);
}

.admin-nav-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.admin-nav-link.active {
    background: rgba(0, 230, 118, 0.08);
    color: var(--off-green);
    border: 1px solid rgba(0, 230, 118, 0.15);
}

.admin-header { margin-bottom: var(--space-xl); }

.admin-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-icon {
    width: 56px;
    height: 56px;
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
    opacity: 0.4;
}

.empty-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.empty-description {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto;
}

/* ========================================
   FOOTER
   ======================================== */
.main-footer {
    background: var(--bg-base);
    border-top: 1px solid var(--border-light);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo .brand-icon {
    width: 24px;
    height: 24px;
    color: var(--off-green);
}

.footer-tagline {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 280px;
}

.footer-section h4 {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-section a {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--off-green);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-subtle);
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
}

.footer-links a {
    color: var(--text-dim);
    font-size: 12px;
    font-family: var(--font-mono);
}

.footer-links a:hover { color: var(--off-green); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(3,3,3,0.98);
        flex-direction: column;
        padding: var(--space-xl);
        gap: var(--space-md);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links { flex-direction: column; width: 100%; }
    .nav-link { justify-content: flex-start; width: 100%; }
    .nav-auth { flex-direction: column; width: 100%; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .section { padding: var(--space-2xl) var(--space-md); }
    .main-content { padding: var(--space-md); }
    .hero-stats { gap: var(--space-lg); }
}

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
    .container { padding: 0 var(--space-md); }
    .hero-title { font-size: 32px; }
    .hero-stat-value { font-size: 22px; }
}

/* ========================================
   RECENT SOLVES (Dashboard / Profile)
   ======================================== */
.recent-solves {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.recent-solve {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 10px 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.recent-solve:hover { background: var(--bg-elevated); }

.recent-solve-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-solve-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.recent-solve-title:hover { color: var(--off-cyan); }

.recent-solve-category {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.recent-solve-points {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--off-amber);
    white-space: nowrap;
}

/* ========================================
   THEME TOGGLE
   ======================================== */
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.theme-toggle:hover {
    border-color: var(--off-cyan);
    color: var(--off-cyan);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.moon-icon { display: block; }
.sun-icon { display: none; }

[data-theme="light"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: block; }

/* ========================================
   UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-green { color: var(--off-green); }
.text-cyan { color: var(--off-cyan); }
.text-red { color: var(--off-red); }
.text-amber { color: var(--off-amber); }
.text-purple { color: var(--off-purple); }
.text-muted { color: var(--text-muted); }

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }

/* Scanline overlay */
.scanline::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.1) 51%);
    background-size: 100% 4px;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0.2;
}

/* Grid bg */
.grid-bg {
    background-image:
        linear-gradient(rgba(0, 230, 118, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}
