* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background-color: #050e05; /* Глубокий благородный темный фон */
    color: #33ff66;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px;
    position: relative;
}

/* МЯГКАЯ РЕТРО-СЕТКА ПИКСЕЛЕЙ ДЛЯ ЗАДНЕГО ПЛАНА (ШАГ 12px) */
body::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 255, 0, 0.02));
    z-index: 10;
    background-size: 100% 12px, 12px 100%;
    pointer-events: none;
}

/* ЭФФЕКТ МЕРЦАНИЯ ЭКРАНА СТАРОГО КИНЕСКОПА */
body::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    z-index: 11;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.15; }
    50% { opacity: 0.20; }
    100% { opacity: 0.15; }
}

/* АНИМАЦИЯ МЕДЛЕННО БЕГУЩЕЙ ЛИНИИ (10 СЕКУНД) */
@keyframes vline {
    0% { background-position: 0 -100vh; }
    100% { background-position: 0 100vh; }
}

/* ОБВЯЗКА ТЕРМИНАЛА, КОТОРАЯ СИНХРОННО ДЁРГАЕТСЯ ПРИ ГЛИТЧЕ */
.wrapper {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    animation: glitch 5s infinite steps(1); /* Встряхивает всё вместе с кнопками */
}

/* ==========================================================================
   2. СТИЛИ СТРОГО ДЛЯ ПК ДЕСТКТОПОВ (ЭКРАНЫ БОЛЬШЕ 480px)
   ========================================================================== */
@media screen and (min-width: 481px) {
    /* Смягчаем сетку пикселей только на ПК */
    body::before {
        content: " ";
        display: block;
        position: absolute;
        top: 0; left: 0; bottom: 0; right: 0;
        background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.08) 50%), 
                    linear-gradient(90deg, rgba(51, 255, 102, 0.005), rgba(0, 0, 0, 0), rgba(51, 255, 102, 0.005));
        z-index: 10;
        background-size: 100% 12px, 12px 100%;
        pointer-events: none;
    }

    /* Рамка карточки на ПК приглушена. ДОБАВЛЕНА СВЕХТОНКАЯ ШТРИХОВКА ТЕКСТА (background-image) */
    .card {
        background: #020702;
        border: 3px solid rgba(51, 255, 102, 0.4); 
        border-radius: 8px 0 8px 8px;
        padding: 30px;
        box-shadow: 0 0 20px rgba(51, 255, 102, 0.15), inset 0 0 15px rgba(51, 255, 102, 0.1); 
        position: relative;
        transition: opacity 0.08s ease;

        /* ТОНКИЕ СТРОКИ ТЕЛЕВИЗИОННОЙ РАЗВЁРТКИ ПРЯМО ПОВЕРХ ШРИФТА */
        background-image: linear-gradient(rgba(51, 255, 102, 0.018) 50%, rgba(0, 0, 0, 0.15) 50%);
        background-size: 100% 4px; /* Шаг развёртки всего 4px — аккуратно и атмосферно */
    }

    /* На ПК пускаем плавный бегущий луч по всему фону body */
    body::after {
        background: linear-gradient(to bottom, rgba(51,255,102,0) 0%, rgba(51,255,102,0.1) 10%, rgba(51,255,102,0) 20%);
        animation: flicker 0.15s infinite, vline 10s linear infinite;
    }

    /* Контейнер вкладок-ссылок вверху справа */
    .tabs-container {
        display: flex;
        justify-content: flex-end;
        margin-bottom: -3px; 
        z-index: 2;
        position: relative;
        padding-right: 5px;
    }

    /* Оформление SSI-ссылок под кнопки на ПК (Неактивные вкладки затушены) */
    .tab-link {
        background: #010401;
        color: #1a7733; 
        border: 3px solid rgba(51, 255, 102, 0.25); 
        border-bottom: none;
        padding: 8px 16px;
        font-size: 0.85rem;
        font-weight: bold;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-left: 5px;
        border-radius: 6px 6px 0 0;
        transition: all 0.2s ease;
        display: inline-block;
    }

    .tab-link:hover {
        color: #33ff66;
        background: rgba(51, 255, 102, 0.05);
        border-color: rgba(51, 255, 102, 0.5);
    }

    /* Активная вкладка на ПК горит ярко */
    .tab-link.active {
        background: #020702;
        color: #33ff66;
        border: 3px solid rgba(51, 255, 102, 0.4);
        border-bottom: 3px solid #020702;
        text-shadow: 0 0 8px rgba(51, 255, 102, 0.6);
    }

    /* Скрываем мобильные элементы на ПК */
    .mobile-menu-trigger, .mobile-navigation-overlay {
        display: none !important;
    }
}

/* ==========================================================================
   3. ВНУТРЕННИЕ СТРУКТУРНЫЕ ЭЛЕМЕНТЫ КАРТОЧКИ (ОБЩИЕ)
   ========================================================================== */
/* Тонкая пунктирная линия под именем */
.header-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px dashed rgba(51, 255, 102, 0.15); 
    padding-bottom: 20px;
    margin-bottom: 25px;
    gap: 15px;
}

.header-text { text-align: left; flex: 1; }
h1 { font-size: 1.3rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 0 8px rgba(51, 255, 102, 0.7); line-height: 1.3; }
.subtitle { font-size: 0.8rem; color: #22aa44; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }

/* 3D РОТАТОР КЛЕНОВОГО ЛИСТА (ЗАМЕДЛИЛИ ДО 30 СЕКУНД) */
.logo-container {
    perspective: 1000px; width: 100px; height: 100px; display: flex; justify-content: center; align-items: center; flex-shrink: 0;
}
.rotating-leaf { width: 100%; height: 100%; transform-style: preserve-3d; animation: rotate3d 30s linear infinite; }

@keyframes rotate3d { 
    0% { transform: rotateY(0deg); } 
    100% { transform: rotateY(360deg); } 
}

/* Настройка 3D-слоев для создания физического объема торца */
.leaf-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-style: preserve-3d; backface-visibility: visible;
    will-change: transform; transform: translateZ(0); 
}

/* Тонкие, приглушенные разделительные линии между строками данных */
.info-group { 
    margin-bottom: 20px; 
    text-align: left; 
    border-bottom: 2px solid rgba(51, 255, 102, 0.08); 
    padding-bottom: 10px; 
}
.info-group:last-child { border: none; }
.info-label { font-size: 0.75rem; color: #22aa44; text-transform: uppercase; margin-bottom: 4px; display: block; }
/*.info-value { font-size: 1.15rem; font-weight: bold; letter-spacing: 1.5px; text-shadow: 0 0 6px rgba(51, 255, 102, 0.5); line-height: 1.4; word-break: break-all; overflow-wrap: break-word; }*/
.info-value { font-size: 1rem;  letter-spacing: 1.5px; text-shadow: 0 0 6px rgba(51, 255, 102, 0.5); line-height: 1.4; word-break: break-all; overflow-wrap: break-word; }

/* КНОПКИ СВЯЗИ В КОНТАКТАХ */
.contact-link-btn { color: #33ff66; text-decoration: none; border: 1px solid rgba(51, 255, 102, 0.5); padding: 5px 12px; background: rgba(51, 255, 102, 0.05); border-radius: 4px; font-weight: bold; display: inline-block; margin-top: 5px; transition: all 0.2s ease; text-shadow: 0 0 5px rgba(51, 255, 102, 0.5); }
.contact-link-btn:hover { background: rgba(51, 255, 102, 0.2); border-color: #33ff66; color: #ffffff; box-shadow: 0 0 10px rgba(51, 255, 102, 0.6); }

/* КОНТЕЙНЕР ДЛЯ ЗЕЛЕНОГО МОНОХРОМНОГО QR-КОДА */
.qr-container { display: flex; justify-content: center; align-items: center; margin-top: 20px; padding: 10px; background: transparent; width: 160px; height: 160px; margin-left: auto; margin-right: auto; border: 2px dashed rgba(51, 255, 102, 0.2); }
.qr-image { width: 100%; height: 100%; object-fit: contain; filter: invert(1) sepia(1) saturate(5) hue-rotate(90deg) drop-shadow(0 0 4px #33ff66); }

/* ПОЛЯ ВВОДА ДЛЯ ФОРМЫ ЗАЯВКИ */
.terminal-input { width: 100%; background: #010401; border: 2px solid rgba(51, 255, 102, 0.35); color: #33ff66; padding: 10px; font-family: monospace; font-size: 1.1rem; font-weight: bold; outline: none; box-shadow: inset 0 0 5px rgba(51, 102, 51, 0.1); transition: all 0.2s ease; }
.terminal-input:focus { border-color: #33ff66; color: #ffffff; box-shadow: 0 0 10px rgba(51, 255, 102, 0.4); }
.terminal-textarea { resize: none; }

/* ==========================================================================
   4. ДИЗАЙН ДЛЯ МОБИЛЬНЫХ С ЭФФЕКТОМ ВЫПУКЛОГО СТЕКЛА ЭЛТ (ЭКРАНЫ <= 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {
    body { padding: 0; background-color: #020702; }
    .tabs-container { display: none !important; }

    /* Мобильный экран БЕЗ ядовитых рамок, но с сочным внутренним неоновым отсветом Pip-Boy */
    .card {
        width: 100vw; 
        min-height: 100vh; 
        border: none !important; 
        border-radius: 0 !important; 
        padding: 25px 20px; 
        background: #020702;
        box-shadow: inset 0 0 40px rgba(51, 255, 102, 0.25) !important; 
        position: relative; 
        overflow: hidden;
    }

    /* На смартфонах вешаем градиент луча сюда, чтобы он гарантированно бежал поверх всего */
    .card::after {
        content: " "; 
        display: block; 
        position: absolute; 
        top: 0; left: 0; bottom: 0; right: 0; 
        z-index: 5; 
        pointer-events: none;
        background: linear-gradient(to bottom, rgba(51,255,102,0) 0%, rgba(51,255,102,0.08) 10%, rgba(51,255,102,0) 20%);
        animation: vline 10s linear infinite; /* Плавно за 10 секунд */
    }

    .header-block { flex-direction: column-reverse; text-align: center; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px dashed rgba(51, 255, 102, 0.2); }
    .header-text { text-align: center; }
    h1 { font-size: 1.15rem; }
    .subtitle { font-size: 0.75rem; }
.logo-container { width: 150px; height: 150px; margin-bottom: 15px; }
/* Умное скрытие глубоких 3D слоев на смартфонах ради экономии CPU батареи */
.leaf-layer:nth-child(1),
.leaf-layer:nth-child(2),
.leaf-layer:nth-child(6),
.leaf-layer:nth-child(7) {
display: none !important;
}
.info-value { font-size: 1rem; letter-spacing: 1px; }
.info-label { font-size: 0.7rem; }
/* КРУГЛЫЙ МЕНЮ-ШАРИК С ТРЕМЯ ПОЛОСКАМИ (СНИЗУ СПРАВА ПОД ПАЛЕЦ) */
.mobile-menu-trigger {
display: flex !important;
position: fixed;
bottom: 25px;
right: 25px;
width: 56px;
height: 56px;
background-color: #0d380d;
border: 2px solid #33ff66;
border-radius: 50%;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7), 0 0 12px rgba(51, 255, 102, 0.4);
z-index: 999;
cursor: pointer;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 5px;
transition: transform 0.2s ease, background-color 0.2s;
}
.mobile-menu-trigger:active { transform: scale(0.9); background-color: #165716; }
.mobile-menu-trigger span { display: block; width: 24px; height: 2px; background-color: #33ff66; transition: all 0.2s ease; }
/* Превращение полосок в крестик при открытии мобильного меню */
.mobile-menu-trigger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-trigger.open span:nth-child(2) { opacity: 0; }
.mobile-menu-trigger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* ПОЛНОЭКРАННЫЙ ОВЕРЛЕЙ МОБИЛЬНОГО МЕНЮ */
.mobile-navigation-overlay {
display: flex !important;
position: fixed;
top: 0; left: 0; width: 100vw; height: 100vh;
background: rgba(2, 7, 2, 0.97);
z-index: 998;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 25px;
opacity: 0;
pointer-events: none;
transition: opacity 0.25s ease;
}
.mobile-navigation-overlay.open { opacity: 1; pointer-events: auto; }
/* Стилизация SSI-ссылок под светящиеся рамки на смартфонах */
.mobile-nav-link {
background: transparent;
color: #33ff66;
border: 2px solid rgba(51, 255, 102, 0.3);
padding: 12px 35px;
font-size: 1.1rem;
font-weight: bold;
text-transform: uppercase;
text-decoration: none;
width: 220px;
text-align: center;
border-radius: 4px;
font-family: monospace;
letter-spacing: 1px;
display: block;
}
/* Подсветка текущего активного раздела на мобильном */
.mobile-nav-link.active {
border-color: #33ff66;
background: rgba(51, 255, 102, 0.15);
text-shadow: 0 0 5px #33ff66;
}
}
/* ==========================================================================
КЛЮЧЕВЫЕ КАДРЫ ДЛЯ ЭФФЕКТА ПОМЕХ И СИНХРОННОГО ПОТРЯСИВАНИЯ (GLITCH)
========================================================================== */
@keyframes glitch {
0%, 92%, 100% {
transform: translate(0, 0) skewX(0deg);
filter: brightness(1);
}
93% {
transform: translate(3px, -1px) skewX(1deg);
filter: brightness(1.15); / Кратковременная вспышка яркости кинескопа */
}
94% {
transform: translate(-2px, 2px) skewX(-1.5deg);
}
95% {
transform: translate(0, 0) skewX(0deg);
}
96% {
transform: translate(-3px, -2px) skewX(2deg);
filter: brightness(0.95);
}
97% {
transform: translate(3px, 1px) skewX(-1deg);
}
98% {
transform: translate(0, 0) skewX(0deg);
}
}