/* ===== RESULTS PAGE v2.0.0 ===== */
/* Reset & Basics handled by styles.css */

.results-main {
    padding: 40px 0;
    min-height: 80vh;
}

/* Container force block layout just to be safe */
.results-main .container {
    display: block;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Selector */
.selector-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.race-dropdown {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #fff;
    background: #1A1025;
    /* Dark purple bg */
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 12px;
    cursor: pointer;
    appearance: none;
    /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%238B5CF6%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 20px top 50%;
    background-size: 16px auto;
    transition: all 0.3s ease;
}

.race-dropdown:hover,
.race-dropdown:focus {
    border-color: var(--primary-magenta);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    outline: none;
}

/* Results Content Area */
.results-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Space between different tables (Race, Quali, Sprint) */
    animation: fadeIn 0.5s ease;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 40px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* Section Header (Race Info) */
.race-info-card {
    background: linear-gradient(145deg, rgba(26, 16, 37, 0.9), rgba(15, 10, 26, 0.95));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.race-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
}

.race-flag {
    font-size: 4rem;
    display: block;
    margin-bottom: 15px;
}

.race-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.sprint-tag {
    background: var(--gradient-primary);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-left: 10px;
}

.race-circuit {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.race-date {
    color: var(--primary-gold);
    font-weight: 600;
}

.fastest-lap-info {
    margin-top: 15px;
    background: rgba(139, 92, 246, 0.1);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    color: var(--text-primary);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.fastest-lap-info strong {
    color: #D946EF;
    /* Magenta */
}

/* Result Tables */
.result-block {
    background: rgba(15, 10, 26, 0.6);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.block-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
}

.custom-table th {
    text-align: left;
    color: var(--text-muted);
    font-family: var(--font-display);
    text-transform: uppercase;
    padding: 15px;
    font-size: 0.9rem;
}

.custom-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

.custom-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.pos-cell {
    font-weight: bold;
    font-family: var(--font-display);
    font-size: 1.1rem;
    width: 50px;
}

.driver-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-indicator {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background-color: #fff;
    /* Default */
}

.fastest-lap-icon {
    font-size: 1.2rem;
    margin-left: 8px;
    filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.8));
}

/* Podium Colors */
.custom-table tr:nth-child(1) .pos-cell {
    color: #FBBF24;
}

/* Gold */
.custom-table tr:nth-child(2) .pos-cell {
    color: #C0C0C0;
}

/* Silver */
.custom-table tr:nth-child(3) .pos-cell {
    color: #CD7F32;
}

/* Bronze */

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .race-title {
        font-size: 1.8rem;
    }

    .custom-table th,
    .custom-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}