.driver-battles-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
.battles-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e74c3c;
}
.battles-header h2 {
    font-size: 32px;
    color: #333;
    margin: 0;
    font-weight: 700;
}
.drivers-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}
.driver-info {
    text-align: center;
}
.driver-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e74c3c;
    margin-bottom: 15px;
}
.driver-info h3 {
    font-size: 24px;
    margin: 10px 0 5px;
    color: #333;
    font-weight: 700;
}
.driver-info h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}
.driver-info h3 a:hover {
    color: #e74c3c;
}
.driver-team {
    color: #e74c3c;
    font-weight: 600;
    margin: 5px 0;
}
.driver-number {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    margin-top: 10px;
}
.vs-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(231,76,60,0.4);
}
.battles-table-wrapper {
    overflow-x: auto;
}
.battles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.battles-table thead {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}
.battles-table thead th {
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}
.battles-table thead th.stat-label {
    text-align: left;
}
.battles-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
    transition: background 0.2s;
}
.battles-table tbody tr:hover {
    background: #f8f9fa;
}
.battles-table tbody tr:nth-child(even) {
    background: #fafafa;
}
.battles-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}
.battles-table td {
    padding: 15px;
}
.stat-name {
    font-weight: 600;
    color: #555;
    text-align: left;
}
.stat-name a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}
.stat-name a:hover {
    color: #e74c3c;
}

/* FIXED: Explicit styling for ALL stat values */
.stat-value {
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    /* Losing driver stats: white background, black text */
    background: #ffffff !important;
    color: #333333 !important;
}

/* Winner stats: green background with white text */
.stat-value.better {
    background: linear-gradient(135deg, #27ae60, #229954) !important;
    color: #ffffff !important;
    font-weight: 800;
    position: relative;
    border: 2px solid #1e8449;
}
.stat-value.better::before {
    content: '👑';
    margin-right: 5px;
}

@media (max-width: 768px) {
    .driver-battles-container {
        padding: 20px;
    }
    .drivers-comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .vs-badge {
        width: 60px;
        height: 60px;
        font-size: 20px;
        margin: 0 auto;
    }
    .driver-avatar {
        width: 100px;
        height: 100px;
    }
    .battles-table {
        font-size: 13px;
    }
    .battles-table thead th, .battles-table td {
        padding: 10px 8px;
    }
    .stat-value {
        font-size: 15px;
    }
    .battles-header h2 {
        font-size: 24px;
    }
}
@media (max-width: 480px) {
    .battles-table {
        font-size: 11px;
    }
    .battles-table thead th, .battles-table td {
        padding: 8px 4px;
    }
    .stat-name {
        font-size: 11px;
    }
    .stat-value {
        font-size: 13px;
    }
}