/* ============================================
   CSS VARIABLES - THEME SYSTEM
   ============================================ */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1a1a24;
    --text-primary: #ffffff;
    --text-secondary: #b4b4c8;
    --text-muted: #6e6e8f;
    --accent-primary: #ff6b35;
    --accent-secondary: #ffa500;
    --accent-glow: rgba(255, 107, 53, 0.3);
    --glass-bg: rgba(26, 26, 36, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ffa500 100%);
    --gradient-hero: linear-gradient(180deg, rgba(10, 10, 15, 0.3) 0%, rgba(10, 10, 15, 0.9) 100%);
}

[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ed;
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --text-muted: #86868b;
    --accent-primary: #ff6b35;
    --accent-secondary: #ff8c42;
    --accent-glow: rgba(255, 107, 53, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    --gradient-hero: linear-gradient(180deg, rgba(245, 245, 247, 0.3) 0%, rgba(245, 245, 247, 0.9) 100%);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent-glow);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.sun-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="light"] .moon-icon {
    display: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 20px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 165, 0, 0.15) 0%, transparent 50%),
        var(--bg-primary);
    z-index: 1;
}

.hero-background::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

/* Car Eyes Animation */
.car-eyes-container {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.car-eyes {
    display: flex;
    gap: 120px;
    perspective: 1000px;
}

.eye {
    width: 100px;
    height: 80px;
    position: relative;
    animation: blink 4s infinite;
}

.headlight {
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--accent-secondary) 0%, var(--accent-primary) 50%, transparent 70%);
    border-radius: 50% 50% 40% 40%;
    position: relative;
    box-shadow: 
        0 0 40px var(--accent-glow),
        0 0 80px var(--accent-glow),
        inset 0 -10px 20px rgba(0, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

.light-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #fff 0%, var(--accent-secondary) 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px #fff;
}

.light-beam {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 300px;
    background: linear-gradient(to bottom, var(--accent-glow) 0%, transparent 100%);
    clip-path: polygon(30% 0%, 70% 0%, 100% 100%, 0% 100%);
    opacity: 0.6;
    animation: beamPulse 2s ease-in-out infinite alternate;
}

@keyframes blink {
    0%, 45%, 55%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(0.1);
    }
}

@keyframes glow {
    from {
        filter: brightness(1);
    }
    to {
        filter: brightness(1.3);
    }
}

@keyframes beamPulse {
    from {
        opacity: 0.4;
    }
    to {
        opacity: 0.7;
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 900px;
    padding: 0 40px;
    margin-top: 200px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.title-line {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out;
}

.title-subtitle {
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 300;
    color: var(--text-secondary);
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-description {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s backwards;
    box-shadow: 0 10px 30px var(--accent-glow);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px var(--accent-glow);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.cta-button:hover .arrow-icon {
    transform: translateX(5px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: fadeInUp 1s ease-out 0.8s backwards;
}

.scroll-mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% {
        top: 10px;
        opacity: 1;
    }
    50% {
        top: 25px;
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   COLLECTIONS SECTION
   ============================================ */
.collections {
    padding: 120px 40px;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
}

.collections-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.collection-card {
    position: relative;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
}

.collection-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 1;
    transition: opacity 0.4s ease;
}

.collection-card:hover::before {
    opacity: 0.7;
}

.collection-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow-color);
}

.collection-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 2;
}

.collection-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.collection-count {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.view-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.collection-card:hover .view-button {
    background: var(--gradient-primary);
    border-color: transparent;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow-y: auto;
    z-index: 2001;
    animation: slideUp 0.4s ease;
    border: 1px solid var(--glass-border);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2002;
}

.modal-close:hover {
    background: var(--accent-primary);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.modal-body {
    padding: 60px 40px 40px;
}

.modal-header {
    margin-bottom: 40px;
}

.modal-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.vehicle-card {
    background: var(--bg-tertiary);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--accent-primary);
}

.vehicle-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.vehicle-year {
    font-size: 14px;
    color: var(--accent-primary);
    margin-bottom: 12px;
}

.vehicle-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spec-item {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.spec-item::before {
    content: '•';
    color: var(--accent-primary);
    font-weight: bold;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    padding: 120px 40px;
    background: var(--bg-primary);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-card {
    padding: 40px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
    border-color: var(--accent-primary);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    padding: 40px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        gap: 20px;
    }
    
    .car-eyes {
        gap: 60px;
        transform: scale(0.7);
    }
    
    .hero-content {
        margin-top: 150px;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .collections,
    .about {
        padding: 80px 20px;
    }
    
    .modal-body {
        padding: 40px 20px 20px;
    }
}
