body { background: #0a0a0b; color: #d1d1d1; font-family: -apple-system, system-ui, sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; }
.card { background: #141417; padding: 30px; border-radius: 20px; border: 1px solid #2d2d33; width: 340px; box-shadow: 0 20px 50px rgba(0,0,0,0.7); }
h2 { border-bottom: 2px solid #007aff; padding-bottom: 10px; color: #007aff; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; text-align: center; }
.stat { display: flex; justify-content: space-between; margin: 10px 0; font-size: 12px; border-bottom: 1px solid #222; padding-bottom: 3px; }
.val { font-family: monospace; font-weight: bold; font-size: 18px; }
.red { color: #ff3b30; } .green { color: #34c759; } .purple { color: #af52de; }
.list { font-size: 10px; color: #999; background: #000; padding: 10px; border-radius: 12px; line-height: 1.8; border: 1px solid #222; }
.footer { color: #444; font-size: 11px; text-align: center; margin-top: 25px; }
 .home-btn {
        display: block;
        text-align: center;
        text-decoration: none;
        background: #333;
        color: #fff;
        padding: 8px;
        border-radius: 8px;
        font-size: 12px;
        margin-bottom: 20px;
        transition: 0.3s;
        border: 1px solid #444;
    }
    .home-btn:hover {
        background: #444;
        border-color: #007aff;
    }
/* Индикатор статуса движка */
.engine-status {
    text-align: center;
    margin-bottom: 15px;
    font-size: 12px;
    letter-spacing: 1px;
}
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}
.online { color: #69f0ae; }
.online .dot { background: #69f0ae; box-shadow: 0 0 5px #69f0ae; }

.offline { color: #ff5252; font-weight: bold; animation: blink 1s infinite; }
.offline .dot { background: #ff5252; box-shadow: 0 0 5px #ff5252; }

@keyframes blink { 
    0% { opacity: 1; } 
    50% { opacity: 0.3; } 
    100% { opacity: 1; } 
}
/* Кнопка возврата */
.back-link {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #555;
    font-size: 11px;
    margin-bottom: 15px;
    border: 1px solid #333;
    padding: 5px;
    border-radius: 5px;
    transition: 0.3s;
}
.back-link:hover {
    border-color: #007aff;
    color: #007aff;
}

/* Разделитель */
.divider {
    border: 0;
    border-top: 1px solid #222;
    margin: 15px 0;
}

/* Заголовок истории */
.history-title {
    margin-top: 15px;
    border-color: #333;
    color: #888;
}

/* Индикаторы ресурсов */
.val.warn { color: #ff3b30; }
.val.good { color: #34c759; }
/* Фиксируем фон, чтобы он не влиял на поток документа */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block; /* Убираем лишние отступы снизу */
    z-index: -1;    /* Отправляем за карточку */
}

/* Убедись, что у body есть эти свойства для центровки */
body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #000; /* Черный фон для маскировки шлейфов */
    overflow: hidden;       /* Убираем полосы прокрутки из-за канваса */
}
.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #4aff4a; /* Ярко-зеленый для статуса OK */
    text-shadow: 0 0 5px rgba(74, 255, 74, 0.5);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #4aff4a;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(74, 255, 74, 0.4);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 255, 74, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 255, 74, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 255, 74, 0); }
}

/* Если вдруг связь пропадет, добавим класс для ошибки */
.live-indicator.error { color: #ff4d4d; }
.live-indicator.error .pulse-dot { background-color: #ff4d4d; animation: pulse-red 1s infinite; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 77, 77, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}
h2::before {
    content: "🛡️";
    margin-right: 10px;
    filter: drop-shadow(0 0 5px #007aff); /* Синее свечение под цвет заголовка */
    font-size: 1.2rem;
}


/* 1. Создаем контейнер для иконки, чтобы она не была инлайновой (в строке) */
.shield-container {
    display: block;      /* Занимает всю ширину, заставляя текст уйти вниз */
    text-align: center;  /* Центрируем иконку */
    margin: 0 auto 20px; /* Отступы: снизу 20px, по бокам авто */
    width: fit-content;  /* Ширина только по размеру иконки */
}

/* 2. Стилизуем саму иконку */
.shield-icon {
    font-size: 50px;     /* Размер щита */
    line-height: 1;      /* Убираем лишние отступы строки */
    filter: drop-shadow(0 0 10px rgba(0, 122, 255, 0.4)); /* Синее свечение */
    transition: transform 0.5s ease;
}

/* 3. Анимация для мобильных и десктопа */
.shield-icon:hover {
    transform: scale(1.1) rotate(5deg);
}
/* 4. Для мобильной версии (уменьшаем размер, если экран узкий) */
@media (max-width: 600px) {
    .shield-icon {
        font-size: 40px;
    }
}

/* Адаптив для мобильных устройств */
@media (max-width: 600px) {
    body {
        /* Разрешаем вертикальную прокрутку, если карточка высокая */
        overflow-y: auto; 
        padding: 20px 10px;
        align-items: flex-start; /* Прижимаем к верху на мелких экранах */
    }

    .card {
        width: 100%;
        max-width: 350px;
        padding: 15px;
        box-sizing: border-box;
        font-size: 0.9rem; /* Чуть уменьшаем текст */
    }

    h2 {
        font-size: 1.2rem;
    }

    /* Уменьшаем плотность дождя для мобильных (чтобы не лагало) */
    #matrix-bg {
        opacity: 0.1; /* Делаем фон еще бледнее, чтобы текст читался лучше */
    }
}

/* Фикс для очень маленьких экранов (типа iPhone SE) */
@media (max-width: 360px) {
    .stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}
