:root { 
    --red: #ed1c24; --bg: #050505; --card: #121214; 
    --accent: #1e1e22; --text: #f0f0f5; --green: #00ff41;
}

body { 
    margin: 0; padding: 0; height: 100vh; width: 100vw;
    display: grid; grid-template-rows: 60px 1fr 40px; 
    background: var(--bg); color: var(--text);
    font-family: 'Inter', sans-serif; overflow: hidden; 
}

header { 
    background: var(--red); display: flex; align-items: center; 
    justify-content: space-between; padding: 0 25px; z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.main-grid { 
    display: grid; grid-template-columns: 300px 1fr 340px; 
    gap: 10px; padding: 10px; height: 100%; overflow: hidden; 
    box-sizing: border-box;
}

.panel { 
    background: var(--card); border: 1px solid var(--accent); 
    display: flex; flex-direction: column; overflow: hidden; border-radius: 6px;
}

.panel-header { 
    background: var(--accent); padding: 10px 15px; font-size: 0.7rem; 
    font-weight: 900; text-transform: uppercase; color: #888;
    letter-spacing: 1.5px; display: flex; justify-content: space-between;
}

.leaderboard-scroll { flex: 1; overflow-y: auto; }

.map-container { 
    position: relative; flex: 1; background: #000; 
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}

#track-svg { width: 90%; height: 90%; }
#track-bg { stroke: #1a1a1c; stroke-width: 40; fill: none; stroke-linecap: round; }
#racing-line { stroke: rgba(255,255,255,0.05); stroke-width: 38; fill: none; stroke-linecap: round; }

/* Telemetry Widgets */
.tel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 15px; }
.tel-box { 
    background: #1a1a1e; padding: 15px; border-radius: 6px; 
    text-align: center; border: 1px solid #25252b; 
}
.tel-box small { font-size: 0.6rem; color: #666; display: block; margin-bottom: 5px; font-weight: bold; }
.tel-box span { font-size: 1.4rem; font-weight: 900; font-family: 'JetBrains Mono', monospace; }

/* Onboard Viewport */
#cam-viewport { height: 200px; background: #000; position: relative; overflow: hidden; border-bottom: 2px solid #000; }
.cam-label { position: absolute; top: 15px; left: 15px; background: var(--red); color: white; padding: 3px 8px; font-size: 0.6rem; font-weight: 900; border-radius: 2px; }

footer { 
    background: #000; border-top: 1px solid #111; 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 0 25px; font-size: 0.7rem; color: #555;
}

.indicator { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }