/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --primary: #ff3b3b;
    --primary-dark: #cc0000;
    --primary-light: #ff6b6b;
    --secondary: #00d4ff;
    --secondary-dark: #0099cc;
    --dark: #0a0a0a;
    --darker: #050505;
    --gray: #1a1a1a;
    --gray-light: #2a2a2a;
    --text: #ffffff;
    --text-muted: #888888;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --gradient-1: linear-gradient(135deg, #ff3b3b, #ff6b6b);
    --gradient-2: linear-gradient(135deg, #00d4ff, #0099cc);
    --gradient-dark: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

@media (max-width: 768px) {
    body { cursor: auto; }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .cursor, .cursor-follower { display: none; }
}

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
}

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

.preloader-icon {
    font-size: 60px;
    animation: wrench 1.5s ease infinite;
}

@keyframes wrench {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.preloader-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    margin: 20px 0;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.preloader-progress {
    width: 200px;
    height: 2px;
    background: var(--gray);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--gradient-1);
    animation: progress 1.5s ease forwards;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-container { padding: 0 20px; }
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.logo-icon {
    font-size: 28px;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-text span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
}

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(30px);
        padding: 80px 30px;
        transition: right 0.4s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

@media (max-width: 992px) {
    .nav-links {
        flex-direction: column;
        gap: 20px;
    }
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover:before,
.nav-link.active:before {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-light);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    list-style: none;
}

@media (max-width: 992px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        background: transparent;
        padding-left: 20px;
        margin-top: 10px;
    }
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px);
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.dropdown-menu li a:hover {
    background: var(--glass);
    color: var(--primary-light);
    padding-left: 25px;
}

.engine-code {
    font-family: monospace;
    font-weight: 700;
    color: var(--secondary);
}

.nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    padding: 10px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    transition: var(--transition);
}

.nav-phone:hover {
    border-color: var(--primary);
    background: var(--glass);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .menu-toggle span {
        width: 25px;
        height: 2px;
        background: var(--text);
        transition: var(--transition);
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 14px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: none;
}

@media (max-width: 768px) {
    .btn { cursor: pointer; }
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--text);
    box-shadow: 0 4px 20px rgba(255, 59, 59, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 59, 59, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--glass);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 100px 0;
    position: relative;
}

.section-dark {
    background: var(--darker);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .section-container { padding: 0 20px; }
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 20px auto 0;
}

/* ============================================
   ENGINE CARDS
   ============================================ */
.engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.engine-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.engine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 59, 59, 0.1), transparent);
    transition: left 0.6s ease;
}

.engine-card:hover::before {
    left: 100%;
}

.engine-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
}

.engine-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.engine-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.engine-subtitle {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.engine-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.engine-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    background: var(--gray);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
}

.engine-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.engine-link:hover {
    gap: 12px;
    color: var(--primary);
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   ENGINE DETAIL PAGE
   ============================================ */
.engine-hero {
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--darker), var(--dark));
}

.breadcrumbs {
    margin-bottom: 30px;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.engine-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 10px;
}

.engine-code-header {
    display: inline-block;
    background: var(--gradient-1);
    padding: 4px 16px;
    border-radius: 50px;
    font-family: monospace;
    font-weight: 700;
    margin-bottom: 20px;
}

.engine-description {
    max-width: 800px;
    color: var(--text-muted);
    font-size: 18px;
}

.issues-section {
    background: rgba(255, 59, 59, 0.05);
    border-left: 4px solid var(--primary);
    padding: 30px;
    border-radius: 16px;
    margin: 40px 0;
}

.issues-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.issues-list {
    list-style: none;
}

.issues-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.issues-list li:before {
    content: '🔧';
    position: absolute;
    left: 0;
}

.cars-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--glass);
    border-radius: 16px;
    overflow: hidden;
}

.cars-table th {
    background: var(--gradient-1);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.cars-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--glass-border);
}

.cars-table tr:hover {
    background: var(--glass);
}

.price-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    margin: 40px 0;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.price-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--secondary);
}

.price-note {
    color: var(--text-muted);
    margin-top: 10px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 40px 0;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--darker);
    padding: 60px 0 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.to-top {
    width: 40px;
    height: 40px;
    background: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.to-top:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .cars-table { font-size: 12px; }
    .cars-table th, .cars-table td { padding: 8px; }
}
