/* NUCLEAR RESET - NO MARGINS ANYWHERE */
* {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0a0a0a;
    color: white;
    height: 100vh;
    position: relative;
}

/* DRIVERS SECTION - NO PADDING */
#drivers {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.section-title {
    text-align: center;
    padding: 40px 0 20px;
    font-size: 3rem;
    background: linear-gradient(90deg, #e10600, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 900;
    flex-shrink: 0;
}

/* DRIVERS CONTAINER - FULL WIDTH */
.drivers-container {
    width: 100%;
    height: calc(100vh - 140px);
    overflow-x: auto;
    overflow-y: hidden;
    background: #0a0a0a;
    position: relative;
    display: flex;
    align-items: flex-end;
    margin: 0;
    padding: 0;
}

/* Hide scrollbar but keep functionality */
.drivers-container::-webkit-scrollbar {
    display: none;
}

.drivers-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* DRIVERS WRAPPER - TIGHT LAYOUT */
.drivers-wrapper {
    display: flex;
    height: 100%;
    align-items: flex-end;
    padding-left: 50px;
    padding-right: 50px;
    gap: 0;
    width: max-content;
    margin: 0;
}

/* ===== DRIVER CARD ANIMATION - HIP LEVEL DEFAULT, SLIGHT ZOOM ON HOVER ===== */
.driver-card {
    position: relative;
    height: 85vh;
    width: 280px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    flex-shrink: 0;
    background: transparent;
    transform: scale(0.9);
    filter: grayscale(40%) brightness(0.5);
    transform-origin: center bottom;
    cursor: pointer;
    margin: 0;
    padding: 0;
    border: none;
}

.driver-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.driver-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    max-height: 85%;
    object-fit: contain;
    object-position: center bottom;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: grayscale(30%) brightness(0.6);
    z-index: 2;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* HOVER - SLIGHT ZOOM */
.driver-card:hover {
    transform: scale(0.95);
    filter: grayscale(0%) brightness(1);
    width: 300px;
    z-index: 100;
}

.driver-card:hover .driver-image {
    transform: translateX(-50%) scale(1.08) !important;
    filter: grayscale(0%) brightness(1.1) !important;
    max-height: 90% !important;
    object-position: center bottom !important;
}

.driver-card:hover .team-logo {
    opacity: 1;
    transform: translateX(-50%) scale(1.15);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.driver-card:hover::before {
    opacity: 0.8;
}

.driver-card:hover .driver-info {
    transform: translateY(0);
}

/* SELECTED STATE - SAME AS HOVER */
.driver-card.selected {
    transform: scale(0.95) !important;
    filter: grayscale(0%) brightness(1) !important;
    width: 300px !important;
    z-index: 100 !important;
}

.driver-card.selected .driver-image {
    transform: translateX(-50%) scale(1.08) !important;
    filter: grayscale(0%) brightness(1.1) !important;
    max-height: 90% !important;
    object-position: center bottom !important;
}

.driver-card.selected .team-logo {
    opacity: 1 !important;
    transform: translateX(-50%) scale(1.15) !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7) !important;
}

.driver-card.selected::before {
    opacity: 0.8 !important;
}

.driver-card.selected .driver-info {
    transform: translateY(0) !important;
}

.driver-card.selected::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(225, 6, 0, 0.6);
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
    animation: selectedBorderGlow 2s infinite alternate;
}

@keyframes selectedBorderGlow {
    0% {
        border-color: rgba(225, 6, 0, 0.4);
        box-shadow: 0 0 10px rgba(225, 6, 0, 0.2);
    }
    100% {
        border-color: rgba(225, 6, 0, 0.8);
        box-shadow: 0 0 20px rgba(225, 6, 0, 0.4);
    }
}
/* ===== END OF DRIVER CARD ANIMATION ===== */

/* TEAM LOGO */
.team-logo {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* TEAM COLOR GRADIENTS - ALL TEAMS */
.driver-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

/* Red Bull gradient */
.driver-card[data-team="redbull"]::before {
    background: linear-gradient(to top, 
        rgba(30, 65, 255, 0.8) 0%,
        rgba(30, 65, 255, 0.6) 30%,
        rgba(30, 65, 255, 0.3) 60%,
        rgba(30, 65, 255, 0.1) 85%,
        transparent 100%);
}

/* Ferrari gradient */
.driver-card[data-team="ferrari"]::before {
    background: linear-gradient(to top, 
        rgba(255, 0, 0, 0.8) 0%,
        rgba(255, 0, 0, 0.6) 30%,
        rgba(255, 0, 0, 0.3) 60%,
        rgba(255, 0, 0, 0.1) 85%,
        transparent 100%);
}

/* Mercedes gradient */
.driver-card[data-team="mercedes"]::before {
    background: linear-gradient(to top, 
        rgba(0, 210, 190, 0.8) 0%,
        rgba(0, 210, 190, 0.6) 30%,
        rgba(0, 210, 190, 0.3) 60%,
        rgba(0, 210, 190, 0.1) 85%,
        transparent 100%);
}

/* Racing Bulls gradient */
.driver-card[data-team="racingbulls"]::before {
    background: linear-gradient(to top, 
        rgba(78, 121, 147, 0.8) 0%,
        rgba(78, 121, 147, 0.6) 30%,
        rgba(78, 121, 147, 0.3) 60%,
        rgba(78, 121, 147, 0.1) 85%,
        transparent 100%);
}

/* McLaren gradient */
.driver-card[data-team="mclaren"]::before {
    background: linear-gradient(to top, 
        rgba(255, 135, 0, 0.8) 0%,
        rgba(255, 135, 0, 0.6) 30%,
        rgba(255, 135, 0, 0.3) 60%,
        rgba(255, 135, 0, 0.1) 85%,
        transparent 100%);
}

/* Haas gradient */
.driver-card[data-team="haas"]::before {
    background: linear-gradient(to top, 
        rgba(182, 186, 189, 0.8) 0%,
        rgba(182, 186, 189, 0.6) 30%,
        rgba(182, 186, 189, 0.3) 60%,
        rgba(182, 186, 189, 0.1) 85%,
        transparent 100%);
}

/* Cadillac gradient */
.driver-card[data-team="cadillac"]::before {
    background: linear-gradient(to top, 
        rgba(70, 29, 124, 0.8) 0%,
        rgba(70, 29, 124, 0.6) 30%,
        rgba(70, 29, 124, 0.3) 60%,
        rgba(70, 29, 124, 0.1) 85%,
        transparent 100%);
}

/* Williams gradient */
.driver-card[data-team="williams"]::before {
    background: linear-gradient(to top, 
        rgba(0, 90, 255, 0.8) 0%,
        rgba(0, 90, 255, 0.6) 30%,
        rgba(0, 90, 255, 0.3) 60%,
        rgba(0, 90, 255, 0.1) 85%,
        transparent 100%);
}

/* Audi gradient */
.driver-card[data-team="audi"]::before {
    background: linear-gradient(to top, 
        rgba(255, 60, 0, 0.8) 0%,
        rgba(255, 60, 0, 0.6) 30%,
        rgba(255, 60, 0, 0.3) 60%,
        rgba(255, 60, 0, 0.1) 85%,
        transparent 100%);
}

/* Aston Martin gradient */
.driver-card[data-team="astonmartin"]::before {
    background: linear-gradient(to top, 
        rgba(0, 111, 98, 0.8) 0%,
        rgba(0, 111, 98, 0.6) 30%,
        rgba(0, 111, 98, 0.3) 60%,
        rgba(0, 111, 98, 0.1) 85%,
        transparent 100%);
}

/* Alpine gradient */
.driver-card[data-team="alpine"]::before {
    background: linear-gradient(to top, 
        rgba(0, 144, 210, 0.8) 0%,
        rgba(0, 144, 210, 0.6) 30%,
        rgba(0, 144, 210, 0.3) 60%,
        rgba(0, 144, 210, 0.1) 85%,
        transparent 100%);
}

/* DRIVER INFO - PERFECT FIT */
.driver-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin: 0;
    padding: 0;
    border: none;
}

.nametag {
    background: #000000;
    color: white;
    width: 100%;
    margin: 0;
    padding: 20px 15px;
    border: none;
    display: block;
    position: relative;
    left: 0;
    box-sizing: border-box;
    min-width: 100%;
    max-width: 100%;
}

.driver-name {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.driver-team {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.driver-nationality {
    font-size: 0.9rem;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.flag {
    font-size: 1.2rem;
}

/* F1 SCROLL BUTTONS */
.scroll-button {
    position: fixed;
    top: calc(50% + 40px);
    transform: translateY(-50%);
    width: 60px;
    height: 100px;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
    border: 2px solid #e10600;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.scroll-button.left {
    left: 0;
    border-left: none;
    border-radius: 0 30px 30px 0;
    box-shadow: 5px 0 25px rgba(225, 6, 0, 0.3);
    padding-left: 5px;
}

.scroll-button.right {
    right: 0;
    border-right: none;
    border-radius: 30px 0 0 30px;
    box-shadow: -5px 0 25px rgba(225, 6, 0, 0.3);
    padding-right: 5px;
}

.scroll-button:hover {
    background: rgba(20, 20, 20, 0.95);
    width: 65px;
    border-color: #ff1a00;
    box-shadow: 0 0 35px rgba(225, 6, 0, 0.5);
}

.scroll-button:active {
    transform: translateY(-50%) scale(0.98);
}

.scroll-button::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border-top: 3px solid white;
    border-right: 3px solid white;
    transition: all 0.2s ease;
}

.scroll-button.left::before {
    transform: rotate(-135deg);
}

.scroll-button.right::before {
    transform: rotate(45deg);
}

.scroll-button:hover::before {
    border-color: #ffffff;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

.scroll-button::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, 
                transparent 30%,
                rgba(225, 6, 0, 0.1) 50%,
                transparent 70%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.scroll-button:hover::after {
    opacity: 0.5;
}

.scroll-button .accent-line {
    position: absolute;
    background: #e10600;
    transition: all 0.3s;
}

.scroll-button.left .accent-line {
    right: 0;
    top: 25%;
    bottom: 25%;
    width: 2px;
    border-radius: 2px 0 0 2px;
}

.scroll-button.right .accent-line {
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 2px;
    border-radius: 0 2px 2px 0;
}

.scroll-button:hover .accent-line {
    background: #ff1a00;
    box-shadow: 0 0 8px #ff1a00;
}

@keyframes borderPulse {
    0%, 100% { border-color: #e10600; }
    50% { border-color: #ff3333; }
}

.scroll-button {
    animation: borderPulse 4s infinite;
}

.scroll-button:hover {
    animation: borderPulse 2s infinite;
}

/* STATISTICS PANEL */
.statistics-panel {
    position: fixed;
    top: 80px;
    right: -500px;
    width: 480px;
    height: calc(100vh - 80px);
    background: linear-gradient(180deg, 
                rgba(10, 10, 10, 0.98) 0%, 
                rgba(5, 5, 5, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-left: 3px solid #e10600;
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow-y: hidden;
    overflow-x: hidden;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8),
                -5px 0 30px rgba(225, 6, 0, 0.3);
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.statistics-panel.active {
    right: 0;
}

/* When panel is active, compress the drivers container */
.drivers-container.panel-active {
    width: calc(100% - 480px) !important;
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Keep the scroll button visible and properly positioned */
.scroll-button.right.panel-active {
    right: 480px !important;
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Make sure unselected drivers are still visible but clickable */
.drivers-wrapper.panel-active .driver-card:not(.selected) {
    transform: scale(0.85) !important;
    filter: grayscale(60%) brightness(0.4) !important;
    opacity: 0.7;
    pointer-events: auto !important;
}

/* When panel is active, make ALL drivers still clickable */
.drivers-container.panel-active .driver-card {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Add a slight transition for the info reveal when hovering over non-selected drivers */
.drivers-wrapper.panel-active .driver-card:not(.selected):hover .driver-info {
    transform: translateY(0) !important;
}

/* Close button */
.close-panel {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #e10600;
    color: white;
    border: none;
    border-radius: 50% !important;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.8);
}

.close-panel:hover {
    background: #ff1a00;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 26, 0, 1);
}

/* Statistics Header */
.statistics-header {
    padding: 25px 25px 15px;
    background: linear-gradient(180deg, 
                rgba(20, 20, 20, 0.95) 0%, 
                rgba(15, 15, 15, 0.9) 100%);
    border-bottom: 1px solid rgba(225, 6, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    flex-shrink: 0;
    min-height: 120px;
}

.stats-image-container {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.glow-effect {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: radial-gradient(circle at center, 
                rgba(225, 6, 0, 0.4) 0%, 
                transparent 70%);
    z-index: 0;
    filter: blur(10px);
    animation: imageGlow 4s infinite alternate;
}

@keyframes imageGlow {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.stats-driver-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(225, 6, 0, 0.6));
    position: relative;
    z-index: 1;
}

/* Driver info */
.stats-driver-info {
    flex: 1;
    min-width: 0;
}

.stats-driver-info h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 4px;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 2px 10px rgba(225, 6, 0, 0.3);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-driver-info p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 6px;
    color: #e10600;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stats-driver-nationality {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    opacity: 0.7;
    color: #ccc;
}

.stats-driver-nationality span:first-child {
    font-size: 1.1rem;
}

/* Stats Toggle */
.stats-toggle {
    display: flex;
    padding: 12px 25px;
    background: rgba(15, 15, 15, 0.9);
    border-bottom: 1px solid rgba(225, 6, 0, 0.2);
    gap: 8px;
    flex-shrink: 0;
}

.toggle-btn {
    flex: 1;
    padding: 10px 12px;
    background: rgba(25, 25, 25, 0.9);
    color: #888;
    border: 1px solid rgba(225, 6, 0, 0.3);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #e10600 0%, #ff1a00 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.7),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toggle-btn:hover:not(.active) {
    background: rgba(225, 6, 0, 0.15);
    color: white;
    border-color: rgba(225, 6, 0, 0.5);
}

.toggle-btn .toggle-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.2), 
                transparent);
    transition: left 0.5s ease;
}

.toggle-btn:hover .toggle-glow {
    left: 100%;
}

.toggle-text {
    position: relative;
    z-index: 2;
}

/* Statistics Content */
.statistics-content {
    padding: 20px 25px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.stat-item {
    background: linear-gradient(145deg, 
                rgba(20, 20, 20, 0.9) 0%, 
                rgba(25, 25, 25, 0.9) 100%);
    padding: 18px 12px;
    border: 1px solid rgba(225, 6, 0, 0.2);
    border-radius: 6px !important;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    min-height: 100px;
}

.stat-item:hover {
    background: linear-gradient(145deg, 
                rgba(30, 30, 30, 0.95) 0%, 
                rgba(35, 35, 35, 0.95) 100%);
    transform: translateY(-3px);
    border-color: #ff1a00;
    box-shadow: 0 6px 20px rgba(225, 6, 0, 0.3),
                0 0 15px rgba(225, 6, 0, 0.2);
}

.stat-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
                transparent 20%, 
                rgba(225, 6, 0, 0.1) 50%, 
                transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.stat-item:hover .stat-glow {
    opacity: 1;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    font-weight: 600;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.stat-item:hover .stat-value {
    color: #fff;
    text-shadow: 0 0 8px rgba(225, 6, 0, 0.6),
                 0 0 15px rgba(225, 6, 0, 0.3);
}

@keyframes panelGlow {
    0%, 100% {
        border-left-color: #e10600;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8),
                    -5px 0 30px rgba(225, 6, 0, 0.3);
    }
    50% {
        border-left-color: #ff1a00;
        box-shadow: -10px 0 60px rgba(0, 0, 0, 0.9),
                    -5px 0 40px rgba(225, 6, 0, 0.5);
    }
}

.statistics-panel.active {
    animation: panelGlow 3s infinite;
}

/* Custom scrollbar */
.statistics-panel::-webkit-scrollbar,
.statistics-content::-webkit-scrollbar {
    width: 6px;
}

.statistics-panel::-webkit-scrollbar-track,
.statistics-content::-webkit-scrollbar-track {
    background: rgba(15, 15, 15, 0.3);
}

.statistics-panel::-webkit-scrollbar-thumb,
.statistics-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, 
                #e10600, 
                #ff1a00);
    border-radius: 3px;
}

.statistics-panel::-webkit-scrollbar-thumb:hover,
.statistics-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, 
                #ff1a00, 
                #ff3333);
}

/* Team-specific gradients for selected state */
.driver-card.selected[data-team="redbull"]::before {
    background: linear-gradient(to top, 
        rgba(30, 65, 255, 0.8) 0%,
        rgba(30, 65, 255, 0.6) 30%,
        rgba(30, 65, 255, 0.3) 60%,
        rgba(30, 65, 255, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="ferrari"]::before {
    background: linear-gradient(to top, 
        rgba(255, 0, 0, 0.8) 0%,
        rgba(255, 0, 0, 0.6) 30%,
        rgba(255, 0, 0, 0.3) 60%,
        rgba(255, 0, 0, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="mercedes"]::before {
    background: linear-gradient(to top, 
        rgba(0, 210, 190, 0.8) 0%,
        rgba(0, 210, 190, 0.6) 30%,
        rgba(0, 210, 190, 0.3) 60%,
        rgba(0, 210, 190, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="racingbulls"]::before {
    background: linear-gradient(to top, 
        rgba(78, 121, 147, 0.8) 0%,
        rgba(78, 121, 147, 0.6) 30%,
        rgba(78, 121, 147, 0.3) 60%,
        rgba(78, 121, 147, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="mclaren"]::before {
    background: linear-gradient(to top, 
        rgba(255, 135, 0, 0.8) 0%,
        rgba(255, 135, 0, 0.6) 30%,
        rgba(255, 135, 0, 0.3) 60%,
        rgba(255, 135, 0, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="haas"]::before {
    background: linear-gradient(to top, 
        rgba(182, 186, 189, 0.8) 0%,
        rgba(182, 186, 189, 0.6) 30%,
        rgba(182, 186, 189, 0.3) 60%,
        rgba(182, 186, 189, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="cadillac"]::before {
    background: linear-gradient(to top, 
        rgba(70, 29, 124, 0.8) 0%,
        rgba(70, 29, 124, 0.6) 30%,
        rgba(70, 29, 124, 0.3) 60%,
        rgba(70, 29, 124, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="williams"]::before {
    background: linear-gradient(to top, 
        rgba(0, 90, 255, 0.8) 0%,
        rgba(0, 90, 255, 0.6) 30%,
        rgba(0, 90, 255, 0.3) 60%,
        rgba(0, 90, 255, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="audi"]::before {
    background: linear-gradient(to top, 
        rgba(255, 60, 0, 0.8) 0%,
        rgba(255, 60, 0, 0.6) 30%,
        rgba(255, 60, 0, 0.3) 60%,
        rgba(255, 60, 0, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="astonmartin"]::before {
    background: linear-gradient(to top, 
        rgba(0, 111, 98, 0.8) 0%,
        rgba(0, 111, 98, 0.6) 30%,
        rgba(0, 111, 98, 0.3) 60%,
        rgba(0, 111, 98, 0.1) 85%,
        transparent 100%) !important;
}

.driver-card.selected[data-team="alpine"]::before {
    background: linear-gradient(to top, 
        rgba(0, 144, 210, 0.8) 0%,
        rgba(0, 144, 210, 0.6) 30%,
        rgba(0, 144, 210, 0.3) 60%,
        rgba(0, 144, 210, 0.1) 85%,
        transparent 100%) !important;
}

/* Fix scroll button visibility when panel is active */
.scroll-button.panel-active {
    z-index: 10001 !important;
    pointer-events: all !important;
}

.scroll-button.right.panel-active {
    right: 480px !important;
    transition: right 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scroll-button.panel-active {
    background: rgba(20, 20, 20, 0.95);
    border-color: #ff1a00;
    box-shadow: 0 0 35px rgba(225, 6, 0, 0.6);
}

/* Make sure unselected drivers are still visible but subdued */
.drivers-wrapper.panel-active .driver-card:not(.selected) {
    transform: scale(0.85) !important;
    filter: grayscale(60%) brightness(0.4) !important;
    opacity: 0.7;
    pointer-events: none;
}

/* Fix for auth buttons - rounded corners */
.auth .btn,
.welcome,
.btn {
    border-radius: 30px !important;
}

.welcome .avatar {
    border-radius: 50% !important;
}

/* Fix for Aston Martin team name - keep on one line */
.driver-card[data-team="astonmartin"] .team-logo {
    white-space: nowrap;
    font-size: 1.2rem;
    min-width: max-content;
}