@import url('https://fonts.googleapis.com/css2?family=Formula1+Display:wght@400;700;900&family=Titillium+Web:wght@400;600;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #15151e;
    min-height: 100vh;
    padding: 0;
    color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0;
    background: #15151e;
    overflow: hidden;
}

header {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 25px 40px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.1) 10px,
        rgba(0,0,0,0.1) 20px
    );
    pointer-events: none;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.f1-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.header-text {
    flex: 1;
}

header h1 {
    font-family: 'Formula1 Display', 'Titillium Web', sans-serif;
    font-size: 2.5em;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 0.95em;
    opacity: 0.95;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .f1-logo {
        height: 60px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: #1a1a24;
    border-bottom: 3px solid #e10600;
    padding: 0 40px;
    gap: 5px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 20px 30px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: #e10600;
    background: rgba(225, 6, 0, 0.15);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.main-content {
    padding: 40px;
}

#predictor-tab {
    display: block;
}

#predictor-tab.active {
    display: block;
}

#changelog-tab.active {
    display: block;
}

/* Two-column layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 30px;
}

.predictor-column {
    min-width: 0;
}

.race-results-column {
    position: sticky;
    top: 20px;
    height: calc(100vh - 180px);
    max-height: 900px;
}

@media (max-width: 1400px) {
    .content-wrapper {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .race-results-column {
        position: relative;
        top: 0;
    }
}

/* Input Section */
.input-section {
    background: #1a1a24;
    padding: 40px;
    border-radius: 0;
    border: none;
    grid-column: 1 / -1;
}

.race-setup-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #e10600;
}

.race-setup-header h2 {
    font-size: 2em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
}

.circuit-selector {
    margin-bottom: 40px;
}

.circuit-selector label {
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e10600;
    margin-bottom: 10px;
    display: block;
}

/* Grid Layout */
.grid-header {
    margin-bottom: 30px;
}

.grid-header h3 {
    font-size: 1.8em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #fff;
}

.grid-header .help-text {
    color: #888;
    font-size: 0.95em;
    font-weight: 600;
}

.grid-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    height: calc(100vh - 400px);
    min-height: 600px;
}

.driver-pool, .starting-grid {
    background: #252530;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #2a2a35;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.driver-pool h4, .starting-grid h4 {
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    color: #e10600;
    padding-bottom: 15px;
    border-bottom: 2px solid #e10600;
}

.pool-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
    align-content: start;
    padding-right: 10px;
}

/* Custom Scrollbar */
.pool-list::-webkit-scrollbar {
    width: 8px;
}

.pool-list::-webkit-scrollbar-track {
    background: #1a1a24;
    border-radius: 10px;
}

.pool-list::-webkit-scrollbar-thumb {
    background: #e10600;
    border-radius: 10px;
}

.pool-list::-webkit-scrollbar-thumb:hover {
    background: #ff1e00;
}

@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .driver-pool {
        max-height: 400px;
    }
    
    .pool-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        max-height: none;
    }
}

.grid-positions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    max-width: none;
    align-content: start;
    padding-right: 10px;
}

.grid-positions::-webkit-scrollbar {
    width: 8px;
}

.grid-positions::-webkit-scrollbar-track {
    background: #1a1a24;
    border-radius: 10px;
}

.grid-positions::-webkit-scrollbar-thumb {
    background: #e10600;
    border-radius: 10px;
}

.grid-positions::-webkit-scrollbar-thumb:hover {
    background: #ff1e00;
}

/* Grid Slots */
.grid-slot {
    background: linear-gradient(135deg, #2a2a35 0%, #1f1f28 100%);
    border-radius: 6px;
    padding: 8px;
    border: 2px solid #3a3a45;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    min-height: 90px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.grid-slot.empty {
    background: #1a1a24;
    border: 2px dashed #3a3a45;
    cursor: pointer;
    justify-content: center;
}

.grid-slot.empty:hover {
    border-color: #e10600;
    background: #252530;
}

.slot-number {
    font-size: 1.4em;
    font-weight: 900;
    color: rgba(255,255,255,0.15);
}

.slot-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Driver Cards */
.driver-card {
    background: linear-gradient(135deg, #2a2a35 0%, #1f1f28 100%);
    border-radius: 4px;
    padding: 10px 15px;
    border: none;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    height: 100%;
    min-height: 85px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.driver-card:hover {
    filter: brightness(1.1);
}

.grid-slot .driver-card {
    border-radius: 4px;
    margin: 0;
}

.driver-card:active {
    cursor: grabbing;
}

.driver-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.driver-card.drag-over {
    border-color: #e10600;
    background: linear-gradient(135deg, #3a2230 0%, #2a1a25 100%);
    transform: scale(1.02);
}

.driver-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--team-color, #e10600);
}

.driver-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    flex-shrink: 0;
}

.driver-number {
    font-size: 1.5em;
    font-weight: 900;
    color: rgba(255,255,255,0.2);
    line-height: 1;
}

.team-badge {
    font-size: 0.6em;
    padding: 2px 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.driver-name {
    font-size: 0.95em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    flex: 1;
    line-height: 1.2;
    display: flex;
    align-items: center;
    min-width: 0;
}

.driver-stats {
    display: none;
}

.stat {
    display: flex;
    flex-direction: column;
    font-size: 0.75em;
}

.stat-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 2px;
}

.stat-value {
    font-weight: 700;
    color: #fff;
    font-size: 0.85em;
}

.position-indicator {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    background: #e10600;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9em;
}

/* Team Colors */
.driver-card[data-team="Red Bull"] { --team-color: #0600ef; }
.driver-card[data-team="Ferrari"] { --team-color: #dc0000; }
.driver-card[data-team="Mercedes"] { --team-color: #00d2be; }
.driver-card[data-team="McLaren"] { --team-color: #ff8700; }
.driver-card[data-team="Aston Martin"] { --team-color: #006f62; }
.driver-card[data-team="Alpine"] { --team-color: #0090ff; }
.driver-card[data-team="Williams"] { --team-color: #005aff; }
.driver-card[data-team="RB"] { --team-color: #6692ff; }
.driver-card[data-team="Haas"] { --team-color: #ffffff; }
.driver-card[data-team="Sauber"] { --team-color: #00e701; }

.input-section h2 {
    color: #e52d27;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.input-section h3 {
    color: #e0e0e0;
    margin: 25px 0 15px 0;
    font-size: 1.3em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #b0b0b0;
}

.input-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
    background: #2a2a2a;
    color: #e0e0e0;
}

.input-field:focus {
    outline: none;
    border-color: #e52d27;
}

.help-text {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Driver Cards */
.drivers-list {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.drivers-list::-webkit-scrollbar {
    width: 8px;
}

.drivers-list::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 4px;
}

.drivers-list::-webkit-scrollbar-thumb {
    background: #e52d27;
    border-radius: 4px;
}

.driver-card {
    background: #2a2a2a;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    border-left: 4px solid #e52d27;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.position-number {
    background: #e52d27;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.remove-driver {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.remove-driver:hover {
    background: #c82333;
}

.driver-inputs {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 10px;
}

.driver-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.driver-input-wrapper input {
    flex: 1;
    padding-right: 35px; /* Make room for status indicator */
}

.driver-status {
    position: absolute;
    right: 10px;
    font-size: 1.2em;
    pointer-events: none;
    font-weight: bold;
}

.driver-status.valid {
    color: #28a745;
}

.driver-status.warning {
    color: #ffc107;
    font-size: 0.85em;
}

.driver-inputs input,
.driver-inputs select {
    padding: 10px;
    border: 1px solid #3a3a3a;
    border-radius: 5px;
    font-size: 0.95em;
    background: #1e1e1e;
    color: #e0e0e0;
}

.driver-inputs input:focus,
.driver-inputs select:focus {
    outline: none;
    border-color: #e52d27;
}

/* Buttons */
.btn {
    padding: 18px 40px;
    border: none;
    border-radius: 0;
    font-size: 1.05em;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: #e10600;
    color: #fff;
    border: 2px solid #e10600;
}

.btn-primary:hover {
    background: #ff1e00;
    border-color: #ff1e00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(225, 6, 0, 0.4);
}

.btn-primary:disabled {
    background: #666;
    border-color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #666;
    width: 100%;
}

.btn-secondary:hover {
    background: #2a2a35;
    border-color: #888;
}

.btn-danger {
    background: transparent;
    color: #fff;
    border: 2px solid #666;
}

.btn-danger:hover {
    background: #e10600;
    border-color: #e10600;
}

.action-buttons {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Results Section */
.results-section {
    background: #252525;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #333;
}

.results-section h2 {
    color: #e52d27;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.winner-card {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.winner-icon {
    font-size: 4em;
}

.winner-label {
    font-size: 1em;
    color: #1a1a1a;
    font-weight: 600;
}

.winner-name {
    font-size: 2.5em;
    font-weight: bold;
    color: #b31217;
    margin: 5px 0;
}

.winner-stats {
    font-size: 1.1em;
    color: #333;
}

/* Podium */
.podium-section h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.podium-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    align-items: flex-end;
}

.podium-card {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
    border: 1px solid #3a3a3a;
}

.podium-card:hover {
    transform: translateY(-5px);
}

.podium-card.first {
    padding: 30px 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.podium-card.second {
    padding: 25px 20px;
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
}

.podium-card.third {
    padding: 20px;
    background: linear-gradient(135deg, #cd7f32 0%, #daa06d 100%);
}

.position-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
}

.position-badge.gold {
    background: #b8860b;
}

.position-badge.silver {
    background: #708090;
}

.position-badge.bronze {
    background: #8b4513;
}

.podium-card .driver-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #e0e0e0;
    margin: 10px 0;
}

.podium-icon {
    font-size: 2.5em;
    margin-top: 10px;
}

/* Results Table */
.full-results {
    margin-top: 30px;
}

.full-results h3 {
    color: #e0e0e0;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid #3a3a3a;
}

.results-table th {
    background: #e52d27;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.results-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #3a3a3a;
    color: #e0e0e0;
}

.results-table tr:hover {
    background: #333;
}

.position-cell {
    font-weight: bold;
    color: #e52d27;
}

.gain-positive {
    color: #28a745;
    font-weight: bold;
}

.gain-negative {
    color: #dc3545;
    font-weight: bold;
}

.gain-neutral {
    color: #6c757d;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
}

.disclaimer {
    opacity: 0.7;
    font-size: 0.85em !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #e52d27;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.5em;
    margin-top: 20px;
}

/* Changelog Styles */
.changelog-section {
    max-width: 1200px;
    margin: 0 auto;
}

.changelog-section h2 {
    color: #e52d27;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.changelog-intro {
    color: #999;
    font-size: 1.1em;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #2a2a2a;
}

/* Validation Button */
.validation-btn {
    background: linear-gradient(135deg, #e52d27 0%, #c72522 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 45, 39, 0.3);
}

.validation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(229, 45, 39, 0.5);
    background: linear-gradient(135deg, #ff3d36 0%, #e52d27 100%);
}

.validation-btn:active {
    transform: translateY(0);
}

/* Modal Styles */
.modal {
    display: none !important;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
}

.modal.show {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #1a1a1a;
    margin: 2% auto;
    padding: 0;
    border: 2px solid #e52d27;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(229, 45, 39, 0.4);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: #999;
    float: right;
    font-size: 35px;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus {
    color: #e52d27;
}

/* Validation Stats */
.validation-stats-container {
    background: linear-gradient(135deg, #252525 0%, #2a2a2a 100%);
    border-radius: 16px;
    padding: 40px;
    margin: 20px;
}

.modal-content .validation-stats-container {
    border: none;
    box-shadow: none;
}

.stats-title {
    color: #e52d27;
    font-size: 2em;
    margin-bottom: 5px;
    text-align: center;
}

.stats-subtitle {
    color: #999;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    border: 2px solid #3a3a3a;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #e52d27;
    box-shadow: 0 8px 20px rgba(229, 45, 39, 0.3);
}

.stat-card.highlight {
    border-color: #e52d27;
    background: linear-gradient(135deg, #2a2020 0%, #1e1e1e 100%);
}

.stat-value {
    font-size: 2.8em;
    font-weight: bold;
    color: #e52d27;
    margin-bottom: 5px;
}

.stat-label {
    color: #e0e0e0;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-detail {
    color: #999;
    font-size: 0.9em;
}

.race-breakdown {
    margin-bottom: 30px;
}

.race-breakdown h4 {
    color: #e52d27;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.validation-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
}

.validation-table thead {
    background: #2a2a2a;
}

.validation-table th {
    padding: 15px;
    text-align: left;
    color: #e52d27;
    font-weight: 600;
    border-bottom: 2px solid #3a3a3a;
}

.validation-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #2a2a2a;
    color: #e0e0e0;
}

.validation-table tr:hover {
    background: #252525;
}

.validation-table .highlight-row {
    background: rgba(229, 45, 39, 0.1);
}

.status-success {
    color: #28a745;
    font-size: 1.2em;
}

.status-fail {
    color: #dc3545;
    font-size: 1.2em;
}

.insights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.insight-card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #3a3a3a;
}

.insight-card h4 {
    color: #e52d27;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.insight-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-card li {
    padding: 8px 0;
    color: #b0b0b0;
    line-height: 1.5;
    position: relative;
    padding-left: 20px;
}

.insight-card li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #e52d27;
    font-size: 0.7em;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .validation-stats-container {
        padding: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

.changelog-entries {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.changelog-entry {
    background: #252525;
    border-radius: 12px;
    padding: 30px;
    border-left: 4px solid #e52d27;
    transition: all 0.3s ease;
}

.changelog-entry:hover {
    background: #2a2a2a;
    transform: translateX(5px);
}

.changelog-entry.future {
    border-left-color: #ffa500;
    background: linear-gradient(135deg, #252525 0%, #2a2520 100%);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #3a3a3a;
}

.version-header h3 {
    color: #e0e0e0;
    font-size: 1.8em;
    margin: 0;
}

.version-date {
    background: #e52d27;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.changelog-entry.future .version-date {
    background: #ffa500;
}

.changelog-content h4 {
    color: #e52d27;
    font-size: 1.3em;
    margin: 20px 0 12px 0;
}

.changelog-content ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.changelog-content li {
    padding: 10px 0 10px 30px;
    position: relative;
    color: #b0b0b0;
    line-height: 1.6;
}

.changelog-content li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #e52d27;
    font-size: 0.8em;
}

.changelog-content li strong {
    color: #e0e0e0;
    font-weight: 600;
}

.changelog-content p {
    color: #999;
    line-height: 1.7;
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 3px solid #e52d27;
}

/* Result Cards */
.result-card {
    background: linear-gradient(135deg, #2a2a35 0%, #1f1f28 100%);
    border-radius: 4px;
    padding: 10px 15px;
    border: 2px solid #3a3a45;
    height: 100%;
    min-height: 85px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--team-color, #e10600);
}

.result-card.podium {
    border-color: #ffd700;
    background: linear-gradient(135deg, #3a3020 0%, #2a2518 100%);
}

.result-position {
    font-size: 1.4em;
    font-weight: 900;
    color: #e10600;
    min-width: 40px;
    text-align: center;
}

.result-card.podium .result-position {
    color: #ffd700;
}

.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.result-driver {
    font-size: 0.8em;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-team {
    font-size: 0.65em;
    color: #999;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-stats {
    display: flex;
    gap: 6px;
    font-size: 0.6em;
    margin-top: 0;
    flex-wrap: nowrap;
}

.result-change {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
}

.result-change.positive {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

.result-change.negative {
    color: #f44336;
    background: rgba(244, 67, 54, 0.2);
}

.result-change.neutral {
    color: #999;
}

.result-prob {
    color: #e10600;
    font-weight: 700;
}

.result-points {
    color: #4caf50;
    font-weight: 700;
}

/* Responsive Changelog */
@media (max-width: 768px) {
    .version-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .version-header h3 {
        font-size: 1.5em;
    }

    .changelog-entry {
        padding: 20px;
    }
}

/* SEO Footer Content */
.seo-content {
    background: linear-gradient(135deg, #1a1a24 0%, #15151e 100%);
    padding: 40px;
    margin-top: 40px;
    border-top: 3px solid #e10600;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.seo-content h2 {
    color: #e10600;
    font-size: 2em;
    margin-bottom: 20px;
    font-weight: 700;
}

.seo-content h3 {
    color: #ff1e00;
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.seo-content p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.seo-content strong {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .seo-content {
        padding: 30px 20px;
    }

    .seo-content h2 {
        font-size: 1.5em;
    }

    .seo-content h3 {
        font-size: 1.2em;
    }

    .seo-content p {
        font-size: 1em;
    }
}

/* Race Results Column */
.race-results-card {
    background: #1a1a24;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #2a2a3e;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.results-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 20px;
    margin: 0;
    font-size: 1.3em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 3px solid #e10600;
}

.race-info-banner {
    background: #252535;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a3e;
}

.race-name {
    color: #e10600;
    font-weight: 700;
    font-size: 1.1em;
}

.race-date {
    color: #999;
    font-size: 0.9em;
}

.load-quali-btn {
    background: linear-gradient(135deg, #e10600, #ff1e00);
    color: #fff;
    border: none;
    padding: 12px 20px;
    margin: 10px 15px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.load-quali-btn:hover {
    background: linear-gradient(135deg, #ff1e00, #e10600);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.4);
}

.load-quali-btn:active {
    transform: translateY(0);
}

.race-results-list {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
}

.result-item {
    background: #252535;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.result-item:hover {
    background: #2a2a40;
    transform: translateX(3px);
}

.result-position-badge {
    background: #e10600;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.8em;
}

.result-position-badge.p1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.result-position-badge.p2 {
    background: linear-gradient(135deg, #C0C0C0, #808080);
    color: #000;
}

.result-position-badge.p3 {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: #fff;
}

.result-driver-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.result-driver-name {
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-driver-team {
    color: #999;
    font-size: 0.7em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-points {
    color: #4caf50;
    font-weight: 700;
    font-size: 0.85em;
    white-space: nowrap;
}

.loading-text {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.no-results {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Scrollbar styling for results */
.race-results-list::-webkit-scrollbar {
    width: 8px;
}

.race-results-list::-webkit-scrollbar-track {
    background: #1a1a24;
}

.race-results-list::-webkit-scrollbar-thumb {
    background: #e10600;
    border-radius: 4px;
}

.race-results-list::-webkit-scrollbar-thumb:hover {
    background: #ff1e00;
}
