:root {
    --bg-color: #0d0d0d;
    --text-color: #ffffff;
    --accent-color: #0087ff; /* Porsche Blue */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: radial-gradient(circle at center, #1a1a1a 0%, #0a0a0a 100%);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    height: 100vh;
    cursor: none; /* Hide default cursor */
}

a, button {
    cursor: none; /* Hide default cursor on interactive elements too */
}

/* Custom Cursor Styles */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s, border-color 0.3s;
}

.cursor-outline.hover {
    width: 80px;
    height: 80px;
    background: rgba(0, 135, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Hide scrollbar */
body::-webkit-scrollbar {
    display: none;
}
body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-content {
    text-align: center;
}

.logo-text {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 1rem;
    display: block;
    opacity: 0;
    transform: translateY(20px);
}

.progress-wrapper {
    position: absolute;
    bottom: 80px;
    left: 10%;
    width: 80%;
    display: flex;
    align-items: center;
    gap: 20px;
}

.progress-line-container {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 2px;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

.car-container {
    position: absolute;
    bottom: -10px;
    left: 0%;
    width: 150px;
    transform: translateX(-50%);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loading-car {
    width: 100%;
    height: auto;
}

.progress-text {
    position: fixed;
    right: 40px;
    bottom: 100px;
    font-size: 10rem;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.nav-logo {
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

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

.nav-links a:hover {
    opacity: 1;
}

.menu-icon {
    width: 30px;
    height: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.menu-icon span {
    width: 100%;
    height: 2px;
    background: var(--text-color);
}

/* Hero Section */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
}

.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#sequence-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.05);
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    pointer-events: none;
}

.eyebrow {
    font-size: 0.9rem;
    letter-spacing: 8px;
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0;
}

h1 {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 0.9;
    margin-bottom: 40px;
    opacity: 0;
    transform: scale(1.1);
    mix-blend-mode: overlay;
}

.cta-group {
    display: flex;
    gap: 20px;
    pointer-events: all;
    opacity: 0;
}

.btn-primary,
.btn-secondary {
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-primary {
    background: #ffffff;
    color: #000000;
    border: none;
}

.btn-primary:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

/* Bottom Info */
.bottom-info {
    position: absolute;
    bottom: 50px;
    left: 50px;
    display: flex;
    gap: 60px;
    z-index: 10;
    opacity: 0;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item .label {
    font-size: 0.6rem;
    letter-spacing: 2px;
    opacity: 0.5;
    margin-bottom: 5px;
}

.info-item .value {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Custom Scroll Indicator */
#scroll-indicator {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ruler {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    position: relative;
    padding-right: 10px;
}

.ruler-line {
    position: absolute;
    right: 0;
    top: -20px;
    width: 1px;
    height: calc(100% + 40px);
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.ruler-mark {
    width: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ruler-mark:nth-child(5n) {
    width: 15px;
    background: rgba(255, 255, 255, 0.4);
}

.ruler-mark.active {
    width: 35px;
    background: var(--text-color);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Dark state for white background */
#scroll-indicator.dark .ruler-mark {
    background: rgba(0, 0, 0, 0.2);
}

#scroll-indicator.dark .ruler-mark:nth-child(5n) {
    background: rgba(0, 0, 0, 0.4);
}

#scroll-indicator.dark .ruler-mark.active {
    background: #000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

#scroll-indicator.dark .ruler-line {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1), transparent);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    right: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.7rem;
    letter-spacing: 3px;
    opacity: 0;
    transform: translateY(20px);
}

.mouse {
    width: 20px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 5px;
    background: var(--text-color);
    border-radius: 2px;
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 10px);
        opacity: 0;
    }
}

/* Spacer for scrolling */
.spacer {
    height: 100vh;
}

@media (max-width: 768px) {
    h1 {
        font-size: 4rem;
    }
    .nav-links {
        display: none;
    }
    .bottom-info {
        gap: 30px;
        left: 30px;
    }
    #scroll-indicator {
        right: 20px;
    }
}

/* Configurator Section - Editorial Layout */
#configurator {
    position: relative;
    width: 100%;
    height: 100vh; /* Changed from min-height to fixed height */
    background: #fdfdfd;
    color: #000000;
    padding: 30px 50px;
    z-index: 5;
    display: flex;
    flex-direction: column;
}

.config-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px; /* Reduced */
}

.back-link {
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
}

.top-links {
    display: flex;
    gap: 30px;
}

.top-links a {
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.top-links a:hover {
    opacity: 1;
}

.config-layout {
    display: flex;
    flex-grow: 1;
    position: relative;
}

/* Sidebar */
.model-sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #eee;
    padding-right: 40px;
}

.sidebar-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.side-arrow {
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.3s;
}

.side-arrow:hover {
    color: #000;
}

.sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.side-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    opacity: 0.2; /* Slightly more visible base state */
    transition: all 0.4s;
    transform: translateX(0);
}

.side-item.active {
    opacity: 1;
    transform: translateX(10px);
}

.side-item .year {
    font-size: 0.8rem; /* Increased */
    font-weight: 700;
    margin-bottom: 2px;
}

.side-item .name {
    font-size: 1rem; /* Increased */
    font-weight: 600;
    line-height: 1.2;
}

/* Display Area */
.display-area {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0; /* Allow shrinking */
}

.bg-text {
    position: absolute;
    top: 45%; /* Slightly higher */
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22vw; /* Slightly smaller */
    font-weight: 900;
    color: #f3f3f3;
    z-index: 1;
    pointer-events: none;
    letter-spacing: -1vw;
}

.car-stage {
    position: relative;
    z-index: 2;
    width: 75%; /* Slightly smaller car to fit header */
    display: flex;
    justify-content: center;
}

.shadow-floor {
    position: absolute;
    bottom: 20px;
    width: 80%;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.config-car {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.05));
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.config-car.active {
    opacity: 1;
    transform: translateX(0);
}

.model-header {
    position: absolute;
    bottom: 20px; /* Reduced */
    left: 40px; /* Adjusted */
    z-index: 3;
}

.model-header .model-name {
    font-size: 3rem; /* Increased but better placed */
    font-weight: 900;
    margin: 0;
    line-height: 1;
}

/* Footer Stats Bar */
.config-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px; /* Reduced */
    border-top: 1px solid #eee;
    margin-top: 20px; /* Reduced */
}

.price-box {
    width: 250px;
}

.price {
    font-size: 2rem;
    font-weight: 700;
}

.price-sub {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

.stats-grid {
    display: flex;
    gap: 60px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 5px;
}

.stat .value {
    font-size: 1rem;
    font-weight: 600;
}

.footer-btns {
    display: flex;
}

.btn-specs, .btn-contact {
    padding: 20px 40px;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-specs {
    background: #f5f5f5;
    color: #000;
}

.btn-contact {
    background: #4a5559;
    color: #fff;
}

.btn-contact:hover {
    background: #000;
}

@media (max-width: 1024px) {
    .config-footer {
        flex-direction: column;
        gap: 30px;
        align-items: flex-start;
    }
    .stats-grid {
        gap: 30px;
        flex-wrap: wrap;
    }
    .model-sidebar {
        display: none;
    }
}

/* Drive Cinematic Slider */
#drive-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    z-index: 5;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.drive-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Push to bottom */
    padding-bottom: 10vh; /* Consistent spacing from bottom */
}

.drive-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Gradient for legibility */
.slide-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    z-index: 2;
    pointer-events: none;
}

.drive-slide[data-theme="dark"] .slide-image-container::after {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
}

.drive-slide[data-theme="light"] .slide-image-container::after {
    background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 40%, transparent 100%);
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
}

.drive-slide.active .slide-img {
    animation: slideZoom 20s linear infinite alternate;
}

@keyframes slideZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

.slide-content {
    position: relative;
    z-index: 3; /* Above gradient */
    max-width: 800px;
    text-align: center;
    padding: 20px;
}

/* Theme Handling */
.drive-slide[data-theme="dark"] .slide-title { color: #fff; }
.drive-slide[data-theme="dark"] .slide-text { color: rgba(255, 255, 255, 0.7); }

.drive-slide[data-theme="light"] .slide-title { color: #000; }
.drive-slide[data-theme="light"] .slide-text { color: rgba(0, 0, 0, 0.7); }
.drive-slide[data-theme="light"] { background: #fff; }

.slide-title {
    font-size: 5rem; /* Matches requested larger style */
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1;
}

.slide-text {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500; /* Slightly bolder for legibility */
    max-width: 700px;
    margin: 0 auto;
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 10%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 100px;
    z-index: 10;
}

.slider-arrow {
    width: 60px;
    height: 60px;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: scale(1.1);
}

/* Adaptive arrows based on slide theme */
#drive-slider:has(.drive-slide.active[data-theme="light"]) .slider-arrow {
    border-color: rgba(0, 0, 0, 0.1);
    color: #000;
}

#drive-slider:has(.drive-slide.active[data-theme="light"]) .slider-arrow:hover {
    background: #000;
    color: #fff;
}