:root {
    --bg-color: #0b1320;
    --primary-color: #fbd301;
    --primary-hover: #e0bc00;
    --text-color: #ffffff;
    --accent-blue: #37bcf8;
    --card-bg: #142238;
}

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

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

h1, h2, h3, .pixel-font {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000;
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    border: 4px solid #fff;
    box-shadow: 4px 4px 0px #000;
    transition: transform 0.1s, box-shadow 0.1s;
    cursor: pointer;
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px #000;
}

.btn-small { padding: 10px 15px; font-size: 10px; }
.btn-large { padding: 15px 30px; font-size: 14px; }

/* Шапка */
.header {
    background-color: rgba(11, 19, 32, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--accent-blue);
    backdrop-filter: blur(5px); /* Легкое размытие фона */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo img { height: 60px; }

/* Главный экран */
.hero {
    padding: 80px 0;
    background-image: radial-gradient(circle at center, #1a2a44 0%, var(--bg-color) 70%);
    text-align: center; /* Центрируем весь текст, так как картинки больше нет */
}

.hero-content {
    max-width: 850px;
    margin: 0 auto; /* Центрируем сам блок по середине экрана */
}

.hero h1 {
    color: var(--primary-color);
    font-size: 32px; /* Сделали заголовок чуть больше */
    line-height: 1.5;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 #000;
}

/* Первый подзаголовок (Белый, яркий) */
.subtitle-main {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Второй подзаголовок (Голубой акцент) */
.subtitle-sub {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 40px;
}

.features {
    display: flex;
    justify-content: center; /* Центрируем плашки цены и сроков */
    gap: 30px;
    margin-bottom: 40px;
}

.feature-item {
    background: var(--card-bg);
    padding: 15px 30px;
    border: 2px solid var(--accent-blue);
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(55, 188, 248, 0.15); /* Добавили легкое свечение плашкам */
}

.pixel-icon { font-size: 24px; margin-right: 10px; }
/* Демо игра */
.demo { padding: 60px 0; background-color: var(--bg-color); }
.demo h2 { text-align: center; font-size: 22px; margin-bottom: 15px; color: var(--accent-blue); }
.text-center { text-align: center; margin-bottom: 30px; color: #aaa; }

.iframe-wrapper {
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border: 8px solid var(--accent-blue);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(55, 188, 248, 0.3);
    overflow: hidden;
    background: #000; /* Черный фон пока грузится игра */
}
.iframe-wrapper iframe { width: 100%; height: 100%; display: block; }

/* Шаги работы */
.steps { padding: 60px 0; }
.steps h2 { text-align: center; margin-bottom: 50px; font-size: 22px; }
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.step-card {
    background: var(--card-bg);
    padding: 30px;
    border: 2px dashed var(--accent-blue);
    text-align: center;
    position: relative;
}
.step-number {
    background: var(--primary-color);
    color: #000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', cursive;
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid #fff;
}
.step-card h3 { font-size: 12px; margin: 20px 0 15px; color: var(--primary-color); }

/* Анимация бегущего персонажа (Трасса) */
.running-track {
    width: 100%;
    height: 120px;
    position: relative;
    border-bottom: 4px solid var(--accent-blue); /* Земля */
    background: linear-gradient(to bottom, transparent, rgba(55, 188, 248, 0.1));
    overflow: hidden;
}

/* Сам бегун */
.runner {
    width: 120px; /* Размер кадра */
    height: 120px;
    position: absolute;
    bottom: 0;
    left: -150px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom center;
    image-rendering: pixelated; /* Четкие пиксели */
    /* move-right - двигает по экрану (10 сек). run-cycle - перебирает кадры (0.5 сек) */
    animation: move-right 8s linear infinite, run-cycle 0.5s step-end infinite;
}

@keyframes move-right {
    0% { left: -150px; }
    100% { left: 110%; }
}

/* Перебор 4-х кадров для анимации бега */
@keyframes run-cycle {
    0%   { background-image: url('run1.png'); }
    25%  { background-image: url('run2.png'); }
    50%  { background-image: url('run3.png'); }
    75%  { background-image: url('run4.png'); }
    100% { background-image: url('run1.png'); }
}


/* Подвал и Форма */
.footer {
    padding: 60px 0 30px;
    background: #070d16;
}
.form-block { max-width: 500px; margin: 0 auto 50px; text-align: center; }
.form-block h2 { font-size: 20px; margin-bottom: 15px; }
.form-block p { margin-bottom: 30px; }
.input-group { margin-bottom: 20px; }
.input-group input {
    width: 100%;
    padding: 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    background: var(--card-bg);
    border: 2px solid var(--accent-blue);
    color: #fff;
    outline: none;
}
.input-group input:focus { border-color: var(--primary-color); }
.btn-submit { width: 100%; border: none; }
.privacy-text { font-size: 12px; color: #666; margin-top: 15px; }
.copyright { text-align: center; font-size: 14px; color: #888; border-top: 1px solid #1a2a44; padding-top: 20px; }
.form-message { margin-top: 15px; font-weight: bold; }
.success { color: #4ade80; }
.error { color: #f87171; }

/* === АДАПТИВНОСТЬ (МОБИЛЬНАЯ ВЕРСИЯ) === */
@media (max-width: 768px) {
    /* 1. Отключаем прилипание шапки */
    .header {
        position: static; 
    }
    .header-container { flex-direction: column; height: auto; padding: 15px 0; gap: 15px;}
    
       /* 2. Адаптив главного экрана */
    .hero { padding: 50px 0; }
    .hero h1 { font-size: 22px; }
    .subtitle-main { font-size: 18px; }
    .subtitle-sub { font-size: 16px; }
    .features { flex-direction: column; gap: 15px; align-items: center; }
    
    /* Уменьшаем стоящего персонажа на телефонах */
    .pixel-char-stand { height: 250px; }

    /* Вертикальная игра на мобилках */
    .iframe-wrapper { aspect-ratio: 9 / 16; } 
}