/* Drivers Page Styles */

.drivers-header {
    margin-bottom: 50px;
    padding: 0 1rem;
}

.drivers-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.drivers-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #E10600 0%, #101010 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.drivers-info {
    color: #666;
    font-size: 1.1rem;
}

.group-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-selector label {
    font-weight: 600;
    color: #333;
}

.group-selector select {
    padding: 12px 20px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.3s ease;
}

.group-selector select:hover {
    border-color: #E10600;
}

.group-selector select:focus {
    outline: none;
    border-color: #E10600;
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.1);
}

.loading {
    text-align: center;
    padding: 80px 30px;
    font-size: 1.2rem;
    color: #666;
}

.error {
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.1) 0%, rgba(255, 69, 0, 0.1) 100%);
    color: #E10600;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
    font-weight: 500;
    border: 2px solid rgba(225, 6, 0, 0.3);
}

.drivers-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.drivers-table {
    width: 100%;
    border-collapse: collapse;
}

.drivers-table thead {
    background: linear-gradient(135deg, #E10600 0%, #101010 100%);
    color: white;
}

.drivers-table th {
    padding: 20px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drivers-table th:first-child {
    border-radius: 10px 0 0 0;
}

.drivers-table th:last-child {
    border-radius: 0 10px 0 0;
}

.drivers-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.drivers-table tbody tr:hover {
    background-color: #f8f9fa;
}

.drivers-table tbody tr.has-wins {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 215, 0, 0.02) 100%);
}

.drivers-table tbody tr.has-wins:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 215, 0, 0.04) 100%);
}

.drivers-table td {
    padding: 18px 20px;
    color: #333;
}

.drivers-table .car-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1E90FF;
}

.drivers-table .driver-name {
    font-weight: 600;
    font-size: 1rem;
}

.drivers-table .wins {
    font-weight: 700;
    color: #E10600;
    font-size: 1.1rem;
}

.drivers-table tbody tr.has-wins .wins {
    color: #FFD700;
}

.view-details-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #E10600 0%, #101010 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 6, 0, 0.4);
}

/* Driver Detail Panel */
.driver-detail-panel {
    display: none;
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.05) 0%, rgba(16, 16, 16, 0.02) 100%);
    border-left: 4px solid #E10600;
}

.driver-detail-panel.active {
    display: table-row;
}

.driver-detail-content {
    padding: 40px;
}

.driver-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E10600;
}

.driver-detail-header h3 {
    font-size: 2rem;
    color: #E10600;
    margin: 0;
}

.close-panel-btn {
    padding: 10px 20px;
    background: #101010;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s;
}

.close-panel-btn:hover {
    background: #E10600;
    transform: translateY(-2px);
}

.standings-section {
    margin-bottom: 40px;
}

.standings-section h4 {
    font-size: 1.5rem;
    color: #101010;
    margin-bottom: 20px;
    font-weight: 700;
}

.standings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.standings-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #E10600;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.standings-card.leader {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-left: 4px solid #FFD700;
}

.standings-position {
    font-size: 2rem;
    font-weight: 800;
    color: #E10600;
    min-width: 60px;
}

.standings-card.leader .standings-position {
    color: #FFD700;
}

.standings-details {
    flex: 1;
}

.standings-roster {
    font-size: 1.1rem;
    font-weight: 600;
    color: #101010;
    margin-bottom: 5px;
}

.standings-points {
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
}

.leader-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rosters-section {
    margin-bottom: 40px;
}

.rosters-section h4 {
    font-size: 1.5rem;
    color: #101010;
    margin-bottom: 20px;
    font-weight: 700;
}

.roster-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.roster-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #1E90FF;
}

.roster-card h5 {
    font-size: 1.2rem;
    color: #E10600;
    margin-bottom: 15px;
    font-weight: 700;
}

.roster-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roster-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.roster-info-item:last-child {
    border-bottom: none;
}

.roster-info-label {
    font-weight: 600;
    color: #666;
}

.roster-info-value {
    color: #333;
    font-weight: 500;
}

.race-results-section h4 {
    font-size: 1.5rem;
    color: #101010;
    margin-bottom: 20px;
    font-weight: 700;
}

.race-results-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.race-results-table table {
    width: 100%;
    border-collapse: collapse;
}

.race-results-table thead {
    background: linear-gradient(135deg, #E10600 0%, #101010 100%);
    color: white;
}

.race-results-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.race-results-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.race-results-table tbody tr:hover {
    background-color: #f8f9fa;
}

.race-results-table .position-cell {
    font-weight: 700;
    font-size: 1.1rem;
}

.race-results-table .position-1 {
    color: #FFD700;
}

.race-results-table .position-top5 {
    color: #E10600;
}

.race-results-table .position-top10 {
    color: #1E90FF;
}

.race-link {
    color: #1E90FF;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.race-link:hover {
    color: #E10600;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .drivers-header h2 {
        font-size: 2rem;
    }

    .drivers-table th,
    .drivers-table td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }

    .drivers-table .car-number,
    .drivers-table .wins {
        font-size: 1rem;
    }
}
