/* Custom Styles for F1 Apex Glory */

/* Carbon Fiber Background Pattern */
.carbon-pattern {
    background-color: #0b0b0c;
    background-image: 
        linear-gradient(45deg, #15151e 25%, transparent 25%), 
        linear-gradient(-45deg, #15151e 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #15151e 75%), 
        linear-gradient(-45deg, transparent 75%, #15151e 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0B0B0C;
}

::-webkit-scrollbar-thumb {
    background: #FF1801;
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cc1300;
}

/* Custom Selection */
::selection {
    background: #FF1801;
    color: #ffffff;
}

/* Canvas styling */
#hero-canvas {
    display: block;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.05);
}

/* Custom skew and clip paths for F1 racing aesthetic */
.skew-btn {
    transform: skew-x(-12deg);
}
.skew-btn > * {
    transform: skew-x(12deg);
}

/* Glowing effects */
.glow-red {
    box-shadow: 0 0 15px rgba(255, 24, 1, 0.2);
}

.glow-red:hover {
    box-shadow: 0 0 25px rgba(255, 24, 1, 0.4);
}

/* Smooth transitions */
.transition-all-300 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Grid background for high-tech look */
.grid-bg {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* F1 Speedometer-like animations */
@keyframes pulse-fast {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.animate-pulse-fast {
    animation: pulse-fast 1s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@font-face {
    font-family: 'Rostex Outline';
    src: url('rostex.outline.ttf') format('truetype'),
         url('rostex.outline.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rostex Regular';
    src: url('rostex.regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* F1 Premium Outline Typography and Speed Effects */
.font-rostex {
    font-family: 'Rostex Outline', 'Syncopate', 'Orbitron', 'Space Grotesk', sans-serif;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
}

.text-outline-white {
    color: #ffffff;
    text-shadow: none;
}

.text-outline-red {
    color: #FF1801;
    text-shadow: none;
}

.text-glow-red {
    text-shadow: 0 0 20px rgba(255, 24, 1, 0.8);
}

.text-glow-white {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Font styles specifically for racing look */
.font-speed {
    font-style: italic;
    transform: skewX(-6deg);
}

@media (min-width: 768px) {
    .font-rostex {
        letter-spacing: 0.25em !important;
    }
}

/* --- TELEMETRY & RACE CONTROL CO-SYSTEMS --- */

/* DRS Active Mode State */
body.drs-active {
    background-color: #050508 !important;
    color: #ffffff;
}

body.drs-active .bg-f1-dark {
    background-color: #050508 !important;
}

/* Dynamic Grid Background with Glow */
body.drs-active .grid-bg {
    background-image: 
        linear-gradient(to right, rgba(0, 210, 190, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 210, 190, 0.05) 1px, transparent 1px) !important;
}

/* DRS Toggle button styles */
.drs-toggle-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.drs-toggle-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: 0.5s;
    opacity: 0;
}
.drs-toggle-btn:hover::after {
    left: 120%;
    opacity: 1;
}

/* Wind Streak Overlay during DRS */
.wind-streaks {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}
body.drs-active .wind-streaks {
    opacity: 1;
}
.streak {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(0, 210, 190, 0.6), transparent);
    animation: moveStreak 0.8s linear infinite;
}

@keyframes moveStreak {
    0% { transform: translateX(-150%) translateY(0); width: 100px; }
    100% { transform: translateX(250%) translateY(100px); width: 300px; }
}

/* 3D G-Force Card Tilt */
.hud-card-wrapper {
    perspective: 1000px;
}
.hud-card {
    transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}
.hud-card-inner {
    transform: translateZ(30px);
}

/* DRS Mode Neon card glow overrides */
body.drs-active .hud-card {
    box-shadow: 0 0 15px rgba(0, 210, 190, 0.1);
}
body.drs-active .hud-card:hover {
    box-shadow: 0 0 25px rgba(0, 210, 190, 0.25);
    border-color: rgba(0, 210, 190, 0.4) !important;
}

/* Circular G-Force Visualizer Radar */
.gforce-radar {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}
.gforce-radar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.gforce-radar::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
}
.gforce-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

/* Sector split tags */
.sector-tag {
    font-size: 8px;
    font-weight: 900;
    font-family: monospace;
    padding: 2px 5px;
    border-radius: 2px;
    text-transform: uppercase;
}
.sector-purple { background-color: #aa00aa; color: #ffffff; text-shadow: 0 0 5px rgba(170,0,170,0.8); }
.sector-green { background-color: #00d200; color: #000000; }
.sector-yellow { background-color: #ffff00; color: #000000; }

/* Interactive SVG Track Map */
.track-map-container svg {
    filter: drop-shadow(0 0 10px rgba(255, 24, 1, 0.15));
    transition: filter 0.5s ease;
}
body.drs-active .track-map-container svg {
    filter: drop-shadow(0 0 15px rgba(0, 210, 190, 0.2));
}
.track-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawTrack 3s ease forwards;
}
.track-point {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.track-point:hover {
    transform: scale(1.4);
    fill: #ffffff !important;
    filter: drop-shadow(0 0 8px var(--glow-color, #FF1801));
}
.track-point.active {
    transform: scale(1.5);
    fill: #ffffff !important;
    filter: drop-shadow(0 0 12px var(--glow-color, #FF1801));
}

@keyframes drawTrack {
    to { stroke-dashoffset: 0; }
}

/* Team Radio Visualizer animated pulse */
.radio-pulse-circle {
    position: relative;
    display: inline-block;
}
.radio-pulse-circle::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid rgba(255, 24, 1, 0.4);
    border-radius: 50%;
    animation: pulseCircle 1.5s ease-out infinite;
}
@keyframes pulseCircle {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Custom speed bar and gauges for generating brag */
.speed-rev-bar {
    height: 6px;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    position: relative;
}
.speed-rev-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, #00d200, #ffff00, #ff1801);
    transition: width 0.1s linear;
}

/* Engine Rumble hover micro-vibrations */
@keyframes rumble {
    0% { transform: skewX(-12deg) translate(0, 0) scale(1.05); }
    20% { transform: skewX(-12deg) translate(-0.8px, 0.8px) scale(1.05); }
    40% { transform: skewX(-12deg) translate(-0.8px, -0.8px) scale(1.05); }
    60% { transform: skewX(-12deg) translate(0.8px, 0.8px) scale(1.05); }
    80% { transform: skewX(-12deg) translate(0.8px, -0.8px) scale(1.05); }
    100% { transform: skewX(-12deg) translate(0, 0) scale(1.05); }
}
.rumble-hover {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.rumble-hover:hover {
    animation: rumble 0.08s linear infinite;
}

/* Specific button layout skew preservation */
@keyframes rumble-flat {
    0% { transform: translate(0, 0) scale(1.02); }
    20% { transform: translate(-0.8px, 0.8px) scale(1.02); }
    40% { transform: translate(-0.8px, -0.8px) scale(1.02); }
    60% { transform: translate(0.8px, 0.8px) scale(1.02); }
    80% { transform: translate(0.8px, -0.8px) scale(1.02); }
    100% { transform: translate(0, 0) scale(1.02); }
}
.rumble-flat-hover:hover {
    animation: rumble-flat 0.08s linear infinite;
}

/* Glowing perimeter tracer for leaderboard cards */
.card-glow-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}
.card-glow-border rect {
    fill: none;
    stroke: var(--glow-color, #ff1801);
    stroke-width: 2px;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.hud-card:hover .card-glow-border rect {
    stroke-dashoffset: 0;
}

/* Input telemetry bottom tracer */
.input-telemetry-wrapper {
    position: relative;
    width: 100%;
}
.input-telemetry-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--input-glow, #ff1801);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 8px var(--input-glow, #ff1801);
}
.input-telemetry-wrapper:focus-within::after {
    width: 100%;
}

/* Speedometer Dial (RPM Radial Meter) */
.rpm-dial-progress {
    transition: stroke-dashoffset 0.15s cubic-bezier(0.1, 0.8, 0.25, 1);
}
.rev-limiter {
    transition: fill 0.1s ease;
}
.rev-limiter.active {
    animation: revBlink 0.12s infinite alternate;
}
@keyframes revBlink {
    0% { fill: #300; filter: none; }
    100% { fill: #ff1801; filter: drop-shadow(0 0 8px #ff1801); }
}

/* --- BATO-STYLE TEXT ANIMATION (MANIFESTO REBUILD) --- */
:root {
    --text-animation-red-color: #ff1801;
    --text-animation-blue-color: #00F0FF;
    --text-animation-green-color: #00FF66;
    --text-animation-grey-color: rgba(255, 255, 255, 0.15);
}

.text-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20vh 5vw;
    background-color: #0b0b0c;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.text-animation__text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 4.0vw;
    line-height: 1.4;
    font-weight: 800;
    font-style: normal;
    text-align: center;
    text-transform: uppercase;
    color: #ffffff;
    max-width: 90vw;
    letter-spacing: -0.01em;
}

.text-animation__paragraph {
    height: 13vw;
    display: block;
}

.text-animation__blur {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
}

.text-animation__blur::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: 13.75vw;
    max-height: 5.6vw;
    border-radius: 50%;
    background-color: var(--blur-glow, var(--text-animation-red-color));
    filter: blur(4vw);
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.text-animation__word {
    position: relative;
    display: inline-block;
    transition: color 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
    vertical-align: baseline;
}

.text-animation__image-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    flex-shrink: 0;
    overflow: hidden;
    margin: 0;
    width: 0;
    max-width: 18vw;
    height: 5.6vw;
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    will-change: width, opacity;
    transform: translate3d(0,0,0);
}

.text-animation__animated-img {
    position: absolute;
    top: 0;
    left: 50%;
    width: 18vw;
    height: 100%;
    border-radius: 0.25rem;
    object-fit: cover;
    transform: translateX(-50%);
}

.text-animation__reveal {
    position: absolute;
    top: 0;
    z-index: 2;
    width: 50%;
    height: 100%;
    pointer-events: none;
    background-color: #0b0b0c;
    will-change: transform;
    transform: translate3d(0,0,0);
}

.text-animation__reveal.left {
    left: 0;
}

.text-animation__reveal.right {
    right: 0;
}

.char-reveal {
    opacity: 0;
    color: var(--text-animation-grey-color);
    display: inline-block;
    will-change: color, opacity;
}

@media screen and (max-width: 1024px) {
    .text-animation__text {
        font-size: 5.2vw;
    }
    .text-animation__paragraph {
        height: 17vw;
    }
    .text-animation__image-wrapper {
        max-width: 20vw;
        height: 6.5vw;
    }
    .text-animation__animated-img {
        width: 20vw;
    }
    .text-animation__blur::before {
        max-width: 19.75vw;
        max-height: 6.5vw;
    }
}

@media screen and (max-width: 768px) {
    .text-animation__text {
        font-size: 6.2vw;
    }
    .text-animation__paragraph {
        height: 20vw;
    }
    .text-animation__image-wrapper {
        max-width: 22vw;
        height: 7.5vw;
    }
    .text-animation__animated-img {
        width: 22vw;
    }
}

/* --- SUPABASE AUTH & CONFIG MODAL STYLES --- */
#supabase-config-modal:not(.hidden),
#supabase-auth-modal:not(.hidden) {
    display: flex !important;
}

#tab-login.active, #tab-signup.active {
    color: #ff1801 !important;
    border-color: #ff1801 !important;
}

.profile-active-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00FF66;
    box-shadow: 0 0 8px #00FF66;
}

/* --- RECREATED FOOTER STYLES --- */
footer {
    position: relative;
    background-color: #000000;
}

/* Grandstand and Cheering Crowd Styles */
.crowd-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 180px;
    pointer-events: none;
    z-index: 1;
}

.crowd-silhouette {
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* Waving flags micro-animations */
.waving-flag {
    transform-origin: bottom center;
    animation: waveFlag 4s ease-in-out infinite;
}

.waving-flag-fast {
    transform-origin: bottom center;
    animation: waveFlag 2.5s ease-in-out infinite alternate;
}

.cheering-hand {
    transform-origin: bottom center;
    animation: bounceHand 3s ease-in-out infinite alternate;
}

@keyframes waveFlag {
    0%, 100% { transform: rotate(-5deg) skewX(-2deg); }
    50% { transform: rotate(8deg) skewX(4deg); }
}

@keyframes bounceHand {
    0% { transform: translateY(0) scaleY(1); }
    100% { transform: translateY(-10px) scaleY(1.1); }
}

/* Flat F1 icons styling */
.f1-flat-icon {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s, color 0.3s;
    cursor: pointer;
}

.f1-flat-icon:hover {
    transform: translateY(-8px) scale(1.1);
    color: #ff1801 !important;
    filter: drop-shadow(0 0 8px rgba(255, 24, 1, 0.5));
}

/* Footer racing stripe animation */
.footer-racing-stripe {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #ff1801 30%, #ff1801 70%, transparent 100%);
    animation: raceStripe 3s ease-in-out infinite;
}

@keyframes raceStripe {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Footer divider pulse */
.footer-divider {
    animation: dividerPulse 2.5s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.4; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.5); }
}

/* ═══════════ 3D Car Viewer ═══════════ */
.car-turntable-wrapper {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.car-turntable-stage {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center bottom, rgba(255,24,1,0.03) 0%, transparent 60%);
}

.car-turntable-stage canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    cursor: grab;
}

.car-turntable-stage canvas:active {
    cursor: grabbing;
}

/* Loading overlay */
.car-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.8);
    z-index: 10;
    transition: opacity 0.5s ease;
}

.car-loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.car-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #ff1801;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Ground reflection */
.car-ground-reflection {
    width: 80%;
    height: 40px;
    margin: -10px auto 0;
    background: radial-gradient(ellipse at center, rgba(255,24,1,0.08) 0%, transparent 70%);
    filter: blur(6px);
    animation: reflectionPulse 3s ease-in-out infinite;
}

@keyframes reflectionPulse {
    0%, 100% { opacity: 0.5; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.1); }
}

/* --- PREMIUM REVEAL FOOTER --- */
@media (min-width: 1025px) {
    .reveal-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        z-index: 1;
        background-color: #000000;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .footer-spacer {
        height: 100vh;
        width: 100%;
        pointer-events: none;
        background: transparent;
    }
}
@media (max-width: 1024px) {
    .reveal-footer {
        position: relative;
        width: 100%;
        height: 100vh;
        z-index: 10;
        background-color: #000000;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }
    .footer-spacer {
        display: none;
    }
}

/* --- MOTION BLUR / SPEED MICRO-ANIMATIONS ON BRANDING --- */
.racing-brand {
    perspective: 1000px;
}

.racing-blur-text {
    display: inline-block;
    transition: transform 0.2s ease, filter 0.2s ease;
    animation: racing-blur-idle 5s infinite ease-in-out;
}

/* Continuous high-speed telemetry pulse (idle) */
@keyframes racing-blur-idle {
    0%, 100% {
        filter: blur(0px);
        transform: skewX(-12deg) scale(1);
        text-shadow: none;
    }
    48% {
        filter: blur(0px);
        transform: skewX(-12deg) scale(1);
        text-shadow: none;
    }
    50% {
        filter: blur(1.5px);
        transform: skewX(-15deg) scale(1.01) translateX(2px);
        text-shadow: -4px 0 2px rgba(255, 24, 1, 0.5), 4px 0 2px rgba(0, 240, 255, 0.5);
    }
    52% {
        filter: blur(0px);
        transform: skewX(-12deg) scale(1);
        text-shadow: none;
    }
}

/* Active blur on hover representing acceleration */
.racing-brand:hover .racing-blur-text {
    animation: racing-acceleration 0.3s infinite linear;
}

@keyframes racing-acceleration {
    0% {
        filter: blur(0px);
        transform: skewX(-12deg) translateX(0);
        text-shadow: none;
    }
    20% {
        filter: blur(2.5px) brightness(1.2);
        transform: skewX(-16deg) translateX(-4px) scaleX(1.05);
        text-shadow: -8px 0 4px rgba(255, 24, 1, 0.8), 2px 0 2px rgba(0, 240, 255, 0.5);
    }
    60% {
        filter: blur(2.5px) brightness(1.2);
        transform: skewX(-8deg) translateX(4px) scaleX(0.95);
        text-shadow: 8px 0 4px rgba(0, 240, 255, 0.8), -2px 0 2px rgba(255, 24, 1, 0.5);
    }
    100% {
        filter: blur(0px);
        transform: skewX(-12deg) translateX(0);
        text-shadow: none;
    }
}

/* --- TELEMETRY LED SHIFT LIGHTS --- */
.rev-light-bar {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
}

.rev-dot {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Sequential ignition animation representing revving engine */
.rev-dot.green {
    animation: revGreen 2.5s infinite var(--delay) ease-in-out;
}
.rev-dot.yellow {
    animation: revYellow 2.5s infinite var(--delay) ease-in-out;
}
.rev-dot.red {
    animation: revRed 2.5s infinite var(--delay) ease-in-out;
}
.rev-dot.blue-flash {
    animation: revBlueFlash 2.5s infinite var(--delay) ease-in-out;
}

@keyframes revGreen {
    0%, 15% { background-color: #111; box-shadow: none; }
    20%, 80% { background-color: #00FF66; box-shadow: 0 0 8px #00FF66; }
    85%, 100% { background-color: #111; box-shadow: none; }
}

@keyframes revYellow {
    0%, 35% { background-color: #111; box-shadow: none; }
    40%, 80% { background-color: #FFCC00; box-shadow: 0 0 8px #FFCC00; }
    85%, 100% { background-color: #111; box-shadow: none; }
}

@keyframes revRed {
    0%, 55% { background-color: #111; box-shadow: none; }
    60%, 80% { background-color: #FF1801; box-shadow: 0 0 8px #FF1801; }
    85%, 100% { background-color: #111; box-shadow: none; }
}

@keyframes revBlueFlash {
    0%, 70% { background-color: #111; box-shadow: none; }
    75%, 80% { background-color: #00F0FF; box-shadow: 0 0 12px #00F0FF; }
    81%, 83% { background-color: #111; box-shadow: none; }
    84%, 86% { background-color: #00F0FF; box-shadow: 0 0 12px #00F0FF; }
    87%, 100% { background-color: #111; box-shadow: none; }
}

/* Aerodynamic Wind Flow Lines */
.flow-line {
    animation: flowSweep 3s infinite linear;
    background: linear-gradient(90deg, transparent, rgba(255, 24, 1, 0.8) 50%, transparent);
    background-size: 200% 100%;
}

@keyframes flowSweep {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Laser Scanline sweep on brand */
.logo-scanline {
    animation: scanlineSweep 4s infinite linear;
}

@keyframes scanlineSweep {
    0% { transform: skewX(-12deg) translateX(-100%); opacity: 0; }
    10% { opacity: 1; }
    30% { transform: skewX(-12deg) translateX(100%); opacity: 0; }
    100% { transform: skewX(-12deg) translateX(100%); opacity: 0; }
}

/* Speed / telemetries hover reaction */
.racing-brand:hover ~ div span {
    color: #ff1801;
    text-shadow: 0 0 8px rgba(255, 24, 1, 0.4);
}

/* Carbon Grid Telemetry Background */
.carbon-grid-bg {
    background-color: #030305;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 24, 1, 0.08) 0%, transparent 65%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.25) 75%),
        linear-gradient(45deg, rgba(0, 0, 0, 0.25) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.25) 75%);
    background-size: 100% 100%, 60px 60px, 60px 60px, 6px 6px, 6px 6px;
    background-position: 0 0, 0 0, 0 0, 0 0, 3px 3px;
}

/* Infinitely Scrolling Telemetry Marquee */
.marquee-container {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.animate-marquee {
    display: flex;
    animation: marqueeSweep 35s linear infinite;
}

@keyframes marqueeSweep {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
