/* ============================================
   F1 STATISTICS TABLES - DARK PROFESSIONAL THEME
   Version: 1.4.0 - ISOLATION & VISIBILITY FIXED
   ============================================ */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Orbitron:wght@400;500;600;700;800;900&display=swap");

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --f1-red: #e10600;
    --f1-red-dark: #b30500;
    --f1-red-darker: #8b0000;
    --f1-bg-primary: #0f0f23;
    --f1-bg-secondary: #1a1a2e;
    --f1-bg-tertiary: #16213e;
    --f1-bg-card: #252542;
    --f1-text-primary: #ffffff;
    --f1-text-secondary: #e0e0e0;
    --f1-text-muted: #a0a0c0;
    --f1-text-dark: #888888;
    --f1-gold: #ffd700;
    --f1-silver: #c0c0c0;
    --f1-bronze: #cd7f32;
    --f1-blue: #00bfff;
    --f1-green: #2ed573;
    --f1-yellow: #ffc107;
    --f1-danger: #ff4757;
}

/* ============================================
   MAIN CONTAINER - ISOLATED
   ============================================ */
.f1-stats-table-container.f1-dark-theme {
    max-width: 1400px;
    margin: 30px auto;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%) !important;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: #e0e0e0 !important;
    position: relative;
    isolation: isolate;
}

/* Reset any inherited styles */
.f1-stats-table-container.f1-dark-theme * {
    box-sizing: border-box;
}

/* ============================================
   YEAR FILTER HEADER - PROTECTED
   ============================================ */
.f1-dark-theme .f1-year-filter-header {
    background: linear-gradient(135deg, #e10600 0%, #b30500 50%, #8b0000 100%) !important;
    color: #ffffff !important;
    padding: 20px 30px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: "Orbitron", "Inter", sans-serif !important;
}

.f1-dark-theme .filter-icon {
    font-size: 24px;
    color: #ffffff !important;
}

/* ============================================
   TABLE WRAPPER
   ============================================ */
.f1-dark-theme .f1-table-wrapper {
    overflow-x: auto;
    padding: 0;
    background: transparent !important;
}

.f1-dark-theme .f1-table-wrapper::-webkit-scrollbar {
    height: 10px;
}

.f1-dark-theme .f1-table-wrapper::-webkit-scrollbar-track {
    background: #1a1a2e !important;
}

.f1-dark-theme .f1-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e10600 0%, #8b0000 100%) !important;
    border-radius: 5px;
}

/* ============================================
   MAIN TABLE - STRONGLY TYPED
   ============================================ */
.f1-dark-theme .f1-stats-table {
    width: 100%;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 14px;
    table-layout: fixed;
    background: transparent !important;
}

/* ============================================
   TABLE HEADER - VISIBILITY PROTECTED
   ============================================ */
.f1-dark-theme .f1-stats-table thead {
    background: linear-gradient(180deg, #252542 0%, #1e1e38 100%) !important;
}

.f1-dark-theme .f1-stats-table thead th {
    padding: 18px 16px !important;
    text-align: left !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 11px !important;
    letter-spacing: 1.5px;
    color: #b0b0d0 !important;
    background: #252542 !important;
    border-bottom: 3px solid #e10600 !important;
    white-space: nowrap;
}

.f1-dark-theme .f1-stats-table thead th.stat-col {
    text-align: center !important;
}

.f1-dark-theme .f1-stats-table thead th.rank-col {
    text-align: center !important;
    width: 70px;
}

/* ============================================
   TABLE BODY - BASE STYLES WITH PROTECTION
   ============================================ */
.f1-dark-theme .f1-stats-table tbody tr {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    transition: background-color 0.2s ease;
}

.f1-dark-theme .f1-stats-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04) !important;
}

.f1-dark-theme .f1-stats-table tbody tr:hover {
    background: rgba(225, 6, 0, 0.15) !important;
}

/* ============================================
   TOP 3 ROWS - FIXED ALIGNMENT & VISIBILITY
   ============================================ */

/* Gold Row - 1st Place */
.f1-dark-theme .f1-stats-table tbody tr.gold-row {
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.20) 0%, 
        rgba(255, 215, 0, 0.10) 20%, 
        rgba(255, 215, 0, 0.05) 50%, 
        rgba(30, 30, 50, 0.9) 100%
    ) !important;
}

.f1-dark-theme .f1-stats-table tbody tr.gold-row td:first-child {
    border-left: 4px solid #ffd700 !important;
    box-shadow: inset 4px 0 8px rgba(255, 215, 0, 0.3) !important;
}

.f1-dark-theme .f1-stats-table tbody tr.gold-row:hover {
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.30) 0%, 
        rgba(255, 215, 0, 0.15) 20%, 
        rgba(225, 6, 0, 0.10) 100%
    ) !important;
}

/* Silver Row - 2nd Place */
.f1-dark-theme .f1-stats-table tbody tr.silver-row {
    background: linear-gradient(90deg, 
        rgba(192, 192, 192, 0.20) 0%, 
        rgba(192, 192, 192, 0.10) 20%, 
        rgba(192, 192, 192, 0.05) 50%, 
        rgba(30, 30, 50, 0.9) 100%
    ) !important;
}

.f1-dark-theme .f1-stats-table tbody tr.silver-row td:first-child {
    border-left: 4px solid #c0c0c0 !important;
    box-shadow: inset 4px 0 8px rgba(192, 192, 192, 0.3) !important;
}

.f1-dark-theme .f1-stats-table tbody tr.silver-row:hover {
    background: linear-gradient(90deg, 
        rgba(192, 192, 192, 0.30) 0%, 
        rgba(192, 192, 192, 0.15) 20%, 
        rgba(225, 6, 0, 0.10) 100%
    ) !important;
}

/* Bronze Row - 3rd Place */
.f1-dark-theme .f1-stats-table tbody tr.bronze-row {
    background: linear-gradient(90deg, 
        rgba(205, 127, 50, 0.20) 0%, 
        rgba(205, 127, 50, 0.10) 20%, 
        rgba(205, 127, 50, 0.05) 50%, 
        rgba(30, 30, 50, 0.9) 100%
    ) !important;
}

.f1-dark-theme .f1-stats-table tbody tr.bronze-row td:first-child {
    border-left: 4px solid #cd7f32 !important;
    box-shadow: inset 4px 0 8px rgba(205, 127, 50, 0.3) !important;
}

.f1-dark-theme .f1-stats-table tbody tr.bronze-row:hover {
    background: linear-gradient(90deg, 
        rgba(205, 127, 50, 0.30) 0%, 
        rgba(205, 127, 50, 0.15) 20%, 
        rgba(225, 6, 0, 0.10) 100%
    ) !important;
}

/* ============================================
   TABLE CELLS - VISIBILITY GUARANTEED
   ============================================ */
.f1-dark-theme .f1-stats-table tbody td {
    padding: 16px !important;
    color: #e0e0e0 !important;
    background: transparent !important;
    vertical-align: middle !important;
}

/* ============================================
   RANK COLUMN - FIXED VISIBILITY
   ============================================ */
.f1-dark-theme .rank-col {
    width: 70px;
    text-align: center !important;
}

.f1-dark-theme .rank-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700 !important;
    font-size: 14px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #cccccc !important;
}

/* Gold Rank Badge - PROTECTED */
.f1-dark-theme .rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 50%, #ffa500 100%) !important;
    color: #1a1a2e !important;
    font-size: 20px !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* Silver Rank Badge - PROTECTED */
.f1-dark-theme .rank-badge.rank-2 {
    background: linear-gradient(135deg, #f0f0f0 0%, #c0c0c0 50%, #a8a8a8 100%) !important;
    color: #1a1a2e !important;
    font-size: 20px !important;
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
}

/* Bronze Rank Badge - PROTECTED */
.f1-dark-theme .rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #b8860b 50%, #a0522d 100%) !important;
    color: #ffffff !important;
    font-size: 20px !important;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.5) !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
}

/* Default Rank Badge - FIXED VISIBILITY */
.f1-dark-theme .rank-badge.rank-default {
    background: linear-gradient(135deg, #3a3a5c 0%, #2a2a4c 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-weight: 600 !important;
}

/* ============================================
   DRIVER COLUMN - PROTECTED
   ============================================ */
.f1-dark-theme .driver-col {
    min-width: 200px;
}

.f1-dark-theme .driver-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f1-dark-theme .driver-name {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #ffffff !important;
    letter-spacing: 0.3px;
    background: transparent !important;
}

.f1-dark-theme tbody tr:hover .driver-name {
    color: #ff8080 !important;
}

/* ============================================
   TEAM COLUMN - PROTECTED
   ============================================ */
.f1-dark-theme .team-col {
    min-width: 160px;
}

.f1-dark-theme .team-badge {
    display: inline-block !important;
    background: linear-gradient(135deg, #2d2d5a 0%, #1e1e42 100%) !important;
    color: #c0c0e0 !important;
    padding: 7px 14px !important;
    border-radius: 20px;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.f1-dark-theme tbody tr:hover .team-badge {
    background: linear-gradient(135deg, #3d3d7a 0%, #2e2e62 100%) !important;
    border-color: rgba(225, 6, 0, 0.4) !important;
    color: #e0e0ff !important;
}

/* ============================================
   STAT COLUMN - VISIBILITY GUARANTEED
   ============================================ */
.f1-dark-theme .stat-col {
    text-align: center !important;
    min-width: 100px;
}

.f1-dark-theme .stat-value {
    font-weight: 500 !important;
    color: #e0e0e0 !important;
    background: transparent !important;
}

/* ============================================
   HIGHLIGHT STATS - FIXED VISIBILITY
   ============================================ */
.f1-dark-theme .highlight-stat {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: transparent !important;
    font-family: "Orbitron", "Inter", sans-serif !important;
}

.f1-dark-theme .highlight-stat.gold {
    color: #ffd700 !important;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5) !important;
}

.f1-dark-theme .highlight-stat.blue {
    color: #00bfff !important;
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.5) !important;
}

.f1-dark-theme .highlight-stat.red {
    color: #ff6b6b !important;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.5) !important;
}

.f1-dark-theme .highlight-stat.green {
    color: #2ed573 !important;
    text-shadow: 0 0 15px rgba(46, 213, 115, 0.5) !important;
}

.f1-dark-theme .trophy,
.f1-dark-theme .medal {
    font-size: 16px;
    margin-left: 4px;
    color: inherit !important;
}

/* ============================================
   RATE BADGES - PROTECTED
   ============================================ */
.f1-dark-theme .rate-badge {
    display: inline-block !important;
    padding: 5px 12px !important;
    border-radius: 12px;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.f1-dark-theme .rate-badge.high {
    background: rgba(46, 213, 115, 0.25) !important;
    color: #2ed573 !important;
    border: 1px solid rgba(46, 213, 115, 0.4) !important;
}

.f1-dark-theme .rate-badge.medium {
    background: rgba(255, 193, 7, 0.25) !important;
    color: #ffc107 !important;
    border: 1px solid rgba(255, 193, 7, 0.4) !important;
}

.f1-dark-theme .rate-badge.low {
    background: rgba(150, 150, 170, 0.25) !important;
    color: #c0c0d0 !important;
    border: 1px solid rgba(150, 150, 170, 0.4) !important;
}

/* ============================================
   POSITION BADGES - PROTECTED
   ============================================ */
.f1-dark-theme .position-badge {
    display: inline-block !important;
    padding: 8px 14px !important;
    border-radius: 8px;
    font-weight: 700 !important;
    font-size: 14px !important;
    font-family: "Orbitron", "Inter", sans-serif !important;
}

.f1-dark-theme .position-badge.excellent {
    background: rgba(46, 213, 115, 0.3) !important;
    color: #2ed573 !important;
    border: 1px solid rgba(46, 213, 115, 0.5) !important;
}

.f1-dark-theme .position-badge.good {
    background: rgba(0, 191, 255, 0.3) !important;
    color: #00bfff !important;
    border: 1px solid rgba(0, 191, 255, 0.5) !important;
}

.f1-dark-theme .position-badge.average {
    background: rgba(150, 150, 170, 0.3) !important;
    color: #c0c0d0 !important;
    border: 1px solid rgba(150, 150, 170, 0.5) !important;
}

/* ============================================
   CHAMPIONSHIP BADGE - PROTECTED
   ============================================ */
.f1-dark-theme .championship-badge {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #ffd700 !important;
    background: transparent !important;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "Orbitron", "Inter", sans-serif !important;
}

.f1-dark-theme .trophy-large {
    font-size: 28px;
    color: inherit !important;
}

/* ============================================
   DNF BADGES - PROTECTED
   ============================================ */
.f1-dark-theme .dnf-badge {
    display: inline-block !important;
    padding: 5px 12px !important;
    border-radius: 12px;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.f1-dark-theme .dnf-badge.high {
    background: rgba(255, 71, 87, 0.25) !important;
    color: #ff6b6b !important;
    border: 1px solid rgba(255, 71, 87, 0.4) !important;
}

.f1-dark-theme .dnf-badge.medium {
    background: rgba(255, 193, 7, 0.25) !important;
    color: #ffc107 !important;
    border: 1px solid rgba(255, 193, 7, 0.4) !important;
}

.f1-dark-theme .dnf-badge.low {
    background: rgba(46, 213, 115, 0.25) !important;
    color: #2ed573 !important;
    border: 1px solid rgba(46, 213, 115, 0.4) !important;
}

/* DNF Mini Badge */
.f1-dark-theme .dnf-mini {
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 10px;
    display: inline-block !important;
}

.f1-dark-theme .dnf-mini.high {
    color: #ff6b6b !important;
    background: rgba(255, 71, 87, 0.2) !important;
}

.f1-dark-theme .dnf-mini.medium {
    color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.2) !important;
}

.f1-dark-theme .dnf-mini.low {
    color: #2ed573 !important;
    background: rgba(46, 213, 115, 0.2) !important;
}

/* ============================================
   STREAK BADGES - PROTECTED
   ============================================ */
.f1-dark-theme .streak-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 18px !important;
    border-radius: 20px;
    font-size: 18px !important;
    font-weight: 700 !important;
    font-family: "Orbitron", "Inter", sans-serif !important;
}

.f1-dark-theme .streak-badge.gold {
    background: rgba(255, 215, 0, 0.25) !important;
    color: #ffd700 !important;
    border: 1px solid rgba(255, 215, 0, 0.5) !important;
}

.f1-dark-theme .streak-badge.blue {
    background: rgba(0, 191, 255, 0.25) !important;
    color: #00bfff !important;
    border: 1px solid rgba(0, 191, 255, 0.5) !important;
}

.f1-dark-theme .streak-badge.green {
    background: rgba(46, 213, 115, 0.25) !important;
    color: #2ed573 !important;
    border: 1px solid rgba(46, 213, 115, 0.5) !important;
}

.f1-dark-theme .streak-label {
    font-size: 10px !important;
    font-weight: 500 !important;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: "Inter", sans-serif !important;
    color: inherit !important;
}

.f1-dark-theme .year-tag {
    color: #a0a0c0 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    background: transparent !important;
}

/* ============================================
   POSITION RESULTS - PROTECTED
   ============================================ */
.f1-dark-theme .position-result {
    font-weight: 700 !important;
    font-size: 16px !important;
    font-family: "Orbitron", "Inter", sans-serif !important;
    background: transparent !important;
}

.f1-dark-theme .position-result.gold {
    color: #ffd700 !important;
}

.f1-dark-theme .position-result.silver {
    color: #e0e0e0 !important;
}

.f1-dark-theme .position-result.bronze {
    color: #cd7f32 !important;
}

/* ============================================
   CAREER SUMMARY STATS - FIXED VISIBILITY
   ============================================ */
.f1-dark-theme .stat-num {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #ffffff !important;
    background: transparent !important;
}

.f1-dark-theme .stat-num.gold {
    color: #ffd700 !important;
    font-weight: 700 !important;
}

.f1-dark-theme .stat-num.blue {
    color: #00bfff !important;
    font-weight: 700 !important;
}

.f1-dark-theme .stat-num.trophy {
    color: #ffd700 !important;
    font-weight: 700 !important;
}

.f1-dark-theme .title-count {
    color: #ffd700 !important;
    font-weight: 700 !important;
    background: transparent !important;
}

.f1-dark-theme .no-title {
    color: #666666 !important;
    font-weight: 400 !important;
    background: transparent !important;
}

.f1-dark-theme .sub-stat {
    color: #888888 !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    margin-left: 4px;
    background: transparent !important;
}

/* ============================================
   FOOTER - PROTECTED
   ============================================ */
.f1-dark-theme .f1-stats-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px !important;
    background: linear-gradient(180deg, #1a1a32 0%, #12121f 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #888888 !important;
    font-size: 13px !important;
}

.f1-dark-theme .footer-left,
.f1-dark-theme .footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.f1-dark-theme .driver-count {
    background: rgba(225, 6, 0, 0.25) !important;
    color: #ff8080 !important;
    padding: 8px 16px !important;
    border-radius: 20px;
    font-weight: 600 !important;
    border: 1px solid rgba(225, 6, 0, 0.4) !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.f1-dark-theme .filter-info {
    color: #a0a0c0 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-radius: 12px;
}

/* ============================================
   NO DATA STATE - PROTECTED
   ============================================ */
.f1-dark-theme .f1-no-data {
    text-align: center;
    padding: 100px 20px !important;
    color: #888888 !important;
    background: transparent !important;
}

.f1-dark-theme .f1-no-data .no-data-icon {
    font-size: 80px !important;
    display: block;
    margin-bottom: 24px;
    opacity: 0.5;
    color: #888888 !important;
}

.f1-dark-theme .f1-no-data p {
    font-size: 18px !important;
    margin: 0;
    color: #a0a0c0 !important;
    font-weight: 500 !important;
    background: transparent !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets */
@media (max-width: 1200px) {
    .f1-stats-table-container.f1-dark-theme {
        margin: 20px 15px;
        border-radius: 12px;
    }
    
    .f1-dark-theme .f1-stats-table thead th,
    .f1-dark-theme .f1-stats-table tbody td {
        padding: 14px 12px !important;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .f1-dark-theme .f1-stats-table {
        font-size: 13px;
    }
    
    .f1-dark-theme .f1-stats-table thead th,
    .f1-dark-theme .f1-stats-table tbody td {
        padding: 12px 10px !important;
    }
    
    .f1-dark-theme .driver-col {
        min-width: 160px;
    }
    
    .f1-dark-theme .driver-name {
        font-size: 14px !important;
    }
    
    .f1-dark-theme .highlight-stat {
        font-size: 15px !important;
    }
    
    .f1-dark-theme .championship-badge {
        font-size: 20px !important;
    }
    
    .f1-dark-theme .streak-badge {
        padding: 8px 14px !important;
        font-size: 15px !important;
    }
}

/* Small Tablets */
@media (max-width: 768px) {
    .f1-stats-table-container.f1-dark-theme {
        margin: 15px 10px;
        border-radius: 10px;
    }
    
    .f1-dark-theme .f1-year-filter-header {
        padding: 16px 20px;
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    
    .f1-dark-theme .filter-icon {
        font-size: 20px;
    }
    
    .f1-dark-theme .f1-stats-table {
        font-size: 12px;
    }
    
    .f1-dark-theme .f1-stats-table thead th {
        padding: 12px 8px !important;
        font-size: 10px !important;
        letter-spacing: 1px;
    }
    
    .f1-dark-theme .f1-stats-table tbody td {
        padding: 10px 8px !important;
    }
    
    /* Hide team column on mobile */
    .f1-dark-theme .team-col {
        display: none;
    }
    
    .f1-dark-theme .rank-col {
        width: 50px;
    }
    
    .f1-dark-theme .rank-badge {
        width: 34px;
        height: 34px;
        font-size: 12px !important;
    }
    
    .f1-dark-theme .rank-badge.rank-1,
    .f1-dark-theme .rank-badge.rank-2,
    .f1-dark-theme .rank-badge.rank-3 {
        font-size: 16px !important;
    }
    
    .f1-dark-theme .driver-name {
        font-size: 13px !important;
    }
    
    .f1-dark-theme .stat-col {
        min-width: 70px;
    }
    
    .f1-dark-theme .highlight-stat {
        font-size: 14px !important;
    }
    
    .f1-dark-theme .championship-badge {
        font-size: 18px !important;
        gap: 6px;
    }
    
    .f1-dark-theme .trophy-large {
        font-size: 22px;
    }
    
    .f1-dark-theme .streak-badge {
        padding: 6px 12px !important;
        font-size: 14px !important;
    }
    
    .f1-dark-theme .streak-label {
        display: none;
    }
    
    .f1-dark-theme .f1-stats-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 15px 20px !important;
    }
    
    .f1-dark-theme .f1-no-data {
        padding: 60px 20px !important;
    }
    
    .f1-dark-theme .f1-no-data .no-data-icon {
        font-size: 60px !important;
    }
    
    .f1-dark-theme .f1-no-data p {
        font-size: 16px !important;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .f1-stats-table-container.f1-dark-theme {
        margin: 10px 5px;
    }
    
    .f1-dark-theme .f1-year-filter-header {
        padding: 14px 15px;
        font-size: 12px;
        letter-spacing: 1px;
    }
    
    .f1-dark-theme .filter-icon {
        font-size: 18px;
    }
    
    .f1-dark-theme .f1-stats-table thead th {
        padding: 10px 6px !important;
        font-size: 9px !important;
        letter-spacing: 0.5px;
    }
    
    .f1-dark-theme .f1-stats-table tbody td {
        padding: 8px 6px !important;
    }
    
    .f1-dark-theme .driver-col {
        min-width: 110px;
    }
    
    .f1-dark-theme .driver-name {
        font-size: 12px !important;
    }
    
    .f1-dark-theme .rank-col {
        width: 40px;
    }
    
    .f1-dark-theme .rank-badge {
        width: 28px;
        height: 28px;
        font-size: 11px !important;
    }
    
    .f1-dark-theme .rank-badge.rank-1,
    .f1-dark-theme .rank-badge.rank-2,
    .f1-dark-theme .rank-badge.rank-3 {
        font-size: 14px !important;
    }
    
    .f1-dark-theme .stat-col {
        min-width: 55px;
    }
    
    .f1-dark-theme .highlight-stat {
        font-size: 13px !important;
    }
    
    .f1-dark-theme .trophy,
    .f1-dark-theme .medal {
        font-size: 12px;
    }
    
    .f1-dark-theme .rate-badge {
        padding: 3px 8px !important;
        font-size: 10px !important;
    }
    
    .f1-dark-theme .position-badge {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }
    
    .f1-dark-theme .championship-badge {
        font-size: 16px !important;
    }
    
    .f1-dark-theme .trophy-large {
        font-size: 18px;
    }
    
    .f1-dark-theme .streak-badge {
        padding: 5px 10px !important;
        font-size: 13px !important;
    }
    
    .f1-dark-theme .dnf-badge {
        padding: 3px 8px !important;
        font-size: 10px !important;
    }
    
    .f1-dark-theme .year-tag {
        font-size: 10px !important;
    }
    
    .f1-dark-theme .f1-stats-footer {
        padding: 12px 15px !important;
        font-size: 11px !important;
    }
    
    .f1-dark-theme .driver-count {
        padding: 6px 12px !important;
        font-size: 10px !important;
    }
    
    .f1-dark-theme .filter-info {
        padding: 5px 10px !important;
        font-size: 10px !important;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .f1-dark-theme .f1-year-filter-header {
        font-size: 11px;
        padding: 12px;
    }
    
    .f1-dark-theme .driver-col {
        min-width: 90px;
    }
    
    .f1-dark-theme .driver-name {
        font-size: 11px !important;
    }
    
    .f1-dark-theme .stat-col {
        min-width: 45px;
    }
    
    .f1-dark-theme .highlight-stat {
        font-size: 12px !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .f1-stats-table-container.f1-dark-theme {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        margin: 0;
        padding: 20px;
    }
    
    .f1-dark-theme .f1-year-filter-header {
        background: #e10600 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .f1-dark-theme .f1-stats-table thead th {
        background: #333 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .f1-dark-theme .f1-stats-table tbody td {
        color: #000 !important;
        border-bottom: 1px solid #ddd;
    }
    
    .f1-dark-theme .f1-stats-table tbody tr {
        background: #fff !important;
    }
    
    .f1-dark-theme .f1-stats-table tbody tr.gold-row {
        background: #fffacd !important;
    }
    
    .f1-dark-theme .f1-stats-table tbody tr.silver-row {
        background: #f0f0f0 !important;
    }
    
    .f1-dark-theme .f1-stats-table tbody tr.bronze-row {
        background: #faebd7 !important;
    }
    
    .f1-dark-theme .driver-name,
    .f1-dark-theme .highlight-stat,
    .f1-dark-theme .stat-num,
    .f1-dark-theme .stat-value {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .f1-dark-theme .team-badge {
        background: #eee !important;
        color: #333 !important;
        border: 1px solid #ccc !important;
    }
    
    .f1-dark-theme .rank-badge {
        color: #000 !important;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .f1-dark-theme * {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   ADDITIONAL ISOLATION LAYER
   ============================================ */

/* Force isolation from other plugins */
.f1-stats-table-container.f1-dark-theme,
.f1-stats-table-container.f1-dark-theme * {
    all: revert;
}

/* Then reapply our styles with higher specificity */
.f1-stats-table-container.f1-dark-theme {
    max-width: 1400px;
    margin: 30px auto;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%) !important;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
    font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: #e0e0e0 !important;
}

/* ============================================
   END OF STYLESHEET
   ============================================ */