/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'Abduction';
    src: url('../fonts/abduction2002.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-dark: #0a0b14;
    --bg-panel: #12152a;
    --neon-pink: #ff0055;
    --neon-blue: #00ffff;
    --neon-purple: #b026ff;
    --text-white: #ffffff;
    --text-gray: #a0a0b0;
    --font-heading: 'Abduction', sans-serif;
    --font-body: 'MMC', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

section, .scroll-container, .main-footer, .main-header {
    position: relative;
    z-index: 200;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
/* Canvas Starfield */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
    /* background: radial-gradient(circle at center, #1a1d3a 0%, #000 100%); Removed to allow transparency */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography & Neon Effects */
h1, h2, h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: normal;
}

.font-heading {
    font-family: var(--font-heading);
}

.neon-text-pink {
    color: var(--neon-pink);
    --animation-color: var(--neon-pink);
    animation: neon-glow 3s infinite alternate !important;
}

.neon-text-blue {
    color: var(--neon-blue);
    --animation-color: var(--neon-blue);
    animation: neon-glow 3.5s infinite alternate !important;
}

@keyframes neon-glow {
    99% {
        text-shadow: none;
    }
    100% {
        text-shadow: 0 0 5px var(--animation-color), 0 0 10px var(--animation-color), 0 0 20px var(--animation-color);
    }
}

.neon-footer {
    font-family: var(--font-heading);
    color: var(--neon-blue);
    text-align: center;
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 3rem 0;
}

/* Typewriter Effect Cursor */
.typewriter {
    border-right: 2px solid var(--neon-blue);
    display: block;
    width: fit-content;
    margin: 0 auto;
    white-space: pre-wrap; /* allow wrapping but keep typewriter feel logic in JS */
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--neon-blue); }
}

/* Pulsate Animation */
.pulsate {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 10px var(--neon-blue); }
    50% { transform: scale(1.05); box-shadow: 0 0 25px var(--neon-blue), 0 0 5px var(--neon-pink); }
    100% { transform: scale(1); box-shadow: 0 0 10px var(--neon-blue); }
}

/* Header */
.main-header {
    background: linear-gradient(to bottom, rgba(0,0,0,1), rgba(80,80,80,0.5));
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(8px);
}


.footer-nav {
    display: flex;
    justify-content: space-around;
    margin-top: 0.25rem;
}

.top-logo {
    position: relative;
    padding: 60px 0 20px; /* To offset fixed header */
    text-align: center;
    background: linear-gradient(90deg, #0a0b14 0%, #1a1d3a 50%, #0a0b14 100%);
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-left { min-height: 40px; width: 100%; }

.logo-center {
    clear: both;
    display: block;
    margin: 0 auto;
    height: 250px;
    margin: 80px auto 30px auto;
}

.main-nav {
    display: flex;
    gap: 20px;
    padding-left: 20px;
}

.main-nav a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
}

/* Video Hero */
.video-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900; /* Below header (1000) */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Ensure vertical centering if needed, though usually top padded */
    text-align: center;
    position: relative;
    /* Laser Stripes & Glow Background */
    background-color: transparent;
    background-image: 
        radial-gradient(circle at center, rgba(0, 255, 255, 0.25) 0%, transparent 40%),
        radial-gradient(circle at center, transparent 0%, var(--bg-dark) 50%),
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(255, 255, 255, 0.25) 0deg,
            rgba(255, 255, 255, 0.25) 0.5deg,
            transparent 0.5deg,
            transparent 12deg
        );
    z-index: 99;
}

.hero-content {
    z-index: 10;
    margin-bottom: 2rem;
}

.hero h1 { font-size: 3rem; margin-bottom: 0.5rem; }
.hero h2 { font-size: 2rem; margin-bottom: 1rem; }
.subtitle { font-size: 1.2rem; color: var(--text-gray); margin-bottom: 2rem; }

.btn-primary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--neon-blue);
    padding: 10px 30px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-blue);
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 20px var(--neon-blue), 0 0 40px var(--neon-blue);
}

.hero-visual {
    position: relative;
    width: 100%;
    max-width: 1200px;
}

.hero-car {
    position: absolute;
    z-index: 0;
    width: 100%;
    margin: 0 auto;
    filter: drop-shadow(0 0 20px rgba(255,0,85,0.3));
}

/* Registration */
.registration {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.steps-row {
    display: flex;
    justify-content: space-around;
    margin: 3rem 0;
    flex-wrap: wrap;
    gap: 20px;
}

.step {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border: 2px solid var(--neon-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 0 10px var(--neon-blue);
}

.icon-circle img {
    width: 30px;
    animation: shade-pulse 3s infinite alternate;
 }

 .step:nth-child(2) .icon-circle img {
    animation-delay: 0.1s;
}

 .step:nth-child(3) .icon-circle img {
    animation-delay: 0.2s;
 }

 @keyframes shade-pulse {
    95% { box-shadow: none; }
    100% { box-shadow: 0px 0px 30px 15px var(--neon-blue); }
}

.signup-form input, .signup-form select, .signup-form select:disabled, .signup-form select:active, .signup-form select:focus {
    width: 100%;
    background: rgba(32,32,48,0.9);
    border: none;
    border-bottom: 2px solid var(--text-gray);
    color: var(--text-white);
    padding: 15px;
    margin-bottom: 15px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.signup-form input:focus, .signup-form select:focus {
    outline: none;
    border-bottom-color: var(--neon-pink);
    box-shadow: 0 5px 10px -5px var(--neon-pink);
}

.form-row { display: flex; gap: 15px; }
.form-row input { flex: 1; }

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 2rem 0;
    justify-content: center;
    text-align: left;
}

.form-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    border: 2px solid var(--neon-blue);
    background: rgba(0, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-bottom: 0;
}

.form-checkbox input[type="checkbox"]:checked {
    background: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 1.2rem;
    font-weight: bold;
}

.form-checkbox label {
    font-size: 1.1rem;
    color: var(--text-gray);
    user-select: none;
}

.form-checkbox label a {
    color: var(--neon-blue);
    text-decoration: none;
    transition: text-shadow 0.3s;
}

.form-checkbox label a:hover {
    text-shadow: 0 0 5px var(--neon-blue);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 2rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-gray);
    color: var(--text-gray);
    padding: 10px 20px;
    cursor: pointer;
}

/* Horizontal Scroll Section */
.scroll-container {
    height: 300vh; /* Make room for scroll */
    position: relative;
}

.horizontal-scroll-section {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(180deg, var(--bg-dark) 0%, transparent 20%),
        linear-gradient(0deg, var(--bg-dark) 0%, transparent 20%),
        linear-gradient(90deg, #0a0b14 0%, #1a1d3a 50%, #0a0b14 100%);
}

.horizontal-track {
    display: flex;
    width: 200vw; /* 2 panels wide */
    height: 100%;
    will-change: transform;
}

.panel {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem;
    flex-shrink: 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
}

.text-block p { margin-bottom: 1.5rem; text-align: justify; }

.image-block img {
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.4);
    border: 2px solid var(--neon-purple);
}

.info-section.zeitgeist {
    scroll-snap-align: end;
    scroll-snap-stop: always;
}

/* Final Evolution */
.info-section.final {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Lancer Evolution */
.info-section.lancer {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.center-text { text-align: center; max-width: 1000px; margin: 1rem auto; }
.highlight { color: var(--neon-blue); font-weight: bold; margin-top: 2rem; display: block; }
.highlight-text { font-size: 1.2rem; font-weight: bold; margin-bottom: 1rem; }

.pit-stop-visual {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-top: 2rem;
}

.neon-flicker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 85, 0.1);
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: color-dodge;
}

.flickering .neon-flicker-overlay {
    animation: neon-flicker 0.1s infinite alternate;
}

@keyframes neon-flicker {
    0% { opacity: 0; }
    100% { opacity: 0.3; }
}

/* How to Join */
.how-to-join {
    background: 
        linear-gradient(to bottom, var(--bg-dark) 0%, transparent 50%),
        linear-gradient(to right, #140b0a, #5a1d5a, #140b0a);
    padding: 4rem 2rem;
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn-wide {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--neon-blue);
    color: var(--text-white);
    padding: 15px 40px;
    font-family: var(--font-heading);
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-wide:hover {
    background: var(--neon-blue);
    color: #000;
}

/* Rewards */
.rewards {
    text-align: center;
    padding: 0 2rem 3rem;
    position: relative;
    background: 
        linear-gradient(to top, var(--bg-dark) 0%, transparent 50%),
        linear-gradient(to right, #140b0a, #5a1d5a, #140b0a);
}

.icon-header img { margin: 0 auto 2rem auto; max-width: 400px; width: 100%; }

#diamond-shortcut {
    position: fixed;
    right: 0;
    top: 50%;
    background: var(--neon-purple);
    padding: 10px 20px;
    transform: translateX(100%);
    transition: transform 0.3s;
    cursor: pointer;
    z-index: 1100;
    border-radius: 5px 0 0 5px;
    box-shadow: -5px 0 15px rgba(176, 38, 255, 0.5);
}

#diamond-shortcut.visible {
    transform: translateX(0);
}

/* Game Teaser */
.game-teaser {
    z-index: 999;
    text-align: center;
    padding: 4rem 0;
}
.monitor-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}
.monitor-frame {
    width: 100%;
}
.monitor-screen {
    position: relative;
    max-width: 100vw;
    width: 100%;
}

#gameCanvas {
      max-width: 100%;
      height: 100%;
      aspect-ratio: 11/10;
      display: block;
}

.game-overlay {
    position: absolute;
    top: 15%;
    left: 33.5%;
    width: 32%;
    height: 50%;
    aspect-ratio: 11 / 10;
    pointer-events: none;
    border-radius: 10px;
    transition: all 1s ease;
}
.game-overlay.playing {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translate(-51%, 0);
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: calc(100% - 5rem);
    aspect-ratio: 11 / 10;
    pointer-events: none;
    border-radius: 0;
    z-index: 1;

}
#game-container {
    display: block;
    width: 100%;
    max-height: 100%;
    aspect-ratio: 11 / 10;
}

@media screen and (max-width: 768px) {
    .game-overlay .hud-top{
        font-size: 3pt;
    }
    .game-overlay.playing .hud-top{
        font-size: 10pt;
    }

    #vin {
        font-size: 8pt !important;
    }
    #message {
        font-size: 12pt !important;
    }
    
}
.game-overlay.scanlines {
    background: linear-gradient(transparent 50%, rgba(0, 64, 255, 0.2) 50%);
    background-size: 100% 4px;
    animation: scanline 0.2s linear infinite;
}

@keyframes scanline {
    from { background-position: 0 0; }
    to { background-position: 0 4px; }
}

/* Account Dashboard */
.account-dashboard {
    background: #0f1120;
    margin: 4rem auto;
    max-width: 1200px;
    padding: 3rem;
    border: 1px solid #333;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.speedometer {
    position: relative;
}

.speedometer-graphic {
    position: absolute;
    top: 41%;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}
.speedometer-needle {
    transform-origin: bottom center;
    transform: rotate(-90deg); /* Start position */
    transition: transform 1.5s ease-out;
    width: 50px;
}
.rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom, var(--neon-blue), transparent 60%);
    opacity: 0;
    transition: opacity 1s;
    z-index: -1;
}

.diamond-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--neon-pink);
    border-radius: 10px;
}

.diamond-icon { width: 60px; }
.sparkle { animation: sparkle 2s infinite alternate; }

@keyframes sparkle {
    33% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
    34% { filter: brightness(1.5) drop-shadow(0 0 10px var(--neon-pink)); }
    36% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
    37% { filter: brightness(1.5) drop-shadow(0 0 10px var(--neon-pink)); }
    75% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
    76% { filter: brightness(1.5) drop-shadow(0 0 10px var(--neon-pink)); }
    99% { filter: brightness(1) drop-shadow(0 0 0 transparent); }
    100% { filter: brightness(1.5) drop-shadow(0 0 10px var(--neon-pink)); }
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.spec-card:hover {
    transform: translateY(-10px);
    background: rgba(157, 0, 255, 0.15);
    box-shadow: 0 0 20px var(--neon-purple);
}

.spec-card {
    border: 1px solid var(--neon-purple);
    padding: 30px;
    background: rgba(157, 0, 255, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.counter-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    opacity: 0;
    transform: scale(0.5);
    transition: all 1s ease-out;
}

.counter-text.visible {
    opacity: 1;
    transform: scale(1);
}

.registration-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.registration-table th {
    text-align: left;
    color: var(--neon-blue);
    padding: 10px;
    border-bottom: 1px solid var(--neon-blue);
}

.registration-table td {
    padding: 10px;
    border-bottom: 1px solid #333;
}

/* Special Contest */
.special-contest {
    text-align: center;
    padding: 0rem 2rem;
}
.camera-icon img { margin: 0 auto 2rem auto; max-width: 400px; width: 100%;}

.polaroids {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 3rem 0;
}

.polaroid {
    width: 200px;
    height: 240px;
    background: white;
    padding: 10px 10px 40px 10px;
    transform: rotate(-5deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: rotate-sway 6s infinite ease-in-out alternate;
}
.polaroid:nth-child(2) { transform: rotate(3deg); animation-delay: 1s; }
.polaroid:nth-child(3) { transform: rotate(-2deg); animation-delay: 2s; }

@keyframes rotate-sway {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

/* Footer */
.main-footer {
    background: #000;
    padding: 0 2rem;
    text-align: center;
    border-top: 5px solid var(--neon-purple);
    overflow: hidden; /* For driving car animation */
}

.footer-content { max-width: 1200px; margin: 1rem auto; position: relative; }
.footer-content h3 { color: var(--neon-pink); font-size: 1.2rem; margin-top: 2rem; }
.footer-small { color: var(--neon-pink); font-size: 0.9rem; letter-spacing: 2px; }
.small { font-size: 0.9rem; color: var(--text-gray); }

.footer-car-wrapper {
    position: relative;
    width: 100%;
    height: 150px; /* Adjust based on image */
    overflow-x: hidden;
    margin-top: -200px; /* Pull up into view */
}

.footer-car {
    width: 300px;
    position: absolute;
    right: -300px; /* Start off screen */
    bottom: 0;
    transition: transform 3s cubic-bezier(0.25, 1, 0.5, 1);
}

.footer-car.drive-in {
    transform: translateX(-150vw); /* Drive across */
}

.footer-neon-headers {
    min-height: 150px;
    background: 
        linear-gradient(to bottom, var(--bg-dark) 0%, transparent 50%),
        linear-gradient(to right, #140b0a, #5a1d5a, #140b0a);

}

.contact-info a { color: var(--text-white); text-decoration: underline; }
.mitsubishi-logo img { width: 100px; margin: 3rem auto 0 auto; }

/* Flash Overlay */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 2000;
    transition: opacity 0.1s;
}
.flash-overlay.active { opacity: 1; }

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper { grid-template-columns: 1fr; }
    .steps-row { flex-direction: column; }
    .polaroids { flex-wrap: wrap; }
    .hero h1 { font-size: 2rem; }
    .main-header { flex-direction: column; position: relative; }
    .main-nav { flex-direction: column; align-items: center; margin-top: 1rem; }
    .horizontal-track { width: 300vw; flex-direction: column; height: auto; }
    .horizontal-scroll-section { position: relative; height: auto; }
    .scroll-container { height: auto; }
    .panel { height: auto; padding: 4rem 1rem; }
}