/* ====== GLOBAL ====== */
body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #1b1f24;
    color: #fff;
}

.race-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ====== HEADER ====== */
.race-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2f36;
    padding: 10px 15px;
    font-size: 14px;
}

.status-green {
    background: #1faa4b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: bold;
}

/* ====== ROW ====== */
.race-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 120px 120px 80px;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #2e333a;
    background: #22272e;
}

.race-row:nth-child(even) {
    background: #1f242b;
}

/* ====== POSITION ====== */
.position {
    font-size: 20px;
    font-weight: bold;
}

.position.p1 { color: gold; }
.position.p2 { color: #c0c0c0; }
.position.p3 { color: #cd7f32; }

/* ====== DRIVER ====== */
.driver {
    display: flex;
    flex-direction: column;
}

.driver-name {
    font-weight: 600;
}

.driver-car {
    font-size: 12px;
    color: #9aa4af;
}

/* ====== PROGRESS BAR ====== */
.progress {
    background: #111;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #3fb950;
}

.progress-bar.yellow { background: #d29922; }
.progress-bar.red { background: #f85149; }

/* ====== TIMES ====== */
.time {
    font-size: 14px;
    text-align: right;
}

.best-time {
    font-size: 12px;
    color: #9aa4af;
}

/* ====== GAP ====== */
.gap {
    text-align: right;
    font-size: 14px;
}

.gain { color: #3fb950; }
.loss { color: #f85149; }

/* ====== TYRE / STATUS ====== */
.status-box {
    text-align: center;
    font-size: 12px;
    padding: 4px;
    border-radius: 4px;
    background: #2a2f36;
}

/* ====== SPECIAL STATES ====== */
.row-highlight {
    background: #2e3a28; /* z.B. Leader */
}

.penalty {
    color: #f85149;
    font-size: 12px;
}

/* ====== WEATHER / INFO ====== */
.race-info {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 13px;
}

/* ===== TABLE BASE ===== */
.race-table {
    width: 100%;
    border-collapse: separate;   /* wichtig */
    border-spacing: 0 6px;       /* vertikaler Abstand zwischen Zeilen */
    font-size: 14px;
}

/* HEADER */
.race-table th {
    text-align: left;
    background: #2a2f36;
    padding: 10px;
    font-weight: 600;
}

/* ROW STYLE */
.race-table tbody tr {
    background: #22272e;
}

/* einzelne Zellen */
.race-table td {
    padding: 10px;
}

/* Rounded corners für „Karten-Look“ */
.race-table tbody tr td:first-child {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.race-table tbody tr td:last-child {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Alternierende Farbe */
.race-table tbody tr:nth-child(even) {
    background: #1f242b;
}

/* ===== NEW COLUMNS ===== */
.lap {
    text-align: center;
    font-weight: 600;
}

.lap-diff {
    text-align: center;
    font-size: 13px;
    color: #9aa4af;
}

/* bestehende Farben wiederverwenden */
.lap-diff.loss {
    color: #f85149;
}

.lap-diff.gain {
    color: #3fb950;
}
.time, .gap {
    text-align: right;
    font-family: "Consolas", monospace;
}