/* CSS extracted from index.html */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0f;
    color: #fff;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 0, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    opacity: 0.5;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 0;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

nav {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding: 1.5rem 2rem;
    z-index: 999;
    box-shadow: 0 4px 30px rgba(0, 255, 255, 0.1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-portal {
    background: transparent;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.back-portal:hover {
    color: #0ff;
    border-color: #0ff;
    background: rgba(0, 255, 255, 0.1);
}

nav ul {
    display: flex;
    gap: 4rem;
    list-style: none;
}

nav ul a {
    color: #999;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s;
    position: relative;
}

nav ul a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ff, #f0f);
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

nav ul a:hover {
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

nav ul a:hover::after {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0ff 0%, #f0f 50%, #0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    animation: neonPulse 3s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
}

@keyframes neonPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.hero-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #0ff, #f0f, transparent);
    margin: 2rem auto;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #0ff;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 6rem 0;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    text-align: center;
}

.section-title span {
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#live {
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, transparent 100%);
}

.twitch-container {
    max-width: 1200px;
    margin: 0 auto;
}

.stream-wrapper {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 255, 255, 0.3), 0 0 120px rgba(255, 0, 255, 0.2);
    border: 2px solid;
    border-image: linear-gradient(135deg, #0ff, #f0f) 1;
}

.stream-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.stream-embed iframe,
.stream-embed #twitch-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.stream-info {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(255, 0, 255, 0.1) 100%);
}

.twitch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #9146FF 0%, #772ce8 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.5);
}

.twitch-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.8);
}

.liveries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

.livery-card {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(10, 10, 20, 0.8) 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    cursor: pointer;
    position: relative;
}

.livery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.livery-card:hover::before {
    left: 100%;
}

.livery-card:hover {
    transform: translateY(-8px);
    border-color: #0ff;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3), 0 0 80px rgba(255, 0, 255, 0.2);
}

.livery-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    overflow: hidden;
}

.livery-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(0deg, rgba(0, 255, 255, 0.03) 0px, transparent 2px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(255, 0, 255, 0.03) 0px, transparent 2px, transparent 4px);
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(20px);
    }
}

.livery-image::after {
    content: '◢';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 8rem;
    background: linear-gradient(135deg, #0ff, #f0f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.1;
}

.livery-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.8), rgba(255, 0, 255, 0.8));
    color: #000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.livery-content {
    padding: 2rem;
}

.livery-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.livery-content p {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.btn-download {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.8), 0 0 60px rgba(255, 0, 255, 0.6);
}

.about-grid {
    display: block;
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
    margin-bottom: 3rem;
}

.about-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.about-text p {
    color: #999;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Results Section */
.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.results-box {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(10, 10, 20, 0.8) 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.results-box h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #0ff 0%, #f0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #999;
    font-size: 0.95rem;
}

.result-value {
    color: #0ff;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.result-highlight {
    background: rgba(0, 255, 255, 0.1);
    padding: 1.2rem;
    border-radius: 8px;
    border-left: 3px solid #0ff;
    margin-bottom: 1rem;
}

/* Standings Section */
.standings-table {
    width: 100%;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(10, 10, 20, 0.8) 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.standings-table table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table th {
    background: rgba(0, 255, 255, 0.1);
    color: #0ff;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
}

.standings-table th:first-child {
    width: 60px;
    text-align: center;
}

.standings-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #999;
}

.standings-table td:first-child {
    text-align: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
}

.standings-table tr:hover {
    background: rgba(0, 255, 255, 0.05);
}

.standings-table tr.highlight {
    background: rgba(0, 255, 255, 0.15);
    border-left: 3px solid #0ff;
}

.standings-table tr.highlight td {
    color: #0ff;
    font-weight: 600;
}

.team-name {
    color: #fff;
    font-weight: 600;
}

.stat-points {
    color: #f0f;
    font-weight: 700;
}

.stat-wins {
    color: #0ff;
    font-weight: 600;
}

.stat-box {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.8) 0%, rgba(10, 10, 20, 0.8) 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.stat-box:hover {
    border-color: #0ff;
    transform: translateY(-4px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #0ff, #f0f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.stat-label {
    color: #999;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    color: #666;
    position: relative;
    z-index: 1;
}

footer a {
    color: #0ff;
    text-decoration: none;
    transition: all 0.3s;
}

footer a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 2rem;
    }

    .liveries-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 4rem 0;
    }

    section {
        padding: 4rem 0;
    }
}

/* Accordion Styles */
.season-toggle {
    width: 100%;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.9) 0%, rgba(10, 10, 20, 0.9) 100%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.season-toggle:hover {
    border-color: #0ff;
    background: linear-gradient(135deg, rgba(20, 20, 30, 1) 0%, rgba(10, 10, 20, 1) 100%);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.season-toggle h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.season-toggle .toggle-icon {
    color: #0ff;
    transition: transform 0.3s;
    font-size: 1.2rem;
}

.season-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.season-toggle.active {
    border-color: #0ff;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.15);
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.standings-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    opacity: 0;
    margin-bottom: 2rem;
}

.standings-wrapper.open {
    opacity: 1;
    /* max-height is handled by JS */
}

/* Ajustement pour que le tableau colle au header quand ouvert */
.standings-wrapper .standings-table {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

.season-subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 2rem;
}

.season-subtitle.secondary {
    margin-top: 4rem;
}