/* =========================================
   F1 FAN CLUB - GLOBAL STYLES
   Design inspired by Admin Dashboard
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #e10600;
    --primary-hover: #ff0000;
    --dark: #15151e;
    --darker: #0f0f15;
    --light: #f0f0f0;
    --gray: #888888;
    --border: #333333;
    
    --card-bg: var(--dark);
    --text-main: var(--light);
    --accent: var(--primary);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    padding-top: 80px;
}

/* F1-themed background with gradient */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(225, 6, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(225, 6, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Speed lines effect */
.bg-lines {
    position: fixed;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(60deg,
            rgba(225, 6, 0, 0.03) 0px,
            rgba(225, 6, 0, 0.03) 2px,
            transparent 2px,
            transparent 10px);
    animation: slide 10s linear infinite;
    opacity: 0.3;
    z-index: -1;
    top: 0;
    left: 0;
}

@keyframes slide {
    from { transform: translateX(0); }
    to { transform: translateX(-200px); }
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* =========================================
   HEADER & NAVIGATION - FIXED
   ========================================= */

header {
    background-color: #0a0a0a;
    border-bottom: 2px solid rgba(225, 6, 0, 0.3);
    padding: 0 40px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.left-header {
    display: flex;
    align-items: center;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logo-title img {
    width: 40px;
    height: auto;
    filter: brightness(0) invert(1);
}

.logo-title span {
    display: block;
    margin-top: 4px;
}

/* =========================================
   NAVIGATION MENU
   ========================================= */

nav {
    display: flex;
    gap: 5px;
    margin: 0 20px;
}

nav a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 4px;
    color: #ffffff !important;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

nav a:hover {
    color: #e10600 !important;
    opacity: 1;
    background: rgba(225, 6, 0, 0.1);
}

nav a.active {
    color: #e10600 !important;
    opacity: 1;
    font-weight: 700;
    background: rgba(225, 6, 0, 0.15);
}

nav a[style*="color"] {
    color: #ffffff !important;
}

nav a[style*="color"]:hover,
nav a[style*="color"].active {
    color: #e10600 !important;
}

/* =========================================
   AUTH / LOGIN SECTION
   ========================================= */

.auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    margin-right: 10px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    border: 1px solid rgba(225, 6, 0, 0.2);
}

.welcome img.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e10600;
    transition: transform 0.3s;
}

.welcome img.avatar:hover {
    transform: scale(1.1);
}

.welcome-text {
    color: #ccc;
}

.welcome-text span {
    font-weight: 700;
}

/* =========================================
   BUTTONS
   ========================================= */

.auth .btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    background-color: transparent;
    border: 1px solid rgba(225, 6, 0, 0.5);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.auth .btn:hover {
    background-color: #e10600;
    border-color: #e10600;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(225, 6, 0, 0.4);
    color: #fff;
}

.auth .btn:first-child {
    background-color: rgba(225, 6, 0, 0.15);
    border-color: #e10600;
}

.auth .btn:first-child:hover {
    background-color: #e10600;
}

.auth .btn:not(:last-child) {
    border-color: rgba(255, 255, 255, 0.2);
}

.auth .btn:not(:last-child):hover {
    border-color: #e10600;
    background-color: #e10600;
}

.auth .btn:last-child {
    border-color: rgba(225, 6, 0, 0.5);
}

.auth .btn:last-child:hover {
    background-color: #e10600;
}

/* =========================================
   RESPONSIVE NAVIGATION
   ========================================= */

@media (max-width: 1200px) {
    header {
        padding: 0 20px;
    }
    
    nav {
        gap: 2px;
    }
    
    nav a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    header {
        flex-wrap: wrap;
        height: auto;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .logo-title {
        font-size: 1.2rem;
    }
    
    .logo-title img {
        width: 30px;
    }
    
    nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        margin: 0;
    }
    
    .auth {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .auth {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .welcome {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 576px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-title {
        justify-content: center;
    }
    
    .auth {
        justify-content: center;
        width: 100%;
    }
    
    nav a {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

/* =========================================
   MAIN CONTENT & SECTIONS
   ========================================= */

main {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary);
    padding-left: 20px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =========================================
   NEXT RACE SECTION
   ========================================= */

.next-race-section {
    padding: 50px 0;
    animation: fadeIn 0.8s ease-out;
}

.race-card {
    background-color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-wrap: wrap;
}

.race-location {
    flex: 1.2;
    padding: 40px;
    position: relative;
    background: linear-gradient(135deg, rgba(21,21,30,0.9), rgba(21,21,30,0.7));
    min-width: 300px;
}

.country-info {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.country-flag-large {
    width: 60px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.race-name {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 5px;
    color: #fff;
}

.circuit-name {
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 500;
}

.race-date {
    margin-top: 15px;
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.circuit-visual {
    position: relative;
    margin-top: 30px;
    text-align: center;
}

.circuit-map {
    max-width: 100%;
    height: auto;
    filter: invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.2));
    opacity: 0.9;
    transition: transform 0.5s;
}

.circuit-map:hover {
    transform: scale(1.05);
}

.circuit-overlay {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #bbb;
}

.circuit-overlay span {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.race-schedule {
    flex: 0.8;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-left: 1px solid var(--border);
    min-width: 300px;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.schedule-header h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.timezone {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
}

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.session-card {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    transition: 0.2s;
    border: 1px solid transparent;
}

.session-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateX(5px);
}

.session-card.main-session {
    background: rgba(225, 6, 0, 0.1);
    border: 1px solid rgba(225, 6, 0, 0.3);
}

.session-card.main-session:hover {
    background: rgba(225, 6, 0, 0.2);
}

.session-icon {
    width: 30px;
    text-align: center;
    color: var(--gray);
    margin-right: 15px;
}

.highlight-session .session-icon { color: #ff8700; }
.main-session .session-icon { color: var(--primary); }

.session-card h5 {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.session-time {
    font-weight: 700;
    font-family: monospace;
    font-size: 1.1rem;
    color: #fff;
}

.countdown-timer {
    display: flex;
    gap: 20px;
}

.countdown-unit {
    text-align: center;
    background: var(--dark);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    min-width: 80px;
}

.countdown-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray);
    margin-top: 5px;
}

/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    background-color: #0c0c10;
    color: #bbb;
    padding: 60px 20px 20px;
    border-top: 2px solid var(--primary);
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-section a {
    display: block;
    margin-bottom: 10px;
    color: #999;
}

.footer-section a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: #999;
    transition: 0.3s;
}

.social-icon:hover {
    fill: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    color: #555;
}

/* =========================================
   UTILITIES & ANIMATIONS
   ========================================= */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .race-card {
        flex-direction: column;
    }

    .race-schedule {
        border-left: none;
        border-top: 1px solid var(--border);
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* =========================================
   TEAMS PAGE STYLES
   ========================================= */
#teams {
    width: 100%;
    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;
}

.teams-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;
}

.teams-container::-webkit-scrollbar {
    display: none;
}

.teams-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.teams-wrapper {
    display: flex;
    height: 100%;
    align-items: flex-end;
    padding-left: 50px;
    padding-right: 50px;
    gap: 0;
    width: max-content;
    margin: 0;
}

.team-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;
}

.team-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.team-image {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 70%;
    width: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: grayscale(30%) brightness(0.6);
    z-index: 2;
    margin: 0;
    padding: 0;
}

.team-name-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-card::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%);
}

.team-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%;
}

.team-name {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-principal {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.team-details {
    font-size: 0.9rem;
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.flag {
    font-size: 1.2rem;
}

.team-card:hover {
    transform: scale(0.95);
    filter: grayscale(0%) brightness(1);
    width: 300px;
    z-index: 100;
}

.team-card:hover .team-image {
    filter: grayscale(0%) brightness(1.1);
    transform: translateX(-50%) scale(1.05);
}

.team-card:hover .team-name-logo {
    opacity: 1;
    transform: translateX(-50%) scale(1.15);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.team-card:hover::before {
    opacity: 0.8;
}

.team-card:hover .team-info {
    transform: translateY(0);
}

.scroll-button {
    position: absolute;
    top: 50%;
    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;
}

.team-card.selected {
    transform: scale(0.95) !important;
    filter: grayscale(0%) brightness(1) !important;
    width: 300px !important;
    z-index: 100 !important;
}

.team-card.selected .team-image {
    filter: grayscale(0%) brightness(1.1) !important;
    transform: translateX(-50%) scale(1.05) !important;
}

.team-card.selected .team-name-logo {
    opacity: 1 !important;
    transform: translateX(-50%) scale(1.15) !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.7) !important;
}

.team-card.selected::before {
    opacity: 0.8 !important;
}

.team-card.selected .team-info {
    transform: translateY(0) !important;
}

.team-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);
    }
}

.team-card.selected .team-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
      ellipse at center,
      rgba(225, 6, 0, 0.15) 0%,
      transparent 70%
    );
    z-index: 4;
    opacity: 0.5;
    pointer-events: none;
}

/* =========================================
   CHAMPIONSHIP PAGE STYLES - FIXED HEIGHT ALIGNMENT
   ========================================= */

.championship-layout {
    display: flex;
    gap: 30px;
    max-width: 100%;
    margin: 0;
    padding: 0 0 0 30px;
    min-height: calc(100vh - 80px);
    align-items: stretch;
    height: 100%;
}

.championship-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    height: 100%;
    min-height: calc(100vh - 80px);
}

.section-header {
    margin-top: 0;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.section-header .section-title {
    font-size: 2.5rem;
    margin-bottom: 0;
    border-left: 5px solid #e10600;
    padding-left: 20px;
}

.control-panel {
    width: 100%;
    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;
    border-right: none;
    margin-bottom: 40px;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8), -5px 0 30px rgba(225, 6, 0, 0.3);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex-shrink: 0;
}

.control-panel .panel-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;
    min-height: 120px;
}

.control-panel .panel-icon {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-panel .panel-icon i {
    font-size: 3.5rem;
    color: #e10600;
    filter: drop-shadow(0 0 20px rgba(225, 6, 0, 0.6));
    position: relative;
    z-index: 1;
}

.control-panel .panel-icon::before {
    content: "";
    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;
}

.control-panel .panel-header h2 {
    flex: 1;
    min-width: 0;
    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;
}

.control-panel .panel-header h2 span {
    display: block;
    font-size: 1rem;
    color: #e10600;
    margin-top: 4px;
}

.championship-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;
}

.championship-toggle .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;
}

.championship-toggle .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);
}

.championship-toggle .toggle-btn:hover:not(.active) {
    background: rgba(225, 6, 0, 0.15);
    color: white;
    border-color: rgba(225, 6, 0, 0.5);
}

.championship-toggle .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;
}

.championship-toggle .toggle-btn:hover .toggle-glow {
    left: 100%;
}

.championship-toggle .toggle-text {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
}

.year-item {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9) 0%, rgba(25, 25, 25, 0.9) 100%);
    padding: 15px 10px;
    border: 1px solid rgba(225, 6, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    text-align: center;
}

.year-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);
}

.year-item.active {
    border: 2px solid #e10600;
    background: linear-gradient(145deg, rgba(225, 6, 0, 0.15) 0%, rgba(255, 26, 0, 0.15) 100%);
    box-shadow: 0 0 20px rgba(225, 6, 0, 0.4);
}

.year-item.year-nav {
    background: rgba(225, 6, 0, 0.1);
    border-color: rgba(225, 6, 0, 0.5);
    flex-direction: row;
    gap: 5px;
}

.year-item.year-nav i {
    color: #e10600;
    font-size: 1rem;
}

.year-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;
}

.year-item:hover .year-glow {
    opacity: 1;
}

.year-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.year-label {
    font-size: 0.7rem;
    color: #e10600;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.current-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, rgba(15, 15, 15, 0.9) 100%);
    border-top: 1px solid rgba(225, 6, 0, 0.3);
}

.selection-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.selection-year {
    font-size: 2rem;
    font-weight: 900;
    color: #e10600;
    line-height: 1;
}

.selection-type {
    font-size: 0.9rem;
    color: #fff;
    opacity: 0.8;
}

.selection-type span {
    color: #e10600;
    font-weight: 700;
}

.update-btn {
    background: #e10600;
    color: white;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
}

.update-btn:hover {
    background: #ff1a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(225, 6, 0, 0.4);
}

.update-btn i {
    font-size: 0.9rem;
}

.standings-card {
    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;
    border-right: none;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8), -5px 0 30px rgba(225, 6, 0, 0.3);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-header {
    padding: 20px 25px;
    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;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: 0.5px;
}

.table-header h2 i {
    color: #e10600;
    font-size: 1.5rem;
}

.season-badge {
    background: #e10600;
    padding: 6px 15px;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 0 15px rgba(225, 6, 0, 0.4);
    letter-spacing: 0.5px;
}

.f1-table-wrapper {
    padding: 20px 25px;
    overflow-x: auto;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    flex: 1;
    min-height: 0;
}

.f1-table {
    width: 100%;
    border-collapse: collapse;
}

.f1-table th {
    text-align: left;
    padding: 12px 10px;
    color: #e10600;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(225, 6, 0, 0.3);
}

.f1-table td {
    padding: 12px 10px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.f1-row:hover {
    background: rgba(225, 6, 0, 0.1);
}

.f1-pos {
    font-weight: 900;
    color: #e10600;
    width: 60px;
}

.f1-name {
    font-weight: 600;
}

.f1-name span {
    color: #e10600;
    font-weight: 900;
}

.f1-team {
    color: #aaa;
    font-size: 0.9rem;
}

.f1-points {
    font-weight: 900;
    color: #fff;
    text-align: right;
}

.f1-champion {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 40%, transparent 100%);
    border-left: 4px solid #d4af37;
}

.f1-gold {
    color: #d4af37 !important;
}

.loading-message {
    text-align: center;
    padding: 40px;
    color: #aaa;
}

.loading-message i {
    color: #e10600;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* =========================================
   STATISTICS PANEL - PERFECT HEIGHT ALIGNMENT
   ========================================= */

.statistics-panel {
    width: 480px;
    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;
    border-right: none;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    flex-shrink: 0;
    animation: panelGlow 3s infinite;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    margin: 0;
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 80px);
}

@keyframes panelGlow {
    0%, 100% {
        border-left-color: #e10600;
        box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8);
    }
    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-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;
    margin-top: 0;
}

.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-team-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;
}

.stats-team-info {
    flex: 1;
    min-width: 0;
}

.stats-team-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-team-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-team-nationality {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    opacity: 0.7;
    color: #ccc;
}

.stats-team-nationality span:first-child {
    font-size: 1.1rem;
}

.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;
}

.stats-toggle .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;
}

.stats-toggle .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);
}

.stats-toggle .toggle-btn:hover:not(.active) {
    background: rgba(225, 6, 0, 0.15);
    color: white;
    border-color: rgba(225, 6, 0, 0.5);
}

.stats-toggle .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;
}

.stats-toggle .toggle-btn:hover .toggle-glow {
    left: 100%;
}

.stats-toggle .toggle-text {
    position: relative;
    z-index: 2;
}

.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);
    height: 100%;
    min-height: 80px;
}

.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);
}

.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);
}

/* =========================================
   RESPONSIVE FOR CHAMPIONSHIP LAYOUT
   ========================================= */

@media (max-width: 1200px) {
    .championship-layout {
        flex-direction: column;
        padding: 0 20px;
        height: auto;
        min-height: calc(100vh - 80px);
    }
    
    .championship-content {
        min-height: auto;
        height: auto;
    }
    
    .statistics-panel {
        width: 100%;
        max-width: 480px;
        margin: 0 auto 30px;
        border-right: none;
        height: auto;
        position: relative;
        top: 0;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .year-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .current-selection {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}
/* =========================================
   PROFILE CARD
   ========================================= */

.profile-card {
    display: none;
    position: fixed;
    top: 90px;
    right: 20px;
    width: 300px;
    background-color: var(--dark);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: var(--light);
}

.profile-card h3 {
    margin-bottom: 15px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
/* Add to your style.css file */
.f1-row {
    transition: background 0.3s ease;
    background-position: left center;
    background-repeat: no-repeat;
}

.f1-row:hover {
    background: rgba(225, 6, 0, 0.1) !important;
}

.f1-champion {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 40%, transparent 100%) !important;
    border-left: 4px solid #d4af37;
}