:root {
    --bg: #0b0e14;
    --surface: #161b22;
    --surface-light: #1c2128;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --success: #238636;
    --warning: #d29922;
    --error: #f85149;
    
    /* Текст */
    --text-main: #f0f6fc;
    --text-dim: #8b949e;
    --text-dark: #484f58;
    
    /* Интерфейс */
    --border: #30363d;
    --radius-s: 8px;
    --radius-m: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1200px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. ТИПОГРАФИКА */
h1, h2, h3 { 
    font-weight: 800; 
    letter-spacing: -0.03em; 
    line-height: 1.2; 
}

h1 { font-size: clamp(2rem, 7vw, 4rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); margin-bottom: 30px; }

.text-gradient {
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 3. НАВИГАЦИЯ (Адаптированная) */
header {
    height: 70px;
    background: rgba(11, 14, 20, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--text-main);
}

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

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: var(--transition);
}

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

/* 4. КНОПКИ */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-s);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface); border-color: var(--text-dim); }

.hero {
    position: relative; /* Обязательно для позиционирования фона */
    overflow: hidden;
    color: var(--text-main);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Настройки изображения */
    background-image: url("/src/bg.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    
    /* Прозрачность (0.1 - почти прозрачный, 0.9 - почти нет) */
    opacity: 0.2; 
    
    z-index: -1; /* Уводим на задний план, чтобы текст был сверху */
}

.hero p {
    color: var(--text-dim);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 20px auto 40px;
}

/* 6. КАРТОЧКИ (Grid-система) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    padding: 24px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: var(--surface-light);
}

.progress-container {
    height: 6px;
    background: var(--bg);
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    transition: width 1s ease-in-out;
}

.badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.window-frame {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: var(--radius-m);
    overflow: hidden;
    margin: 40px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.window-header {
    background: #161b22;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.window-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.window-title { margin-left: 20px; color: var(--text-dim); font-size: 0.8rem; font-family: monospace; }

.window-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.code-editor {
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    background: #0d1117;
    overflow-x: auto;
}

.output-area {
    background: #080a0f;
    padding: 20px;
    border-left: 1px solid var(--border);
    font-family: monospace;
    font-size: 14px;
}

/* 9. ROADMAP (Путь обучения) */
.roadmap {
    max-width: 800px;
    margin: 50px auto;
}

.node {
    display: flex;
    gap: 30px;
    padding-bottom: 50px;
    position: relative;
}

.node:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px; top: 50px;
    width: 2px; height: calc(100% - 50px);
    background: var(--border);
}

.node-icon {
    width: 52px; height: 52px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800;
    z-index: 2;
    flex-shrink: 0;
}

.node.current .node-icon {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.node.completed .node-icon {
    border-color: var(--success);
    color: var(--success);
}

@media (max-width: 992px) {
    .window-body {
        grid-template-columns: 1fr; /* Код и результат друг под другом */
    }
    .output-area {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Скрываем меню для будущего гамбургера */
    
    .hero { padding: 50px 0; }
    
    .hero div[style*="flex"] {
        flex-direction: column;
        gap: 12px;
    }

    .btn { width: 100%; }

    .node { gap: 15px; }
    
    .node-icon {
        width: 40px; height: 40px;
        font-size: 0.8rem;
    }
    
    .node:not(:last-child)::after { left: 19px; }
}

@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr; }
    
    h1 { font-size: 2.2rem; }
    
    .card { padding: 20px; }
}


.animate {
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}
