/* ============================================
   iRacing Arcade Ranked - Main Stylesheet
   Matches the official iRacing Arcade visual style:
   Dark theme, vibrant arcade colors, bold typography
   ============================================ */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Primary Palette */
    --color-bg-dark: #0b0b1a;
    --color-bg-main: #10102a;
    --color-bg-card: #181838;
    --color-bg-card-hover: #1e1e48;
    --color-bg-input: #13132b;
    --color-bg-nav: rgba(11, 11, 26, 0.96);
    --color-surface: #181838;
    
    /* Accent Colors */
    --color-primary: #e8443a;
    --color-primary-glow: rgba(232, 68, 58, 0.25);
    --color-secondary: #38bdf8;
    --color-secondary-glow: rgba(56, 189, 248, 0.2);
    --color-accent: #38bdf8;
    --color-accent-blue: #6366f1;
    --color-accent-yellow: #facc15;
    --color-accent-green: #34d399;
    --color-accent-purple: #a78bfa;
    --color-accent-orange: #fb923c;
    
    /* Text Colors */
    --color-text: #f0f0f8;
    --color-text-primary: #f0f0f8;
    --color-text-secondary: #9d9dbe;
    --color-text-muted: #5c5c7a;
    --color-text-link: #38bdf8;
    
    /* Borders */
    --color-border: #252548;
    --color-border-hover: #353568;
    
    /* Status Colors */
    --color-success: #34d399;
    --color-warning: #facc15;
    --color-danger: #ef4444;
    --color-info: #38bdf8;
    
    /* Podium Colors */
    --color-gold: #facc15;
    --color-silver: #b0b0c0;
    --color-bronze: #c2813a;
    
    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Sizing */
    --container-max: 1400px;
    --nav-height: 64px;
    --border-radius: 10px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 120ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 350ms ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow-red: 0 0 24px rgba(232, 68, 58, 0.15);
    --shadow-glow-blue: 0 0 24px rgba(56, 189, 248, 0.15);
}

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

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

::selection {
    background: rgba(56, 189, 248, 0.2);
    color: var(--color-text-primary);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-dark);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle fixed background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 15% 10%, rgba(232, 68, 58, 0.035) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 85%, rgba(56, 189, 248, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

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

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

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

ul, ol {
    list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

h1 { font-size: clamp(1.85rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.5rem); }
h4 { font-size: clamp(0.95rem, 1.8vw, 1.15rem); }

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-orange) 50%, var(--color-accent-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-blue {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.page-content {
    padding-top: calc(var(--nav-height) + 24px);
    padding-bottom: 48px;
    min-height: 100vh;
}

.section {
    padding: 60px 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--color-bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: background var(--transition-normal);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nav-logo img {
    height: 36px;
    width: auto;
}

.nav-logo .logo-accent {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 7px 14px;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--color-bg-nav);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-normal);
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 72px 0 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(ellipse at center, rgba(232, 68, 58, 0.04) 0%, transparent 55%);
    pointer-events: none;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 1.6vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-primary);
    margin-bottom: 14px;
}

.hero h1 {
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent-yellow);
}

.hero-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.card-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card-badge.gold { background: rgba(255, 215, 0, 0.15); color: var(--color-gold); }
.card-badge.silver { background: rgba(192, 192, 192, 0.15); color: var(--color-silver); }
.card-badge.bronze { background: rgba(205, 127, 50, 0.15); color: var(--color-bronze); }
.card-badge.primary { background: var(--color-primary-glow); color: var(--color-primary); }
.card-badge.info { background: var(--color-secondary-glow); color: var(--color-secondary); }

/* Stat cards */
.stat-card {
    text-align: center;
    padding: 28px 20px;
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-top: 8px;
}

/* Driver card */
.driver-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
}

.driver-card .driver-position {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    color: var(--color-text-muted);
}

.driver-card .driver-position.p1 { color: var(--color-gold); }
.driver-card .driver-position.p2 { color: var(--color-silver); }
.driver-card .driver-position.p3 { color: var(--color-bronze); }

.driver-card .driver-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-bg-main);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    overflow: hidden;
    flex-shrink: 0;
}

.driver-card .driver-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.driver-card .driver-info {
    flex: 1;
    min-width: 0;
}

.driver-card .driver-name {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.driver-card .driver-team {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.driver-card .driver-points {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-accent-yellow);
    text-align: right;
}

.driver-card .driver-points span {
    display: block;
    font-family: var(--font-primary);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Race card */
.race-card {
    cursor: pointer;
}

.race-card .race-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.race-card .race-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
}

.race-card .race-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.race-card .race-status.completed { background: rgba(0, 255, 136, 0.15); color: var(--color-accent-green); }
.race-card .race-status.scheduled { background: rgba(0, 212, 255, 0.15); color: var(--color-secondary); }
.race-card .race-status.in_progress { background: rgba(255, 215, 0, 0.15); color: var(--color-accent-yellow); }
.race-card .race-status.cancelled { background: rgba(255, 77, 77, 0.15); color: var(--color-primary); }

.race-card .race-details {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
}

.race-card .race-detail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.race-card .race-detail .icon {
    color: var(--color-text-muted);
}

/* ============================================
   Tables
   ============================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

thead {
    background: rgba(255, 255, 255, 0.03);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
}

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

th.sort-active {
    color: var(--color-secondary);
}

th.sort-active::after {
    content: ' ▼';
    font-size: 0.65rem;
}

th.sort-active.sort-asc::after {
    content: ' ▲';
}

td {
    padding: 12px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(42, 42, 85, 0.5);
    color: var(--color-text-secondary);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

tr:last-child td {
    border-bottom: none;
}

/* Position styling in tables */
td.pos { 
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

td.pos.p1 { color: var(--color-gold); }
td.pos.p2 { color: var(--color-silver); }
td.pos.p3 { color: var(--color-bronze); }

td.driver-name-cell a {
    color: var(--color-text-primary);
    font-weight: 600;
}

td.driver-name-cell a:hover {
    color: var(--color-secondary);
}

td.points-cell {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-accent-yellow);
}

td.time-cell {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

td.incidents-cell {
    font-weight: 600;
}

td.incidents-cell.clean {
    color: var(--color-accent-green);
}

td.incidents-cell.dirty {
    color: var(--color-primary);
}

td .status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

td .status-badge.dnf { background: rgba(255, 77, 77, 0.15); color: var(--color-primary); }
td .status-badge.dsq { background: rgba(180, 77, 255, 0.15); color: var(--color-accent-purple); }
td .status-badge.dns { background: rgba(107, 107, 138, 0.15); color: var(--color-text-muted); }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(232, 68, 58, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(232, 68, 58, 0.3);
    color: white;
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-primary);
    border: 2px solid var(--color-border);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--color-bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 2px var(--color-secondary-glow);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b8a' d='M6 8.825L.35 3.175 1.175 2.35 6 7.175 10.825 2.35l.825.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

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

/* Search input */
.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box .form-input {
    padding-left: 44px;
    padding-right: 44px;
    border-radius: 30px;
    font-size: 1rem;
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-box .search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.search-box .search-clear.visible {
    opacity: 1;
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    position: relative;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 32px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    opacity: 0.7;
}

.section-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Filter tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 4px;
}

.filter-tab {
    padding: 7px 14px;
    border: none;
    background: none;
    color: var(--color-text-muted);
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-radius: 5px;
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    color: var(--color-text-primary);
}

.filter-tab.active {
    background: var(--color-primary);
    color: white;
}

/* ============================================
   Page Header / Breadcrumb
   ============================================ */
.page-header {
    padding: 24px 0 16px;
}

.page-header h1 {
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    font-weight: 400;
    line-height: 1.5;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

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

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

.breadcrumb .sep {
    color: var(--color-text-muted);
    opacity: 0.5;
}

/* ============================================
   Driver Profile Page
   ============================================ */
.profile-header {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    margin-bottom: 32px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--color-bg-main);
    border: 3px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-rank {
    text-align: center;
    padding: 0 24px;
}

.profile-rank-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent-yellow);
    line-height: 1;
}

.profile-rank-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-meta {
        justify-content: center;
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--color-bg-main);
    border-top: 1px solid var(--color-border);
    padding: 32px 0 20px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .nav-logo {
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-primary);
    margin-bottom: 14px;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-column a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.footer-socials a:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom a {
    color: var(--color-text-muted);
}

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

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Loading & Empty States
   ============================================ */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: var(--font-display);
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-primary);
    font-size: 0.88rem;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(120%);
    transition: transform var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.info { border-left: 4px solid var(--color-info); }

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-secondary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.pagination button.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   Admin Panel Styles
   ============================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--color-bg-main);
    border-right: 1px solid var(--color-border);
    padding: 20px 0;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: 240px;
    overflow-y: auto;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.admin-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.admin-sidebar-nav a.active {
    border-left: 3px solid var(--color-primary);
}

.admin-main {
    padding: 30px;
    margin-left: 240px;
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
    .admin-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    .admin-main {
        margin-left: 0;
        padding: 20px;
    }
}

/* ============================================
   Country Flags (SVG from flagcdn)
   ============================================ */
.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
    flex-shrink: 0;
}

.country-flag {
    font-size: 1.2em;
    margin-right: 4px;
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.4s ease forwards;
}

.stagger > * {
    opacity: 0;
    animation: slideUp 0.4s ease forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }
.stagger > *:nth-child(9) { animation-delay: 0.45s; }
.stagger > *:nth-child(10) { animation-delay: 0.5s; }

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-hover);
}

/* ============================================
   Utility Classes
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.gap-xl { gap: 32px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 32px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.mb-xl { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }

/* ============================================
   Ranked Series List Page
   ============================================ */

/* Header */
.ranked-header {
    padding: 32px 0 16px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.ranked-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.ranked-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ranked-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.ranked-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ranked-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: rgba(255,255,255,0.03);
}

.legend-pill small {
    color: var(--color-text-muted);
    font-weight: 400;
    font-size: 0.7rem;
}

.legend-pill.fiat500 { color: #7cc4e0; border-color: rgba(120,190,220,0.25); }
.legend-pill.touring { color: #d4a856; border-color: rgba(210,170,100,0.25); }

.legend-car-img {
    width: 32px;
    height: 22px;
    object-fit: contain;
}

/* Demo Banner */
.demo-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
}

.demo-banner-icon { font-size: 1.3rem; flex-shrink: 0; }

.demo-banner-text {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.demo-banner-text strong { color: var(--color-secondary); }

/* ============================================
   Race Card Grid (iRacing Series List Style)
   ============================================ */
.race-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (min-width: 1200px) {
    .race-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .race-card-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .race-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Individual Race Card */
.rc-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.rc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}

.rc-card.fiat500:hover { border-color: rgba(120,190,220,0.3); }
.rc-card.touring:hover { border-color: rgba(210,170,100,0.3); }

.rc-card.rc-live { border-color: rgba(74,222,128,0.3); }

/* Banner Area */
.rc-banner {
    position: relative;
    height: 160px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(30,30,60,1), rgba(20,20,45,1));
}

.rc-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: blur(1px);
    transition: opacity 0.3s ease;
}

.rc-card:hover .rc-banner-img {
    opacity: 0.5;
}

.rc-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,26,0.2) 0%, rgba(10,10,26,0.75) 100%);
}

.rc-banner-car {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.rc-banner-car img {
    max-height: 80px;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.rc-banner-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 3;
}

.rc-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

.rc-timer.is-live {
    background: rgba(74,222,128,0.2);
    color: #4ade80;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,0.3); }
    50% { box-shadow: 0 0 0 4px rgba(0,255,136,0); }
}

.rc-drivers-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

/* Tags Row */
.rc-tags {
    display: flex;
    gap: 6px;
    padding: 10px 12px 0;
    flex-wrap: wrap;
}

.rc-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rc-tag-license {
    background: rgba(100,140,180,0.15);
    color: #8bb4d4;
}

.rc-card.fiat500 .rc-tag-license { background: rgba(100,180,220,0.12); color: #7cc4e0; }
.rc-card.touring .rc-tag-license { background: rgba(220,160,80,0.12); color: #d4a856; }

.rc-tag-ranked {
    background: rgba(100,180,100,0.12);
    color: #7abf7a;
}

.rc-tag-laps {
    background: rgba(255,255,255,0.06);
    color: var(--color-text-secondary);
}

.rc-tag-type {
    background: rgba(255,255,255,0.06);
    color: var(--color-text-secondary);
}

/* Info Section */
.rc-info {
    padding: 12px 12px 8px;
}

.rc-series-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.rc-detail {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 3px;
    line-height: 1.5;
}

/* Actions Bar */
.rc-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px 12px;
    flex-wrap: wrap;
}

.btn-rc {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-rc:hover { transform: translateY(-1px); }
.btn-rc:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-rc-reg {
    background: rgba(0,180,80,0.15);
    color: #4ade80;
    border: 1px solid rgba(0,180,80,0.25);
    flex: 1;
}

.btn-rc-reg:hover:not(:disabled) {
    background: rgba(0,180,80,0.3);
}

.btn-rc-unreg {
    background: rgba(220,60,60,0.12);
    color: #f87171;
    border: 1px solid rgba(220,60,60,0.25);
    flex: 1;
}

.btn-rc-unreg:hover:not(:disabled) {
    background: rgba(220,60,60,0.25);
}

.btn-rc-go {
    background: rgba(255,255,255,0.1);
    color: var(--color-text-primary);
    border: 1px solid rgba(255,255,255,0.15);
}

.btn-rc-go:hover:not(:disabled) {
    background: rgba(255,255,255,0.18);
}

/* Expandable Driver Panel */
.rc-expand {
    border-top: 1px solid var(--color-border);
}

.rc-expand-bar {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.02);
}

.rc-expanded {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.rc-driver-list {
    max-height: 400px;
    overflow-y: auto;
}

.rc-empty {
    padding: 20px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

/* Driver List Rows */
.rd-head {
    display: grid;
    grid-template-columns: 36px 1fr 64px 36px;
    gap: 4px;
    padding: 6px 12px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.rd-row {
    display: grid;
    grid-template-columns: 36px 1fr 64px 36px;
    gap: 4px;
    padding: 5px 12px;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    animation: fadeIn 0.2s ease forwards;
    opacity: 0;
}

.rd-row:last-child { border-bottom: none; }

.rd-pos {
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

.rd-name {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
}
.rd-name .flag-icon {
    width: 16px;
    height: 12px;
    flex-shrink: 0;
}

.rd-elo { text-align: right; font-size: 0.78rem; }
.rd-spl { text-align: center; font-size: 0.65rem; font-weight: 700; font-family: var(--font-display); }

.rd-spl-1 { color: var(--color-accent-green); }
.rd-spl-2 { color: var(--color-secondary); }
.rd-spl-3 { color: var(--color-accent-yellow); }
.rd-spl-4, .rd-spl-5 { color: var(--color-accent-purple); }

.rd-divider {
    text-align: center;
    padding: 5px 0;
    font-family: var(--font-display);
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.02);
}

.rd-divider.top { color: var(--color-accent-green); }


/* ============================================
   Queue Home CTA Section
   ============================================ */
.queue-cta {
    background: rgba(56, 189, 248, 0.04);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: var(--border-radius-lg);
    padding: 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.queue-cta::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.queue-cta h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
}

.queue-cta p {
    position: relative;
    z-index: 1;
    color: var(--color-text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.queue-cta .btn {
    position: relative;
    z-index: 1;
}

.btn-glow-green {
    background: linear-gradient(135deg, #34d399 0%, #38bdf8 100%);
    color: #0b0b1a;
    padding: 12px 32px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 3px 14px rgba(52, 211, 153, 0.2);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-glow-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 22px rgba(52, 211, 153, 0.3);
    color: #0b0b1a;
}

/* ============================================
   Auth Nav Items
   ============================================ */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.nav-auth-link {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    white-space: nowrap;
}

.nav-auth-link:hover,
.nav-auth-link.active {
    color: var(--color-text);
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #0a0a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.nav-register-btn {
    padding: 6px 16px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
}

@media (max-width: 768px) {
    .nav-auth {
        margin-left: 0;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--color-border);
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   Auth Card (Login / Register)
   ============================================ */
.auth-card {
    padding: 36px 28px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h2 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.auth-header p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.auth-form .form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-main);
    color: var(--color-text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.auth-form .form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.auth-form .form-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.7;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.form-error {
    padding: 10px 14px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 8px;
    color: #f87171;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
}

.form-success {
    padding: 10px 14px;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 8px;
    color: #4ade80;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: center;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-footer a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Profile Page
   ============================================ */
.profile-header {
    margin-bottom: 32px;
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-blue));
    color: #0a0a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.profile-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.profile-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-text-muted);
}

.profile-stats {
    margin-bottom: 40px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.profile-class-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
}

.profile-class-card.fiat500 {
    border-top: 3px solid #7cc4e0;
}

.profile-class-card.touring {
    border-top: 3px solid #d4a856;
}

.pcc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.pcc-car-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.pcc-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.pcc-elo {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.pcc-elo-bar {
    height: 6px;
    background: var(--color-bg-main);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.pcc-elo-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.pcc-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    text-align: center;
}

.pcc-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.pcc-stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-overall-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-pill {
    flex: 1;
    min-width: 140px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
}

.stat-pill-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.stat-pill-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.profile-section {
    margin-bottom: 32px;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .profile-hero {
        flex-direction: column;
        text-align: center;
    }
    .profile-meta {
        justify-content: center;
    }
    .profile-name {
        font-size: 1.4rem;
    }
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
    .profile-overall-stats {
        flex-direction: column;
    }
}

/* ============================================
   NEW Profile Page (redesigned)
   ============================================ */

/* ── Hero ── */
.prof-hero {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.prof-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56,189,248,0.15) 0%, rgba(14,14,32,0.95) 60%);
}
.prof-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-bg-main) 0%, transparent 50%);
}
.prof-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 48px;
    padding-bottom: 32px;
}
.prof-hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-blue));
    color: #0a0a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    flex-shrink: 0;
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.prof-hero-avatar.elo-diamond { border-color: rgba(185, 242, 255, 0.5); }
.prof-hero-avatar.elo-platinum { border-color: rgba(64, 224, 208, 0.5); }
.prof-hero-avatar.elo-gold { border-color: rgba(255, 215, 0, 0.5); }
.prof-hero-avatar.elo-silver { border-color: rgba(192, 192, 192, 0.5); }
.prof-hero-avatar.elo-bronze { border-color: rgba(205, 127, 50, 0.5); }

.prof-hero-info { flex: 1; }
.prof-hero-name {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.prof-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.prof-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-text-muted);
    display: inline-block;
}
.prof-hero-elo {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.prof-elo-number {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-accent);
    line-height: 1;
}
.prof-elo-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Quick Stats ── */
.prof-quick-stats {
    display: flex;
    gap: 2px;
    margin: -16px 0 32px;
    position: relative;
    z-index: 2;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}
.prof-qs-item {
    flex: 1;
    text-align: center;
    padding: 16px 8px;
}
.prof-qs-item + .prof-qs-item {
    border-left: 1px solid var(--color-border);
}
.prof-qs-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--color-text);
}
.prof-qs-label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ── Class Cards ── */
.prof-classes { margin-bottom: 32px; }
.prof-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}
.prof-class-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.prof-cc-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
}
.prof-cc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}
.prof-cc-car {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.prof-cc-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}
.prof-cc-elo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.prof-cc-tier {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}
.prof-cc-bar {
    height: 5px;
    background: rgba(255,255,255,0.04);
    border-radius: 3px;
    margin-bottom: 16px;
    overflow: hidden;
}
.prof-cc-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}
.prof-cc-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}
.prof-cc-stat-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--color-text);
}
.prof-cc-stat-lbl {
    display: block;
    font-size: 0.68rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ── Section Titles ── */
.prof-section {
    margin-bottom: 32px;
}
.prof-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text);
}
.prof-section-title svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

/* ── Race History ── */
.prof-history { }
.prof-history-head, .prof-history-row {
    display: grid;
    grid-template-columns: 80px 1fr 60px 90px;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}
.prof-history-head {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--color-border);
}
.prof-history-row {
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.15s;
}
.prof-history-row:hover {
    background: rgba(255,255,255,0.02);
}
.ph-date {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}
.ph-series {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.ph-class-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ph-class-dot.fiat500 { background: #7cc4e0; }
.ph-class-dot.touring { background: #d4a856; }
.ph-pos {
    font-weight: 700;
    font-family: var(--font-mono);
}
.ph-pos.pos-1 { color: #ffd700; }
.ph-pos.pos-2 { color: #c0c0c0; }
.ph-pos.pos-3 { color: #cd7f32; }
.ph-pos.pos-last { color: #f87171; }
.ph-field {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.prof-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}
.prof-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

/* ── Track Stats ── */
.prof-track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.prof-track-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px;
    overflow: hidden;
}
.prof-track-img {
    width: 64px;
    height: 44px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-main);
}
.prof-track-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.prof-track-name {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.prof-track-stats-row {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ── Settings ── */
.prof-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 8px 0;
}
.prof-settings-toggle:hover .prof-section-title {
    color: var(--color-accent);
}
.prof-settings-chevron {
    color: var(--color-text-muted);
    transition: transform 0.2s;
}
.prof-settings-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.prof-settings-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.prof-settings-form {
    max-width: 420px;
}
.prof-danger {
    border-color: rgba(255,77,77,0.15);
}

/* ── My Active Lobbies (Queue page) ── */
.my-lobbies-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.my-lobby-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.15s, border-color 0.15s;
}
.my-lobby-card:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.1);
}
.my-lobby-img {
    width: 56px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-bg-main);
}
.my-lobby-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.my-lobby-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.my-lobby-series {
    font-size: 0.88rem;
    font-weight: 600;
}
.my-lobby-track {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}
.my-lobby-meta {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}
.my-lobby-arrow {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* ── Locked registration button ── */
.btn-rc-locked {
    background: rgba(255,255,255,0.04) !important;
    color: var(--color-text-muted) !important;
    border-color: rgba(255,255,255,0.06) !important;
    cursor: not-allowed;
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .prof-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .prof-hero-name {
        justify-content: center;
        font-size: 1.4rem;
    }
    .prof-hero-meta {
        justify-content: center;
    }
    .prof-hero-elo {
        justify-content: center;
    }
    .prof-quick-stats {
        flex-wrap: wrap;
    }
    .prof-qs-item {
        min-width: 33%;
    }
    .prof-classes-grid {
        grid-template-columns: 1fr;
    }
    .prof-history-head, .prof-history-row {
        grid-template-columns: 60px 1fr 50px 70px;
        font-size: 0.8rem;
    }
    .prof-track-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Track Cards
   ============================================ */
.track-card {
    overflow: hidden;
    padding: 0 !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.track-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.track-card-img {
    width: 100%;
    height: 160px;
    background: var(--color-bg-main);
    position: relative;
    overflow: hidden;
}

.track-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.track-card-img-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--color-bg-main);
}

.track-card-img.no-img img {
    display: none;
}

.track-card-img.no-img .track-card-img-fallback {
    display: flex;
}

.track-card-body {
    padding: 16px 20px 20px;
}

.track-card-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.track-card-meta {
    display: flex;
    gap: 14px;
    font-size: 0.83rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.track-card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.track-card-series {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
/* ============================================
   Car Cards
   ============================================ */
.car-card {
    overflow: hidden;
    padding: 0 !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.car-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.car-card-img {
    width: 100%;
    height: 200px;
    background: var(--color-bg-main);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.car-card-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.car-card-img-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--color-bg-main);
}

.car-card-img.no-img img { display: none; }
.car-card-img.no-img .car-card-img-fallback { display: flex; }

.car-card-body {
    padding: 20px 24px 24px;
}

.car-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.car-card-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.car-card-class {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-muted);
    font-weight: 500;
}

.car-card-desc {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.car-card-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.car-spec {
    background: var(--color-bg-main);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.car-spec-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.car-spec-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.car-card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ============================================
   Landing Page (Home)
   ============================================ */
.landing-hero {
    padding: 88px 0 64px;
    text-align: center;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(232, 68, 58, 0.04) 0%, transparent 55%);
    pointer-events: none;
}

.landing-eyebrow {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    margin-bottom: 18px;
}

.landing-headline {
    font-size: clamp(2.2rem, 5.5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.landing-subtitle {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: var(--color-text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.landing-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-landing-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: rgba(0, 180, 80, 0.13);
    color: #4ade80;
    border: 1px solid rgba(0, 180, 80, 0.25);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-landing-primary:hover {
    background: rgba(0, 180, 80, 0.24);
    transform: translateY(-1px);
    color: #4ade80;
}

.btn-landing-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    background: transparent;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-landing-secondary:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

/* How It Works */
.landing-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 36px;
    letter-spacing: 0.01em;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.landing-step {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 28px 22px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.landing-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(232, 68, 58, 0.1);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.landing-step h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.landing-step p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Series Cards */
.landing-series {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.landing-series-card {
    display: flex;
    align-items: center;
    gap: 22px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.landing-series-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.landing-series-card.fiat500:hover { border-color: rgba(120, 190, 220, 0.3); }
.landing-series-card.touring:hover { border-color: rgba(210, 170, 100, 0.3); }

.landing-series-icon {
    flex-shrink: 0;
    width: 80px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.landing-series-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.landing-series-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.landing-series-card.fiat500 .landing-series-info h3 { color: #7cc4e0; }
.landing-series-card.touring .landing-series-info h3 { color: #d4a856; }

.landing-series-info p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.landing-series-detail {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Leaderboard Table */
.landing-leaderboard {
    max-width: 600px;
    margin: 0 auto;
}

.landing-lb-table {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.landing-lb-head {
    display: grid;
    grid-template-columns: 48px 1fr 64px 64px;
    gap: 4px;
    padding: 10px 16px;
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.02);
}

.landing-lb-row {
    display: grid;
    grid-template-columns: 48px 1fr 64px 64px;
    gap: 4px;
    padding: 10px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s;
}

.landing-lb-row:last-child { border-bottom: none; }
.landing-lb-row:hover { background: rgba(255, 255, 255, 0.02); }

.landing-lb-pos {
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
    color: var(--color-text-muted);
}

.landing-lb-pos.top-1 { color: var(--color-gold); }
.landing-lb-pos.top-2 { color: var(--color-silver); }
.landing-lb-pos.top-3 { color: var(--color-bronze); }

.landing-lb-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-lb-races {
    text-align: right;
    color: var(--color-text-secondary);
}

.landing-lb-elo {
    text-align: right;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-accent-yellow);
}

.landing-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.landing-empty a {
    color: var(--color-secondary);
}

/* CTA Section */
.landing-cta {
    text-align: center;
    padding: 40px 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.landing-cta h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.landing-cta p {
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* Minimal Footer */
.footer-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-brand-min {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-links-min {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links-min a {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    transition: color 0.15s;
}

.footer-links-min a:hover {
    color: var(--color-text-primary);
}

@media (max-width: 768px) {
    .landing-steps {
        grid-template-columns: 1fr;
    }
    .landing-series {
        grid-template-columns: 1fr;
    }
    .landing-series-card {
        flex-direction: column;
        text-align: center;
    }
    .footer-minimal {
        flex-direction: column;
        text-align: center;
    }
    .footer-brand-min {
        flex-direction: column;
    }
    .footer-links-min {
        justify-content: center;
    }
}

/* ============================================
   Lobby Page – Redesigned
   ============================================ */

/* ── Hero Banner ── */
.lobby-hero {
    position: relative;
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 2rem;
}
.lobby-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    filter: brightness(0.45) saturate(1.2);
    transition: opacity 0.4s;
}
.lobby-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--color-bg-main) 0%, transparent 60%);
}
.lobby-hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
    width: 100%;
}
.lobby-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}
.lobby-back:hover {
    color: var(--color-accent);
}
.lobby-hero-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.lobby-hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}
.lobby-hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Split & ranked badges */
.split-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--color-accent-blue);
    color: #fff;
}
.split-1 { background: var(--color-accent); }
.split-2 { background: var(--color-accent-blue); }
.split-3 { background: var(--color-accent-purple); }
.split-4 { background: var(--color-accent-orange); }
.split-top {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #1a1a2e;
}
.lobby-badge-ranked {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    border: 1px solid rgba(255,255,255,0.08);
}

/* Stat items in hero */
.lobby-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.lobby-stat svg {
    opacity: 0.5;
    flex-shrink: 0;
}
.lobby-stat-car {
    height: 22px;
    width: auto;
    border-radius: 3px;
}
.lobby-stat-session {
    opacity: 0.4;
    font-size: 0.75rem;
    font-family: monospace;
}

/* ELO range mini bar */
.lobby-stat-elo {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
}
.elo-range-label {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.35);
}
.elo-range-low, .elo-range-high {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-text);
}
.elo-range-bar-mini {
    width: 50px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.elo-range-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-blue));
    border-radius: 2px;
}
.elo-range-avg {
    font-size: 0.72rem;
    color: var(--color-text-secondary);
}

/* ELO chips (used in driver rows) */
.elo-chip {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: var(--color-text);
}
.elo-diamond { color: #b9f2ff; background: rgba(185, 242, 255, 0.12); }
.elo-platinum { color: #e2e8f0; background: rgba(226, 232, 240, 0.1); }
.elo-gold { color: var(--color-accent-yellow); background: rgba(250, 204, 21, 0.1); }
.elo-silver { color: #94a3b8; background: rgba(148, 163, 184, 0.1); }
.elo-bronze { color: #cd7f32; background: rgba(205, 127, 50, 0.1); }

/* ── Grid Layout ── */
.lobby-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ── Panels ── */
.lobby-panel {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
}
.lobby-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
.lobby-panel-header h3 {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
    margin: 0;
}
.lobby-driver-count {
    background: var(--color-accent);
    color: #0b0b1a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}
.lobby-loading {
    color: var(--color-muted);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

/* ── Driver List ── */
.lobby-driver-table {
    /* scrollable if many drivers */
    max-height: 420px;
    overflow-y: auto;
}
.ld-head {
    display: grid;
    grid-template-columns: 42px 1fr 70px;
    padding: 0.55rem 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 1;
}
.ld-row {
    display: grid;
    grid-template-columns: 42px 1fr 70px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.025);
    transition: background 0.15s;
}
.ld-row:last-child { border-bottom: none; }
.ld-row:hover { background: rgba(255,255,255,0.02); }
.ld-row.ld-you {
    background: rgba(56, 189, 248, 0.06);
}
.ld-pos { text-align: center; font-weight: 600; font-size: 0.85rem; }
.ld-pos.p1 { color: var(--color-gold, #FFD700); }
.ld-pos.p2 { color: var(--color-silver, #C0C0C0); }
.ld-pos.p3 { color: var(--color-bronze, #CD7F32); }
.ld-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ld-name .flag-icon { flex-shrink: 0; }
.ld-elo { text-align: right; }

/* ── Results Panel ── */
.lobby-col-drivers {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.lobby-results-toggle {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.lobby-results-toggle:hover {
    background: rgba(255,255,255,0.03);
}
.results-chevron {
    transition: transform 0.25s;
    opacity: 0.5;
}
.lobby-results-body {
    padding: 1rem;
}
.lobby-results-desc {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}

/* ── Race Settings Panel ── */
.lobby-settings {
    padding: 0.75rem 1rem 1rem;
}
.ls-group {
    margin-bottom: 0.75rem;
}
.ls-group:last-child { margin-bottom: 0; }
.ls-group-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.35rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.ls-row:last-child { border-bottom: none; }
.ls-label {
    color: var(--color-text-secondary);
}
.ls-value {
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: right;
}
.ls-value.ls-off {
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* ── Result ordering rows ── */
.results-drag-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.result-order-row {
    display: grid;
    grid-template-columns: 20px 28px 1fr 46px 52px;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.5rem;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    background: var(--color-bg-card);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    cursor: grab;
    user-select: none;
}
.result-order-row:hover {
    background: var(--color-bg-card-hover);
}
.result-order-row.dragging {
    opacity: 0.9;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 100;
    cursor: grabbing;
}
.drag-placeholder {
    border: 2px dashed rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.05);
}
.ro-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
    font-size: 0.8rem;
    cursor: grab;
    letter-spacing: 1px;
}
.result-order-row:hover .ro-handle { color: rgba(255,255,255,0.4); }
.ro-pos {
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
}
.ro-driver {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ro-driver .flag-icon { flex-shrink: 0; }
.ro-elo {
    text-align: right;
    font-size: 0.76rem;
    color: var(--color-text-secondary);
}
.ro-arrows {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}
.ro-arrows button {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.45);
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}
.ro-arrows button:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--color-accent);
    border-color: rgba(56, 189, 248, 0.3);
}
.ro-arrows button:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

/* Vote bar */
.vote-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}
.vote-bar .btn {
    flex-shrink: 0;
}
.vote-info {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    flex: 1;
}
.vote-count {
    font-weight: 600;
    color: var(--color-accent);
}
.vote-status {
    font-size: 0.78rem;
    color: var(--color-accent-green);
    font-weight: 600;
}

/* Submitted results */
.results-submitted {
    text-align: center;
    padding: 1rem 0;
}
.results-submitted-icon {
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.15);
    color: var(--color-accent-green);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 auto 0.5rem;
}
.results-submitted p {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}
.results-summary {
    text-align: left;
}
.result-summary-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.83rem;
    border-bottom: 1px solid rgba(255,255,255,0.025);
}
.result-summary-row:last-child { border-bottom: none; }
.rs-pos {
    display: inline-block;
    width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
}
.rs-pos.p1 { color: var(--color-gold, #FFD700); }
.rs-pos.p2 { color: var(--color-silver, #C0C0C0); }
.rs-pos.p3 { color: var(--color-bronze, #CD7F32); }
.rs-elo-change {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
}
.rs-elo-change.positive { color: var(--color-accent-green); }
.rs-elo-change.negative { color: #f87171; }

/* ── Reputation Voting (Post-Race) ── */
.rep-voting-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.rep-voting-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}
.rep-voting-desc {
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}
.rep-driver-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rep-driver-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.65rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
}
.rep-driver-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-primary);
}
.rep-buttons {
    display: flex;
    gap: 0.4rem;
}
.rep-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--color-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.rep-btn:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
}
.rep-btn-clean.rep-btn-active {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #4ade80;
}
.rep-btn-reckless.rep-btn-active {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #f87171;
}

/* ── Reputation Badge (Profile) ── */
.rep-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
    letter-spacing: 0.02em;
}
.rep-badge-clean {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}
.rep-badge-reckless {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}
.rep-counts {
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* ── Chat Panel ── */
.lobby-panel-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 460px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-empty {
    color: var(--color-muted);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.88rem;
}

.chat-msg {
    max-width: 85%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.04);
}

.chat-msg-me {
    align-self: flex-end;
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.15);
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.2rem;
}

.chat-msg-name {
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--color-accent);
}

.chat-msg-time {
    font-size: 0.68rem;
    color: var(--color-muted);
}

.chat-msg-text {
    font-size: 0.86rem;
    line-height: 1.45;
    word-break: break-word;
}

.chat-input-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.chat-input {
    flex: 1;
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.86rem;
    border-radius: 8px;
}

.chat-send {
    white-space: nowrap;
    padding: 0.5rem 1.1rem;
    font-size: 0.82rem;
}

.chat-login-notice {
    padding: 0.85rem 1rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-muted);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}
.chat-login-notice a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* ── w-full utility ── */
.w-full { width: 100%; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .lobby-grid {
        grid-template-columns: 1fr;
    }
    .lobby-panel-chat {
        min-height: 380px;
    }
    .lobby-hero-title {
        font-size: 1.35rem;
    }
}
@media (max-width: 600px) {
    .lobby-hero { min-height: 200px; }
    .lobby-hero-title { font-size: 1.15rem; }
    .lobby-hero-stats { gap: 0.75rem; font-size: 0.78rem; }
    .lobby-stat-elo { flex-wrap: wrap; }
}