:root {
    --bg-dark: #050505;
    --term-bg: rgba(5, 5, 5, 0.85);
    --primary: #ff0055;
    --accent: #00f0ff;
    --gold: #ffe600;
    --success: #00ff9f;
    --danger: #ff3333;
    --text-main: #ffffff;
    --text-muted: #888888;
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

/* --- ГЛОБАЛЬНЫЙ ФОН: КАРТИНКА + ОВЕРЛЕЙ --- */
body { 
    background-color: var(--bg-dark);
    /* Твоя картинка */
    background-image: linear-gradient(to bottom, rgba(5, 5, 5, 0.8) 0%, rgba(5, 5, 5, 0.17) 100%), url('/images/road_map.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main); 
    font-family: 'Rajdhani', sans-serif; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-x: hidden;
    position: relative;
}

/* Анимированная сетка поверх всего (CRT эффект) */
body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px; z-index: -1; pointer-events: none; animation: gridMove 30s linear infinite;
}

@keyframes gridMove { 0% { transform: translateY(0); } 100% { transform: translateY(30px); } }

/* NAV & FOOTER BLUR */
nav, footer { backdrop-filter: blur(10px); background: rgba(5,5,5,0.8) !important; border-color: rgba(0,240,255,0.15) !important; }

/* Стили навбара, чтобы не ломались (копия из прошлого шага) */
nav { height: 80px; padding: 0 40px; display: flex; justify-content: space-between; align-items: center; position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; border-bottom: 1px solid; }
.logo-small { height: 40px; cursor: pointer; filter: drop-shadow(0 0 5px var(--primary)); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-btn, .lang-current { --btn-color: var(--accent); font-family: 'Press Start 2P', cursive; font-size: 10px; cursor: pointer; text-transform: uppercase; text-decoration: none; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.nav-btn { background: transparent; border: 1px solid var(--btn-color); color: var(--btn-color); padding: 8px 25px; display: inline-flex; align-items: center; justify-content: center; }
.nav-btn:hover, .lang-current:hover { background: var(--btn-color); color: black; box-shadow: 0 0 20px var(--btn-color); }
.lang-dropdown { position: relative; }
.lang-current { background: transparent; border: 1px solid var(--btn-color); color: var(--btn-color); padding: 8px 15px; display: flex; align-items: center; gap: 10px; }
.lang-list { position: absolute; top: 110%; right: 0; background: #111; border: 1px solid var(--accent); display: none; flex-direction: column; width: 100px; z-index: 10000; box-shadow: 0 0 15px rgba(0, 240, 255, 0.3); }
.lang-list.show { display: flex; }
.lang-option { padding: 12px; color: var(--accent); cursor: pointer; text-align: center; border-bottom: 1px solid #222; font-family: 'Press Start 2P'; font-size: 10px; }
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: var(--accent); color: black; }

/* Заголовок в стиле Терминала */
.hero-banner { text-align: center; padding: 140px 20px 40px 20px; position: relative; z-index: 10;}
.hero-title { font-family: 'Press Start 2P', monospace; font-size: 26px; color: var(--gold); text-shadow: 0 0 10px var(--gold); margin-bottom: 10px; letter-spacing: 1px; }
.hero-title::before { content: "C:\\> "; color: var(--text-muted); text-shadow: none; }
.hero-subtitle { font-family: 'Press Start 2P', monospace; color: var(--accent); font-size: 11px; text-transform: uppercase; text-shadow: 0 0 5px var(--accent); opacity: 0.8;}

/* --- КОНТЕЙНЕР ДЕРЕВА --- */
.tree-container { position: relative; max-width: 960px; margin: 0 auto 80px; padding: 20px 20px 20px 70px; z-index: 10; flex: 1; background: var(--term-bg); border: 1px solid #1a1a1a; border-radius: 4px; box-shadow: inset 0 0 30px rgba(0,0,0,0.8); }

/* --- КРАСИВАЯ ПОЛОСКА СЛЕВА: АНИМИРОВАННЫЙ НЕОНОВЫЙ КАБЕЛЬ --- */
.tree-line { 
    position: absolute; 
    left: 45px; 
    top: 15px; 
    bottom: 15px; 
    width: 5px; 
    background: #111;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0,0,0,1);
}

/* Бегущий свет внутри кабеля */
.tree-line::after {
    content: "";
    position: absolute;
    top: -100px; left: 0; width: 100%; height: 200px;
    background: linear-gradient(to bottom, transparent 0%, var(--success) 30%, var(--gold) 60%, var(--primary) 90%, transparent 100%);
    animation: flowStream 6s linear infinite;
    filter: blur(1px);
}

@keyframes flowStream {
    0% { top: -200px; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Узел */
.tree-node { display: flex; align-items: flex-start; margin-bottom: 45px; position: relative; width: 100%; }
.tree-node:last-child { margin-bottom: 10px; }

/* Точка подключения к кабелю */
.node-dot { 
    position: absolute; 
    left: -32px; 
    top: 23px; 
    width: 18px; 
    height: 18px; 
    background: #000; 
    border: 3px solid var(--node-color, #333); 
    border-radius: 50%; 
    z-index: 3; 
    box-shadow: 0 0 10px var(--node-color, transparent); 
    transition: 0.3s; 
}
.tree-node.active .node-dot { animation: pulse-dot 2s infinite; background: var(--node-color); }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 8px var(--node-color); } 50% { box-shadow: 0 0 20px var(--node-color); } }

/* Карточка в стиле блока Терминала */
.node-content { 
    width: 100%; 
    background: rgba(0, 0, 0, 0.7); 
    border: 1px solid #222; 
    border-left: 3px solid var(--node-color, #333); 
    padding: 20px; 
    position: relative; 
    transition: 0.3s; 
    margin-left: 15px; 
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.tree-node:hover .node-content { border-color: var(--node-color, #333); background: rgba(0, 0, 0, 0.9); transform: translateX(3px); box-shadow: 0 0 15px rgba(0,240,255,0.1); }

/* Горизонтальная линия-коннектор */
.node-content::before { content: ''; position: absolute; top: 31px; left: -15px; width: 15px; height: 1px; background: #333; }
.tree-node:hover .node-content::before { background: var(--node-color); }

/* Заголовок блока */
.n-num { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--text-muted); margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1a1a1a; padding-bottom: 8px; }
.n-title { font-family: 'Press Start 2P', monospace; font-size: 14px; color: white; margin-bottom: 12px; line-height: 1.2; text-shadow: 0 0 5px rgba(255,255,255,0.4);}
.n-title::before { content: ">>> "; color: var(--node-color); }
.n-desc { font-family: 'Rajdhani', sans-serif; font-size: 15px; color: #b0b0b0; line-height: 1.5; margin-bottom: 0; font-weight: 500;}

/* 2 колонки */
.node-body-split { display: flex; gap: 25px; align-items: flex-start; }
.node-main-info { flex: 1.4; min-width: 0; }

/* Колонка функций */
.branches-box { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; border-left: 1px solid #1a1a1a; padding-left: 15px; }

.b-item { 
    display: flex; align-items: center; gap: 10px; font-size: 13px; font-family: 'Rajdhani', sans-serif; 
    color: #999; background: rgba(255,255,255,0.02); padding: 7px 10px; 
    border-left: 2px solid var(--b-color, #333); transition: 0.2s; 
    font-weight: 600;
}
.b-item:hover { background: rgba(0,240,255,0.05); color: white; border-color: var(--accent); }
.b-item i { color: var(--b-color, #333); font-size: 11px; min-width: 14px; text-align: center;}

@media (max-width: 850px) {
    .tree-container { padding: 15px 15px 15px 55px; margin: 0 10px 60px; }
    .tree-line { left: 30px; }
    .node-dot { left: -10px; top: 18px; width: 14px; height: 14px;}
    .node-content { margin-left: 15px; padding: 15px; }
    .node-content::before { top: 25px; left: -15px; width: 15px; }
    .node-body-split { flex-direction: column; gap: 15px; }
    .branches-box { border-left: none; border-top: 1px solid #1a1a1a; padding-left: 0; padding-top: 15px; width: 100%; min-width: 100%; }
}

/* FOOTER */
footer { position: relative; margin-top: auto; padding: 25px 0; text-align: center; background: transparent; border-top: 1px solid rgba(0, 240, 255, 0.1); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5); font-family: 'Rajdhani', sans-serif; overflow: hidden; z-index: 10; }
footer::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 300px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 15px var(--accent); }
.footer-content { display: flex; justify-content: center; align-items: center; gap: 15px; font-size: 12px; color: #666; letter-spacing: 1px; }
.footer-text { color: #888; text-transform: uppercase; font-weight: 600; }
.footer-sep { color: #444; }
.footer-copy { font-family: monospace; color: #555; }
.logo-switcher { position: relative; width: 36px; height: 14px; display: flex; align-items: center; justify-content: center; margin-left: 10px; }
.logo-state { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; }
.state-text { font-family: 'Press Start 2P', cursive; font-size: 14px; color: var(--accent); text-shadow: 0 0 10px var(--accent); animation: cycle-text 8s infinite; }
.state-text .white-u { color: white; text-shadow: 0 0 10px white; }
.state-bars { animation: cycle-bars 8s infinite; opacity: 0; }
.logo-illu-pro { display: inline-flex; flex-direction: column; align-items: center; position: relative; width: 24px; margin-bottom: 2px; }
.bars { display: flex; gap: 2px; align-items: flex-end; margin-bottom: -3px; z-index: 2; }
.bar { width: 3px; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: glitch-bar 2s infinite; }
.b1 { height: 10px; } .b2 { height: 6px; animation-delay: 0.2s; } .b3 { height: 12px; animation-delay: 0.1s; }
.base-u { font-family: 'Press Start 2P'; font-size: 10px; color: white; text-shadow: 0 0 5px white; line-height: 1; transform: scaleX(2.0); position: relative; z-index: 1; }
@keyframes cycle-text { 0%, 45% { opacity: 1; } 48%, 95% { opacity: 0; } 100% { opacity: 1; } }
@keyframes cycle-bars { 0%, 45% { opacity: 0; } 48%, 95% { opacity: 1; } 100% { opacity: 0; } }
@keyframes glitch-bar { 0%, 90%, 100% { transform: skewX(0); } 92% { transform: skewX(-20deg) scaleY(1.3); } 94% { transform: skewX(20deg); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes zoomIn { from {transform: scale(0.9); opacity: 0;} to {transform: scale(1); opacity: 1;} }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; } 
    .hero-right { display: none; }
    .feature-row { flex-direction: column !important; gap: 30px; text-align: center; margin-bottom: 60px; }
    .feature-terminal { width: 100%; height: 200px; }
    .hero-logo-img { width: 80%; }
    .info-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-content { flex-direction: column; gap: 8px; } .footer-sep { display: none; }
}