/* ============================================
   PITSTOP MASTERS - Dark F1 Theme
   ============================================ */

:root {
    --pirelli-red: #C8102E;
    --pirelli-yellow: #FFD100;
    --pirelli-red-dark: #9B0C23;
    --dark-bg: #0A0A0A;
    --card-bg: #151515;
    --card-bg-hover: #1C1C1C;
    --card-border: #252525;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --text-muted: #5A5A5A;
    --success: #00C853;
    --error: #FF4444;
    --tier-gold: #FFD700;
    --tier-silver: #C0C0C0;
    --tier-bronze: #CD7F32;
    --tier-blue: #4A90D9;
    --compound-hard: #FFFFFF;
    --compound-medium: #FFD100;
    --compound-soft: #C8102E;
    --gradient-pirelli: linear-gradient(135deg, var(--pirelli-red), var(--pirelli-yellow));
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ---- LANDING PAGE ---- */

.landing-page {
    min-height: 100vh;
    overflow-x: hidden;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(200, 16, 46, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(255, 209, 0, 0.08) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, 3%); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(200, 16, 46, 0.15);
    border: 1px solid rgba(200, 16, 46, 0.3);
    color: var(--pirelli-red);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero h1 .text-gradient {
    background: var(--gradient-pirelli);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 480px) {
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }
}

/* Buttons */
.btn-pirelli {
    background: var(--gradient-pirelli);
    color: white;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pirelli:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 16, 46, 0.4);
    color: white;
}

.btn-outline-light2 {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    padding: 0.85rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-outline-light2:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Landing features */
.features-section {
    padding: 5rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--pirelli-red);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Race cards on landing */
.race-strip {
    padding: 3rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.race-strip-inner {
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem;
    min-width: max-content;
}

.race-chip {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    text-align: center;
    min-width: 120px;
    transition: all 0.2s ease;
}

.race-chip:first-child {
    border-color: var(--pirelli-red);
    background: rgba(200, 16, 46, 0.1);
}

.race-chip .flag {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.35rem;
}

.race-chip .race-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.race-chip .race-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Compound visual */
.compound-dot {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid;
}

.compound-dot.hard { background: var(--compound-hard); border-color: #DDD; }
.compound-dot.medium { background: var(--compound-medium); border-color: #D4A800; }
.compound-dot.soft { background: var(--compound-soft); border-color: #9B0C23; }

.compound-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: var(--card-bg);
}

.compound-label:hover {
    background: var(--card-bg-hover);
}

.compound-label.selected {
    border-color: var(--pirelli-yellow);
    background: rgba(255, 209, 0, 0.1);
}

/* ---- NAVBAR ---- */

.navbar {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 0.6rem 0;
    z-index: 1050;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-pirelli);
    border-radius: var(--radius-sm);
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: -0.02em;
}

.brand-text {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #FF6B35;
}

.streak-badge i {
    color: #FF6B35;
}

.points-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pirelli-yellow);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: white;
}

/* ---- BOTTOM NAV ---- */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--card-border);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 1050;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    transition: color 0.2s ease;
}

.bottom-nav-item i {
    font-size: 1.3rem;
}

.bottom-nav-item.active {
    color: var(--pirelli-red);
}

/* ---- MAIN CONTENT ---- */

.main-content {
    padding-top: 70px;
    padding-bottom: 90px;
    min-height: 100vh;
}

@media (min-width: 768px) {
    .main-content {
        padding-bottom: 2rem;
    }
}

.page-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1rem;
}

/* ---- CARDS ---- */

.qp-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.qp-card-accent {
    border-left: 3px solid var(--pirelli-red);
}

.qp-card-highlight {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.08), rgba(255, 209, 0, 0.05));
    border-color: rgba(200, 16, 46, 0.3);
}

/* ---- DASHBOARD ---- */

.race-countdown {
    text-align: center;
    padding: 2rem 1rem;
}

.race-countdown .flag {
    font-size: 3rem;
}

.race-countdown .race-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0.5rem 0 0.25rem;
}

.race-countdown .race-circuit {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.countdown-unit {
    text-align: center;
}

.countdown-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    min-width: 60px;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}

.compounds-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.compound-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    font-size: 0.8rem;
    font-weight: 600;
}

.compound-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.35rem;
}

/* ---- PREDICTION FORM ---- */

.question-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--pirelli-red);
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.question-text {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.question-points {
    font-size: 0.75rem;
    color: var(--pirelli-yellow);
    font-weight: 600;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    width: 100%;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-muted);
}

.option-btn.selected {
    background: rgba(200, 16, 46, 0.12);
    border-color: var(--pirelli-red);
    color: white;
    font-weight: 600;
}

.option-btn .option-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.option-btn.selected .option-radio {
    border-color: var(--pirelli-red);
    background: var(--pirelli-red);
}

.option-btn.selected .option-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Strategy builder */
.stint-row {
    margin-bottom: 0.75rem;
}

.stint-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stint-options {
    display: flex;
    gap: 0.5rem;
}

.compound-select {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 600;
}

.compound-select:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-muted);
}

.compound-select.selected {
    border-color: var(--pirelli-yellow);
    background: rgba(255, 209, 0, 0.08);
    color: var(--text-primary);
}

.compound-select .compound-circle {
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.compound-select.selected .compound-circle {
    transform: scale(1.15);
}

.stint-arrow {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.35rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

#strategy-preview-visual .strat-compound {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

#strategy-preview-visual .strat-separator {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Impossible bet */
.impossible-card {
    border-color: var(--pirelli-yellow);
    background: linear-gradient(135deg, rgba(255, 209, 0, 0.05), transparent);
}

.impossible-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    background: rgba(255, 209, 0, 0.15);
    color: var(--pirelli-yellow);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.75rem;
}

.impossible-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    width: 120px;
    transition: border-color 0.2s ease;
}

.impossible-input:focus {
    outline: none;
    border-color: var(--pirelli-yellow);
}

/* ---- RESULTS ---- */

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--card-border);
}

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

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

.result-answer {
    font-weight: 700;
    font-size: 0.9rem;
}

.result-correct {
    color: var(--success);
}

.result-wrong {
    color: var(--error);
}

.result-icon {
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

/* ---- LEADERBOARD ---- */

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.35rem;
    transition: background 0.2s ease;
}

.leaderboard-item:hover {
    background: var(--card-bg-hover);
}

.leaderboard-item.is-me {
    background: rgba(200, 16, 46, 0.1);
    border: 1px solid rgba(200, 16, 46, 0.3);
}

.lb-rank {
    width: 32px;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.lb-rank.top1 { color: var(--tier-gold); font-size: 1.2rem; }
.lb-rank.top2 { color: var(--tier-silver); }
.lb-rank.top3 { color: var(--tier-bronze); }

.lb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
    flex-shrink: 0;
}

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

.lb-name {
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lb-points {
    font-weight: 800;
    font-size: 1rem;
    color: var(--pirelli-yellow);
    flex-shrink: 0;
}

.lb-streak {
    font-size: 0.8rem;
    color: #FF6B35;
    flex-shrink: 0;
}

/* Tier filter */
.tier-filter {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.tier-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 50px;
    border: 1px solid var(--card-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tier-btn.active, .tier-btn:hover {
    background: var(--card-bg);
    border-color: var(--pirelli-red);
    color: var(--text-primary);
}

/* ---- PROFILE ---- */

.profile-header {
    text-align: center;
    padding: 2rem 1rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1rem;
    border: 3px solid;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
}

.profile-tier {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.profile-ig {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Badges grid */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.badge-item {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    transition: all 0.2s ease;
}

.badge-item.earned {
    border-color: var(--pirelli-yellow);
    background: rgba(255, 209, 0, 0.05);
}

.badge-item.locked {
    opacity: 0.35;
}

.badge-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.35rem;
}

.badge-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.badge-rarity {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rarity-common { color: var(--text-muted); }
.rarity-uncommon { color: var(--success); }
.rarity-rare { color: var(--tier-blue); }
.rarity-epic { color: #9B59B6; }
.rarity-legendary { color: var(--pirelli-yellow); }

/* Discount code */
.discount-card {
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.15), rgba(255, 209, 0, 0.1));
    border: 1px solid rgba(200, 16, 46, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}

.discount-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pirelli-yellow);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    letter-spacing: 0.05em;
}

.discount-pct {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-pirelli);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- SHAREABLE CARD (preview) ---- */

.share-card {
    background: linear-gradient(145deg, #1A1A1A, #0D0D0D);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    max-width: 360px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.share-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-pirelli);
}

.share-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.share-card-race {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.share-results {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.share-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.share-result-row .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.share-result-row .icon {
    font-size: 1.1rem;
}

.share-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

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

.share-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
}

.share-stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.share-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.share-hashtag {
    color: var(--pirelli-red);
    font-weight: 700;
}

/* ---- FORMS ---- */

.form-control-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-control-dark:focus {
    outline: none;
    border-color: var(--pirelli-red);
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

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

.form-label-dark {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

/* Mode selector */
.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.mode-card {
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.mode-card:hover {
    border-color: var(--text-muted);
}

.mode-card.selected {
    border-color: var(--pirelli-red);
    background: rgba(200, 16, 46, 0.08);
}

.mode-card .mode-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.mode-card .mode-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.mode-card .mode-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---- UTILITIES ---- */

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--pirelli-red);
}

.text-pirelli-red { color: var(--pirelli-red); }
.text-pirelli-yellow { color: var(--pirelli-yellow); }
.text-muted2 { color: var(--text-muted); }
.text-success2 { color: var(--success); }
.text-error { color: var(--error); }
.bg-card { background: var(--card-bg); }

.divider {
    height: 1px;
    background: var(--card-border);
    margin: 1.5rem 0;
}

/* Override Bootstrap dark dropdowns */
.dropdown-menu-dark {
    background: #1A1A1A;
    border: 1px solid var(--card-border);
}

.dropdown-menu-dark .dropdown-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

/* Toast / Alert */
.qp-alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.qp-alert-success {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: var(--success);
}

.qp-alert-error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: var(--error);
}

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

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

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

/* ---- REGISTER / LOGIN PAGES ---- */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-pirelli);
}

/* Sprint badge */
.sprint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: rgba(255, 209, 0, 0.15);
    color: var(--pirelli-yellow);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Multiplier badge */
.multiplier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: rgba(200, 16, 46, 0.15);
    color: var(--pirelli-red);
    font-size: 0.7rem;
    font-weight: 700;
}

/* Race history mini chart */
.history-bar {
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 50px;
}

.history-bar-item {
    flex: 1;
    border-radius: 2px 2px 0 0;
    min-height: 4px;
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
