.event-container {
    max-width: 1000px;
    margin: 0 auto;
}

.race-card {
    background: #151922;
    border-left: 4px solid #ff3b3b;
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.race-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2f3a;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.race-header h3 {
    color: #ff3b3b;
}

.race-header h3 span {
    color: #888;
    font-size: 0.9rem;
    font-weight: normal;
}

.race-meta {
    font-size: 0.85rem;
    color: #aaa;
    display: flex;
    gap: 15px;
}

.driver-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px; /* Erzeugt einen leichten Abstand zwischen den Zeilen */
}

.driver-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #ff3b3b; /* Passend zum Header-Border */
    padding: 10px;
    border-bottom: 1px solid #2a2f3a;
	text-align: left;
}

.driver-table td {
    padding: 15px 10px;
    background: #151922; /* Gleiches Blau wie im Header */
    vertical-align: middle;
}

/* Abgerundete Ecken für die Zeilen */
.driver-table tr td:first-child { border-radius: 4px 0 0 4px; }
.driver-table tr td:last-child { border-radius: 0 4px 4px 0; text-align: right; font-family: 'Courier New', monospace; }

.top-three:nth-child(1) td { color: #ffd700; font-size: 1.1rem; } /* Gold */
.top-three:nth-child(2) td { color: #c0c0c0; } /* Silber */
.top-three:nth-child(3) td { color: #cd7f32; } /* Bronze */

.race-card h2 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-form {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.filter-form select, .filter-form button {
    padding: 8px 15px;
    background: #151922;
    color: white;
    border: 1px solid #ff3b3b;
    border-radius: 4px;
    cursor: pointer;
}

.filter-form button:hover {
    background: #ff3b3b;
}

.powerup-container {
    display: inline-flex;
    gap: 4px;
    margin-left: 10px; /* Neben den Text schieben */
    vertical-align: middle;
}

.powerup-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* Bestehende Desktop-Styles behalten und um diese ergänzen/ersetzen */

.driver-table {
    width: 100%;
    border-collapse: collapse; /* Besser für Mobil-Layout */
    margin-top: 10px;
}

/* Verstecke die Tabellen-Header auf Mobilgeräten */
@media (max-width: 768px) {
    .driver-table thead {
        display: none;
    }

    .driver-table, .driver-table tbody, .driver-table tr, .driver-table td {
        display: block;
        width: 100%;
    }

    .driver-table tr {
        margin-bottom: 15px;
        border: 1px solid #2a2f3a;
        border-radius: 8px;
        padding: 10px;
        background: #1c212b;
        position: relative;
    }

    .driver-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 5px;
        border: none;
        background: transparent !important; /* Hintergrund von Desktop-Zellen aufheben */
        text-align: left !important;
    }

    /* Labels für die Daten hinzufügen */
    .driver-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #ff3b3b;
        text-transform: uppercase;
        font-size: 0.7rem;
    }

    .driver-table td:last-child {
        border-top: 1px solid #2a2f3a;
        margin-top: 5px;
        padding-top: 12px;
        justify-content: space-between;
    }
    
    .powerup-container {
        margin-left: 0;
        justify-content: flex-end;
    }
}

/* Desktop-Spezifische Korrekturen */
@media (min-width: 769px) {
    .driver-table td {
        padding: 15px 10px;
        background: #151922;
        vertical-align: middle;
    }
}

html {
    scroll-behavior: smooth;
}

.jump-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.jump-link:hover {
    color: #ff3b3b;
}

/* Verhindert, dass die Überschrift nach dem Sprung direkt am oberen Rand klebt */
#race-details {
    scroll-margin-top: 20px;
}

.filter-form input[type="date"] {
    padding: 7px 10px;
    background: #151922;
    color: white;
    border: 1px solid #ff3b3b;
    border-radius: 4px;
    font-family: inherit;
}

/* Verhindert, dass das Formular auf Mobilgeräten das Layout sprengt */
@media (max-width: 600px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
}