/* --- Цветовая Схема: Глубокий Темно-Зеленый (Dark Cyber Emerald) --- */
:root {
    --cyber-green: #00ff66;       /* Яркий неоново-изумрудный */
    --cyber-light-green: #a3ffcc; /* Светло-зеленый для акцентов */
    --cyber-green-dim: #005c25;   /* Приглушенный защитный зеленый */
    --cyber-green-glow: rgba(0, 255, 102, 0.25);
    --bg-deep: #030a06;           /* Очень темный хвойно-зеленый (основной фон) */
    --panel-bg: #07170d;          /* Темно-зеленый цвет блоков и панелей */
    --border-cyber: #11331e;      /* Границы глубокого зеленого цвета */
    --text-main: #b8cfc0;         /* Текст с легким мятным отливом */
    --text-white: #ffffff;
}

/* --- Сброс стилей --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }

/* --- Системная Бегущая строка (Верхний Бар) --- */
.system-ticker {
    background-color: #010402;
    border-bottom: 1px solid var(--border-cyber);
    font-size: 11px;
    font-family: monospace;
    padding: 8px 0;
    color: var(--cyber-green);
}

.ticker-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--cyber-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cyber-green);
    animation: simple-pulse 1.5s infinite;
}

@keyframes simple-pulse {
    0 { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.ticker-wrap {
    overflow: hidden;
    width: 60%;
    white-space: nowrap;
}

.ticker-items {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

.ticker-items span {
    margin-right: 50px;
    color: #8fba9e;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* --- Напичканный Хедер (Cyber Hero) --- */
.cyber-hero {
    position: relative;
    padding: 50px 0;
    background: linear-gradient(180deg, #05140b 0%, var(--bg-deep) 100%);
    border-bottom: 2px solid var(--cyber-green);
}

.cyber-grid-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(0, 255, 102, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 255, 102, 0.02) 1px, transparent 1px);
    background-size: 25px 25px;
    pointer-events: none;
}

.hero-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.cyber-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    font-size: 12px;
    color: var(--cyber-green);
    background: rgba(0, 255, 102, 0.07);
    border: 1px solid rgba(0, 255, 102, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.glitch-title {
    font-size: 52px;
    font-weight: 900;
    color: var(--text-white);
    line-height: 1.05;
    letter-spacing: -1.5px;
    margin-bottom: 15px;
}

.glitch-title span {
    color: var(--cyber-green);
    text-shadow: 0 0 15px var(--cyber-green-glow);
}

.hero-description {
    font-size: 16px;
    color: #9cbda6;
    margin-bottom: 25px;
}

/* Элементы HUD управления */
.control-hud {
    background: var(--panel-bg);
    border: 1px solid var(--border-cyber);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.hud-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hud-label {
    font-family: monospace;
    font-size: 11px;
    color: #4b6e56;
    letter-spacing: 0.5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #0f2b18;
    border-radius: 34px;
    transition: .3s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 4px;
    background-color: var(--cyber-green);
    border-radius: 50%;
    transition: .3s;
}
input:checked + .slider { background-color: var(--cyber-green-dim); }
input:checked + .slider:before { transform: translateX(24px); background-color: var(--text-white); }

.risk-selector {
    display: flex;
    background: #0b2112;
    border-radius: 4px;
    padding: 2px;
}

.risk-tab {
    flex: 1;
    font-family: monospace;
    font-size: 11px;
    text-align: center;
    padding: 4px 0;
    cursor: pointer;
    color: #4b6e56;
    font-weight: bold;
}

.risk-tab.active {
    background: var(--cyber-green);
    color: #000;
    border-radius: 3px;
}

/* Продвинутый Дашборд Справа */
.hero-dashboard-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-cyber);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    width: 100%;
    box-sizing: border-box;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 12px;
    border-bottom: 1px solid var(--border-cyber);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.dash-title { color: var(--text-white); font-weight: bold; }
.dash-ping { color: var(--cyber-green); }

/* Контейнер графика (Полностью резиновый) */
.dash-chart-container {
    position: relative;
    background: #030d07;
    border: 1px solid #0d2616;
    border-radius: 6px;
    height: 140px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    width: 100%;
}

.dash-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-grid-lines {
    position: absolute;
    width: 100%; height: 100%;
    background-image: linear-gradient(rgba(0, 255, 102, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 255, 102, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.live-multiplier-overlay {
    position: absolute;
    top: 15px; right: 25px;
    font-size: 38px;
    font-weight: 900;
    color: var(--cyber-green);
    text-shadow: 0 0 15px var(--cyber-green-glow);
    font-family: monospace;
}

/* Лента истории */
.history-strip {
    display: flex;
    gap: 6px;
    margin: 15px 0;
    overflow-x: auto;
    padding-bottom: 4px;
}

/* Скрытие дефолтного скроллбара для эстетики */
.history-strip::-webkit-scrollbar { height: 0px; }

.badge-hist {
    font-family: monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    background: #0b2414;
    flex-shrink: 0;
}

.badge-hist.green { color: var(--cyber-green); border: 1px solid rgba(0,255,102,0.2); }
.badge-hist.light-green { color: var(--cyber-light-green); border: 1px solid rgba(163,255,204,0.2); }
.badge-hist.red { color: #ff5577; border: 1px solid rgba(255,85,119,0.2); }
.badge-hist.gold { color: #ffcc00; border: 1px solid rgba(255,204,0,0.2); background: rgba(255,204,0,0.05); }

/* Мета-боксы дашборда */
.dash-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.meta-box {
    background: #041208;
    border: 1px solid var(--border-cyber);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.meta-lbl {
    display: block;
    font-family: monospace;
    font-size: 10px;
    color: #4b6e56;
    margin-bottom: 4px;
}

.meta-val {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-white);
}
.color-green { color: var(--cyber-green)!important; }
.color-light-green { color: var(--cyber-light-green)!important; }

/* --- Кнопки --- */
.btn {
    display: block;
    width: 100%;
    padding: 16px 30px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
    cursor: pointer;
    border: none;
}

.btn-cyber-primary {
    background-color: var(--cyber-green);
    color: #000000;
    box-shadow: 0 4px 20px rgba(0, 255, 102, 0.3);
}

.btn-cyber-primary:hover {
    background-color: #00e65c;
}

@keyframes cyber-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(0, 255, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 102, 0); }
}
.btn.pulse { animation: cyber-pulse 2s infinite; }

/* --- Секция С Демо (Iframe) --- */
.demo-section { padding: 40px 0; }
.section-title-wrap { margin-bottom: 20px; }
.section-hud-title { font-family: monospace; font-size: 18px; color: var(--text-white); }
.section-hud-title span { color: var(--cyber-green); }

.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid var(--border-cyber);
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: none;
}

.demo-cta-wrap { max-width: 400px; margin: 30px auto 0 auto; }

/* --- Главный Контейнер Текста --- */
.main-content { padding-bottom: 40px; }
.content-container {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-cyber);
    border-radius: 12px;
    padding: 40px;
}

.content-container h1 {
    font-size: 32px;
    color: var(--text-white);
    margin-bottom: 20px;
    border-left: 4px solid var(--cyber-green);
    padding-left: 15px;
}

.content-container h2 { font-size: 24px; color: var(--text-white); margin-top: 35px; margin-bottom: 15px; }
.content-container h3 { font-size: 19px; color: var(--text-white); margin-top: 25px; margin-bottom: 10px; }
.content-container p { font-size: 16px; color: var(--text-main); margin-bottom: 20px; }
.content-container ul, .content-container ol { margin-bottom: 25px; padding-left: 20px; }
.content-container li { font-size: 15px; color: var(--text-main); margin-bottom: 8px; }

.content-container ul li { list-style: none; position: relative; padding-left: 15px; }
.content-container ul li::before {
    content: "■"; position: absolute; left: 0; color: var(--cyber-green); font-size: 10px; top: 2px;
}

.content-container table { width: 100%; border-collapse: collapse; margin: 25px 0; display: block; overflow-x: auto; }
.content-container th { background-color: #0b2615; color: var(--text-white); padding: 14px; text-align: left; border: 1px solid var(--border-cyber); }
.content-container td { padding: 12px; border: 1px solid var(--border-cyber); color: var(--text-main); font-size: 14px; }
.content-container tr:nth-child(even) { background-color: #040f07; }
.content-cta { max-width: 400px; margin: 35px auto 0 auto; }

/* --- Карточка автора --- */
.author-section { padding-bottom: 50px; }
.author-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-cyber);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.author-avatar img {
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--cyber-green); box-shadow: 0 0 15px var(--cyber-green-glow);
}

.author-label { font-family: monospace; font-size: 11px; background: #0b2414; color: var(--cyber-green); padding: 3px 8px; border-radius: 4px; }
.author-name { font-size: 22px; color: var(--text-white); margin: 8px 0; }
.author-bio { font-size: 14px; color: #8ba894; }

/* --- Футер --- */
.main-footer { background: #010402; border-top: 1px solid var(--border-cyber); padding: 30px 0; }
.main-footer p { font-size: 12px; color: #405948; max-width: 900px; margin: 0 auto; }

/* ==========================================================================
   УЛЬТРА-АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ВЕРСИЙ И WEBVIEW ПРИЛОЖЕНИЙ
   ========================================================================== */

@media (max-width: 992px) {
    .hero-grid-layout {
        grid-template-columns: 1fr; /* Переключаем сетку в один вертикальный ряд */
        gap: 25px;
    }
    
    .glitch-title { 
        font-size: 36px; /* Идеальный размер для экранов планшетов */
        text-align: center; 
    }
    
    .hero-description { text-align: center; }
    .cyber-badge { display: flex; width: max-content; margin: 0 auto 15px auto; }
    .control-hud { max-width: 500px; margin: 0 auto 25px auto; }
}

@media (max-width: 480px) {
    .cyber-hero {
        padding: 25px 0; /* Уменьшаем отступы хедера сверху и снизу */
    }

    .glitch-title { 
        font-size: 28px; /* Ужимаем шрифт, чтобы длинное слово "UNCROSSABLE" не ломало экран */
        letter-spacing: -0.5px;
    }
    
    .hero-description {
        font-size: 14px; /* Облегчаем текст описания */
        margin-bottom: 20px;
    }

    .control-hud {
        flex-direction: column; /* Элементы управления встают друг под друга */
        gap: 15px;
        padding: 12px;
    }

    .hero-dashboard-panel {
        padding: 12px; /* Меньше паддингов, больше места под сам график */
    }

    .live-multiplier-overlay {
        font-size: 28px; /* Коэффициент на графике не перекрывает сетку */
        top: 10px;
        right: 15px;
    }

    .dash-meta {
        grid-template-columns: 1fr; /* Метрики внизу дашборда выстраиваются списком */
        gap: 6px;
    }

    .meta-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        text-align: left;
    }

    .meta-lbl { margin-bottom: 0; }

    /* Коррекция текстового контента */
    .content-container {
        padding: 20px 15px;
    }
    
    .content-container h1 { font-size: 22px; }
    .content-container h2 { font-size: 18px; }
    .content-container p { font-size: 15px; }

    /* Перевод карточки автора в вертикальный вид */
    .author-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
        gap: 15px;
    }
    
    .system-ticker {
        display: none; /* Полностью скрываем верхнюю бегущую строку на мобилках для экономии высоты экрана */
    }
}