:root {
    --bg-dark: #070b14;
    --navy-blue: #0f172a;
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.6);
    --gold: #f59e0b;
    --silver: #9ca3af;
    --bronze: #b45309;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Not-Live Overlay */
.not-live-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(7, 11, 20, 0.92);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.not-live-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.not-live-card {
    text-align: center;
    padding: 3.5rem 4rem;
    max-width: 540px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.not-live-icon {
    font-size: 4rem;
    animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.not-live-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.not-live-message {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.not-live-brand {
    margin-top: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-blue);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Blurred dashboard when not live */
#dashboard-content.blurred {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.background-effects {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.blob-1 {
    width: 600px; height: 600px;
    background: var(--accent-blue-glow);
    top: -100px; left: -100px;
}

.blob-2 {
    width: 500px; height: 500px;
    background: rgba(30, 58, 138, 0.4);
    bottom: -50px; right: 10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Main Container */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Typography */
.dashboard-header {
    text-align: center;
}

.event-title {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--accent-blue);
    text-shadow: 0 0 20px var(--accent-blue-glow);
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Progress Section */
.progress-section {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.goal-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.stat-box .label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-box h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
}

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

.current-progress h2 {
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.stat-box .unit {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.7;
}

.progress-bar-container {
    width: 100%;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 100px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-glow {
    position: absolute;
    top: 0; left: 0; height: 100%; width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-blue-glow), transparent);
    opacity: 0.3;
    animation: shiftGlow 3s infinite linear;
    pointer-events: none;
}

@keyframes shiftGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 100px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-percentage {
    text-align: right;
    font-weight: 600;
    color: var(--accent-blue);
    font-size: 1.1rem;
}

/* Leaderboard */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.leaderboard-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.driver-row {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.driver-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.rank-badge {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    margin-right: 1.5rem;
    color: var(--text-muted);
}

/* Podium Colors */
.driver-row[data-rank="1"] .rank-badge { background: rgba(245, 158, 11, 0.2); border: 1px solid var(--gold); color: var(--gold); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
.driver-row[data-rank="2"] .rank-badge { background: rgba(156, 163, 175, 0.2); border: 1px solid var(--silver); color: var(--silver); }
.driver-row[data-rank="3"] .rank-badge { background: rgba(180, 83, 9, 0.2); border: 1px solid var(--bronze); color: var(--bronze); }

.driver-info {
    flex: 1;
}

.driver-name {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.driver-vtc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.driver-distance {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-align: right;
}

.driver-distance .unit {
    font-size: 1rem;
    opacity: 0.7;
    margin-left: 2px;
}

.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
}

@media (max-width: 768px) {
    .event-title { font-size: 2.5rem; }
    .progress-section { padding: 2rem 1.5rem; }
    .goal-info { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .stat-box h2 { font-size: 2rem; }
    .driver-distance { font-size: 1.2rem; }
    .filter-buttons { flex-wrap: wrap; }
}

/* VTC Filter Bar */
.filter-section {
    display: flex;
    flex-direction: column;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.75rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-main);
}

.filter-btn.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Leaderboard Title Row */
.leaderboard-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.leaderboard-header-row .section-title {
    margin-bottom: 0;
    text-align: left;
}

.vtc-total {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
}
