/* --- ОСНОВНЫЕ НАСТРОЙКИ --- */
:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent: #6e44ff;
    --accent-glow: rgba(110, 68, 255, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-hover: rgba(255, 255, 255, 0.08);
}

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}

/* --- ФОН (ЧАСТИЦЫ) --- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* --- НАВИГАЦИЯ --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 450px;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 10px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.logo {
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    padding-right: 24px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-app {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-app:hover {
    transform: scale(1.05);
}

.btn-qr {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--glass-border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.btn-qr:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.btn-qr::after {
    content: "Приложение на телефоне";
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    pointer-events: none;
}

.btn-qr:hover::after {
    opacity: 1;
    visibility: visible;
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 100px;
    position: relative;
}

.hero h1 {
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 30px;
    background: linear-gradient(to bottom right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 1000px;
    margin-bottom: 40px;
}

.hero-btn-main {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(110, 68, 255, 0.2),
        -2px -2px 10px rgba(255, 255, 255, 0.1),
        2px 2px 10px rgba(110, 68, 255, 0.1),
        -1px -1px 5px rgba(255, 255, 255, 0.05),
        1px 1px 5px rgba(110, 68, 255, 0.05),
        inset 0 0 20px rgba(110, 68, 255, 0.1);
    color: white;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    cursor: pointer;
}

.hero-btn-main::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    z-index: -1;
    transition: all 0.3s ease;
}

.hero-btn-main::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(110, 68, 255, 0.05) 100%
    );
    border-radius: 50px;
    z-index: -1;
    transition: all 0.3s ease;
}

.hero-btn-main:hover {
    transform: translateY(-3px);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(110, 68, 255, 0.5),
        -4px -4px 15px rgba(255, 255, 255, 0.15),
        4px 4px 15px rgba(110, 68, 255, 0.15),
        -2px -2px 8px rgba(255, 255, 255, 0.08),
        2px 2px 8px rgba(110, 68, 255, 0.08),
        inset 0 0 30px rgba(110, 68, 255, 0.3);
}

.hero-btn-main:hover::before {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.4);
}

.hero-btn-main:hover::after {
    background: linear-gradient(
        135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(110, 68, 255, 0.1) 100%
    );
}

.hero-btn-main:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
}

/* --- GAME JOURNEY --- */
.journey-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-header h2 {
    font-size: 80px;
    letter-spacing: 0px;
    margin-bottom: 50px; 
    padding: 25px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: rgba(255, 255, 255, 0.1);
    top: 0; bottom: 0; left: 50%;
    margin-left: -2px; 
    border-radius: 2px;
    z-index: 0;
}

.timeline-progress {
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent) 0%, var(--accent) 80%, transparent 100%);
    top: 0; height: 0; left: 50%;
    margin-left: -2px;
    z-index: 0;
    transition: height 0.5s ease;
    box-shadow: 0 0 15px var(--accent-glow);
    border-radius: 2px;
    overflow: hidden;
}

.timeline-progress::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    transform: translateY(-100%);
    animation: flowLight 2s infinite linear;
}

@keyframes flowLight {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* --- 1. КОНТЕЙНЕР (ДВИЖЕНИЕ) --- */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    
    opacity: 0;
    transform: translateY(30px);
    
    /* Движение элемента */
    transition: opacity 0.8s ease, transform 0.8s ease;
    
    z-index: 1;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #000; 
    border: 2px solid rgba(110, 68, 255, 0.3);
    border-radius: 50%;
    z-index: 10;
    top: 50%;
    margin-top: -10px; 
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0 4px #000; 
}

.timeline-item:nth-child(odd)::after { right: -12px; }
.timeline-item:nth-child(even)::after { left: -12px; }

.timeline-item.visible::after {
    background: #fff;
    border-color: #fff;
    box-shadow: 
        0 0 0 4px rgba(110, 68, 255, 0.3),
        0 0 20px var(--accent),
        0 0 40px var(--accent);
    transform: scale(0.5);
}

/* --- 2. КАРТОЧКА (РАМКА) --- */
.journey-card {
    padding: 30px;
    
    /* Фон прозрачный, он будет в псевдо-элементе */
    background: transparent; 
    
    /* Рамка */
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    
    position: relative;
    display: inline-block;
    max-width: 100%;
    
    /* Обрезаем блюр по краям */
    overflow: hidden;
    
    /* Включаем GPU композицию */
    transform: translateZ(0);
    
    transition: transform 0.3s, border-color 0.3s;
    z-index: 1; 
}

/* --- 3. СЛОЙ БЛЮРА (СТЕКЛО) --- */
.journey-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    
    /* ЦВЕТ + БЛЮР (ФИКСИРОВАННЫЙ) */
    /* Мы задаем 4px сразу. Браузер подготовит этот эффект заранее. */
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    
    /* Слой скрыт (но эффект уже "заряжен") */
    opacity: 0; 
    
    /* Подсказка браузеру */
    will-change: opacity;
    
    /* АНИМИРУЕМ ТОЛЬКО ПРОЗРАЧНОСТЬ */
    /* Используем ease-out, чтобы в конце не было замедления, похожего на рывок */
    transition: opacity 3.2s ease-out;
}

/* При появлении родителя плавно проявляем уже готовый блюр */
.timeline-item.visible .journey-card::before {
    opacity: 1;
}

.journey-card:hover {
    border-color: rgba(255,255,255,0.4);
    transform: scale(1.02);
}

.journey-step-num {
    font-size: 14px;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.journey-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.journey-desc {
    color: var(--text-muted);
    font-size: 15px;
}

/* --- OVERLAP SECTIONS --- */
.overlap-section {
    margin-bottom: 150px;
    position: relative;
    z-index: 1;
}

.big-bg-title {
    font-size: 180px;
    font-weight: 900;
    text-align: center;
    color: rgba(255, 255, 255, 0.6); 
    letter-spacing: -5px;
    line-height: 1;
    position: relative;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0.6));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glass-cards-container {
    max-width: 1100px;
    margin: -30px auto 0;
    position: relative;
    z-index: 2;
    display: flex;
    gap: 30px;
    padding: 0 20px;
}

.pricing-card {
    flex: 1;
    background: rgba(20, 20, 20, 0); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    z-index: -1;
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.pricing-card.featured {
    background: rgba(20, 20, 20, 0.1);
    border-color: rgba(110, 68, 255, 0.3);
}

.pricing-card.featured:hover {
     border-color: var(--accent);
     box-shadow: 0 0 30px rgba(110, 68, 255, 0.1);
}

.plan-name {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.plan-price {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 30px;
}

.plan-period {
    font-size: 26px;
    color: var(--text-muted);
    font-weight: 700;
}

.features-list {
    list-style: none;
    flex-grow: 1;
    margin-bottom: 30px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.icon-check {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    padding: 3px;
    width: 20px;
    height: 20px;
}

.card-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.card-btn:hover {
    background: rgba(255,255,255,0.1);
}

.card-btn.featured-btn {
    background: #fff;
    color: #000;
    border: none;
}

.card-btn.featured-btn:hover {
    background: rgba(255,255,255,0.9);
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: -30px auto 0;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.faq-item {
    background: rgba(20, 20, 20, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item:hover {
     border-color: rgba(255,255,255,0.3);
}

.faq-question {
    width: 100%;
    padding: 25px;
    background: none;
    border: none;
    text-align: left;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 25px 25px;
    color: var(--text-muted);
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
    animation: fadeDown 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent);
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER (БЕЗ БЛЮРА) --- */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
    background: #050505;
}

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

.footer h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 14px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: var(--accent);
}

/* --- MODAL QR --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.qr-card {
    background: #111;
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .qr-card {
     transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px; right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 968px) {
    .big-bg-title { font-size: 80px; margin-bottom: 35px; letter-spacing: -3px; }
    .hero h1 { font-size: 46px; letter-spacing: -2px; }
    .hero p { max-width: 600px; }
    .faq-container { margin-top: -30px; }

    .btn-qr { display: none; }

    /* Timeline Mobile */
    .timeline::after { left: 30px; margin-left: 0; }
    .timeline-progress { left: 30px; margin-left: 0; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    
    .timeline-item:nth-child(odd), 
    .timeline-item:nth-child(even) { 
        left: 0; 
        text-align: left; 
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 20px;
        right: auto;
    }

    /* Carousel */
    .glass-cards-container { 
        display: flex;
        flex-direction: row; 
        margin-top: -40px; 
        overflow-x: auto; 
        scroll-snap-type: x mandatory; 
        scroll-behavior: smooth;
        gap: 15px;
        padding: 10px 0 40px 0;
        align-items: stretch;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .glass-cards-container::-webkit-scrollbar {
        display: none;
    }

    .pricing-card {
        flex: 0 0 85%;
        width: 85%;
        scroll-snap-align: center;
        margin: 0; 
    }

    .glass-cards-container::before,
    .glass-cards-container::after {
        content: '';
        flex: 0 0 7.5%;
    }

    .carousel-pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-bottom: 20px;
        margin-top: -20px;
        pointer-events: none;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .carousel-dot.active {
        width: 24px;
        background-color: var(--accent);
        border-radius: 4px;
        box-shadow: 0 0 10px var(--accent-glow);
    }
    
    .pricing-card,
    .faq-item {
        /* Значение блюра для мобильных устройств */
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }
}

@media (max-width: 412px) {
    .btn-app { font-size: 12px; }
}

/* --- TILT JS FIXES --- */
.js-tilt-glare {
    border-radius: 24px;
}
.journey-card .js-tilt-glare {
    border-radius: 20px;
}
.pricing-card, .journey-card, .hero-btn-main {
    transform-style: preserve-3d;
}
.plan-name, .plan-price, .features-list, .card-btn,
.journey-step-num, .journey-title, .journey-desc {
    transform: translateZ(20px);
}
.featured-btn {
    transform: translateZ(30px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* --- TYPEWRITER EFFECT --- */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent);
    animation: blink 1s step-end infinite;
    margin-left: 5px;
    vertical-align: middle;
    height: 0.7em;
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.gradient-text {
    background: linear-gradient(to bottom right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}