@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Inter:wght@300;400;500;700&display=swap');

:root {
    --text-main: #1e293b;
    --text-light: #64748b;
    --primary: #2563eb;
    --accent: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    --blur: blur(20px);
    --radius: 24px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: #f8fafc;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* --- ВАУ-ЭФФЕКТ: АВРОРА ФОН --- */
.aurora-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -1; overflow: hidden; background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}
.blob {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.blob-1 { width: 600px; height: 600px; background: #bfdbfe; top: -10%; left: -10%; animation-duration: 25s; }
.blob-2 { width: 500px; height: 500px; background: #ddd6fe; bottom: -10%; right: -5%; animation-duration: 30s; animation-delay: -5s; }
.blob-3 { width: 400px; height: 400px; background: #fef3c7; top: 40%; left: 30%; animation-duration: 35s; opacity: 0.4; animation-delay: -10s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, -40px) scale(1.1); }
}

/* --- ТИПОГРАФИКА --- */
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: #0f172a; }
h1 { font-size: 3.5rem; line-height: 1.2; letter-spacing: -1px; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; position: relative; }
h2 span { background: linear-gradient(120deg, var(--primary), #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
section { padding: 5rem 0; }

/* --- GLASSMORPHISM --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
}
.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.85);
}

/* --- HERO --- */
.hero { min-height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 80px; }
.hero-content { max-width: 900px; margin: 0 auto; }
.stat-row { display: flex; justify-content: center; gap: 2rem; margin-top: 3rem; flex-wrap: wrap; }
.stat-item { flex: 1; min-width: 150px; background: white; padding: 1.5rem; border-radius: 16px; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.stat-num { font-size: 2.5rem; font-weight: 800; color: var(--primary); display: block; line-height: 1; margin-bottom: 5px; }

/* --- UI ELEMENTS --- */
.form-control {
    width: 100%; padding: 14px 20px; border: 1px solid #cbd5e1; border-radius: 12px;
    font-size: 1rem; transition: 0.3s; background: white; margin-bottom: 1rem;
}
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); }

/* Единый стиль для всех кнопок */
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
    text-align: center;
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}
.btn-icon { margin-right: 8px; }

/* --- КАРТА --- */
.search-bar {
    display: flex; gap: 10px; background: white; padding: 10px; border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); margin-bottom: 1.5rem; align-items: center;
}
.search-input { flex-grow: 1; border: none; padding: 12px; font-size: 1rem; outline: none; }
.divider { width: 1px; height: 30px; background: #e2e8f0; }
.btn-search { width: auto; padding: 12px 30px; margin: 0; }

.route-stats {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem;
    display: none; animation: slideDown 0.5s ease;
}
.stat-pill {
    background: white; padding: 15px; border-radius: 12px; text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

/* --- ВИДЕО --- */
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.video-frame { border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; background: #000; box-shadow: 0 15px 30px rgba(0,0,0,0.15); }
video { width: 100%; height: 100%; object-fit: cover; }

/* --- ГРУЗЫ --- */
.cargo-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 2rem; }
.cargo-card { display: flex; flex-direction: column; height: 100%; padding: 0; }
.cargo-img { height: 220px; width: 100%; object-fit: cover; }
.cargo-body { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.specs-list { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.05); }
.specs-row { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 5px; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 10px; }
.bg-green { background: #dcfce7; color: #15803d; }
.bg-yellow { background: #fef9c3; color: #a16207; }
.bg-red { background: #fee2e2; color: #b91c1c; }

/* --- ИНТЕРАКТИВ --- */
.trailer-interactive { position: relative; display: inline-block; margin: 0 auto; }
.hotspot {
    position: absolute; width: 28px; height: 28px; background: var(--primary);
    border: 3px solid white; border-radius: 50%; cursor: pointer;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4); animation: pulse 2s infinite; z-index: 10;
}
.tooltip {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: #1e293b; color: white; padding: 12px 16px; border-radius: 12px;
    width: 220px; font-size: 0.9rem; text-align: center;
    opacity: 0; visibility: hidden; transition: 0.3s; pointer-events: none; z-index: 20;
}
.tooltip::after { content: ''; position: absolute; bottom: -5px; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #1e293b transparent transparent transparent; }
.hotspot:hover + .tooltip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }

/* --- КАЛЬКУЛЯТОР --- */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.calc-result { text-align: center; padding: 2rem; background: #f1f5f9; border-radius: 16px; margin-top: 2rem; display: none; }

/* --- ЧЕК-ЛИСТЫ --- */
.checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.check-card { display: flex; align-items: center; padding: 1rem; background: rgba(255,255,255,0.6); border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: 0.2s; }
.check-card:hover { background: white; }
.checkbox-ring { width: 26px; height: 26px; border: 2px solid #cbd5e1; border-radius: 50%; margin-right: 15px; display: flex; align-items: center; justify-content: center; }
.check-card.checked .checkbox-ring { border-color: var(--primary); background: var(--primary); }
.check-card.checked .checkbox-ring::after { content: '✓'; color: white; font-size: 14px; font-weight: bold; }

/* --- FOOTER --- */
footer { background: white; padding: 4rem 0 2rem; margin-top: 6rem; border-top: 1px solid #e2e8f0; }
.footer-row { display: flex; justify-content: space-between; align-items: center; }
.dev-badge { background: #eff6ff; color: var(--primary); padding: 5px 12px; border-radius: 20px; font-weight: 600; font-size: 0.85rem; margin-left: 5px; }

/* --- АДАПТИВ --- */
@media (max-width: 1024px) {
    h1 { font-size: 2.5rem; }
    .video-grid, .checklist-grid, .calc-grid, .search-bar { grid-template-columns: 1fr; flex-direction: column; }
    .hero { padding-top: 6rem; height: auto; min-height: 90vh; }
    .stat-row { flex-direction: column; }
    .footer-row { flex-direction: column; gap: 2rem; text-align: center; }
    .divider { display: none; }
    .btn-search { width: 100%; margin-top: 10px; }
}

/* Анимации */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   СТИЛИ ДЛЯ ТЕСТА (ОПРОСНИКА) - ИСПРАВЛЕННАЯ ВЕРСИЯ
   ========================================================================== */

.quiz-options-grid {
    display: grid;
    gap: 1rem;
}

/* Обычная кнопка (не выбрана) */
.quiz-btn {
    width: 100%;
    padding: 16px 20px;
    background: white; /* Белый фон */
    border: 1px solid #cbd5e1; /* Серый бордюр */
    border-radius: 12px;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-main); /* Темный текст */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* Ховер эффект */
.quiz-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: #eff6ff; /* Светло-голубой */
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

/* === СОСТОЯНИЕ: ВЫБРАНО (АКТИВНАЯ КНОПКА) === */
.quiz-btn.selected {
    background-color: #2563eb !important; /* Ярко-синий */
    border-color: #1d4ed8 !important;
    color: #ffffff !important; /* Белый текст */
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transform: translateX(5px);
}

/* Правильный ответ */
.quiz-btn.correct {
    background-color: #dcfce7 !important; /* Светло-зеленый */
    border-color: #16a34a !important;
    color: #15803d !important; /* Темно-зеленый текст */
    font-weight: 600;
}

/* Неправильный ответ */
.quiz-btn.wrong {
    background-color: #fee2e2 !important; /* Светло-красный */
    border-color: #dc2626 !important;
    color: #991b1b !important; /* Темно-красный текст */
    opacity: 0.8;
}

/* Отключенная кнопка */
.quiz-btn:disabled {
    cursor: default;
}

/* Кнопка "Проверить ответ" */
#check-btn {
    margin-top: 20px;
    padding: 14px 35px;
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-block;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}
#check-btn:hover {
    background: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.4);
}

@media (max-width: 768px) {
    .quiz-options-grid { grid-template-columns: 1fr; }
}