/* --- Базовые стили и Сброс --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #111; /* Темный фон */
    color: #0f0; /* Основной цвет текста - неоново-зеленый */
    font-family: 'Roboto Mono', monospace; /* Моноширинный шрифт для атмосферы */
    overflow-x: hidden; /* Предотвращаем горизонтальный скролл из-за глитчей */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    cursor: crosshair; /* Или другой "технический" курсор */
}

a {
    color: #0ff; /* Бирюзовый для ссылок */
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #f0f; /* Фиолетовый при наведении */
    text-shadow: 0 0 5px #f0f;
}

/* --- Шрифты (пример, если нужно что-то специфичное) --- */
.main-title {
    font-family: 'Press Start 2P', cursive; /* Пиксельный шрифт */
    font-size: 2.5rem; /* Адаптировать под размер экрана */
    line-height: 1.3;
    text-align: center;
    margin-bottom: 20px;
}

/* --- Глитч Эффект для Текста (Базовый) --- */
.glitch-text {
    position: relative;
    /* color: #0f0; */ /* Наследуем основной цвет */
    text-shadow:
        0.05em 0 0 rgba(255,0,0,0.75), /* Красный сдвиг */
        -0.025em -0.05em 0 rgba(0,255,0,0.75), /* Зеленый сдвиг */
        0.025em 0.05em 0 rgba(0,0,255,0.75); /* Синий сдвиг */
    animation: glitch-anim 500ms infinite alternate;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text); /* Копируем текст элемента */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111; /* Фон элемента, чтобы перекрыть оригинал */
    overflow: hidden;
    clip-path: inset(50% 0 50% 0); /* Обрезка для создания "скачущих" линий */
}

.glitch-text::before {
    left: -2px;
    text-shadow: -1px 0 #f0f; /* Фиолетовый */
    animation: glitch-anim-before 1.5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: 2px;
    text-shadow: -1px 0 #0ff; /* Бирюзовый */
    animation: glitch-anim-after 2s infinite linear alternate-reverse;
}

.glitch-text-fast {
    animation-duration: 150ms;
}
.glitch-text-fast::before { animation-duration: 500ms; }
.glitch-text-fast::after { animation-duration: 750ms; }

/* Анимации для глитча */
@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes glitch-anim-before {
    0% { clip-path: inset(40% 0 60% 0); }
    25% { clip-path: inset(10% 0 80% 0); }
    50% { clip-path: inset(75% 0 10% 0); }
    75% { clip-path: inset(5% 0 90% 0); }
    100% { clip-path: inset(60% 0 30% 0); }
}

@keyframes glitch-anim-after {
     0% { clip-path: inset(65% 0 20% 0); }
    25% { clip-path: inset(30% 0 40% 0); }
    50% { clip-path: inset(80% 0 5% 0); }
    75% { clip-path: inset(45% 0 50% 0); }
    100% { clip-path: inset(90% 0 8% 0); }
}

/* --- Эффекты Дрожания и Мерцания --- */
.shake {
    animation: shake-anim 0.5s infinite ease-in-out;
}

@keyframes shake-anim {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.flicker {
    animation: flicker-anim 1s infinite alternate;
}
.flicker-slow {
     animation: flicker-anim 2.5s infinite alternate;
}

@keyframes flicker-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Секция Hero (Начальный экран) --- */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    border-bottom: 2px dashed #f0f; /* Граница для разделения */
    position: relative; /* Для псевдоэлементов, если понадобятся */
}

.logo {
    font-size: 2.5rem;
    margin-bottom: 30px;
    display: inline-block; /* Чтобы глитч работал */
}

.subtitle {
    font-size: 1.1rem;
    color: #ccc; /* Чуть менее яркий */
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-button {
    font-family: 'Press Start 2P', cursive;
    background-color: transparent;
    border: 2px solid #0f0;
    color: #0f0;
    padding: 15px 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative; /* Для эффектов */
    overflow: hidden;
}

.cta-button:hover, .cta-button:focus {
    background-color: #0f0;
    color: #111;
    text-shadow: none;
    box-shadow: 0 0 15px #0f0;
}

.cta-button .button-text {
    position: relative;
    z-index: 1;
}

/* Эффект дрожания при наведении */
.shake-on-hover:hover {
     animation: shake-anim 0.3s ease-in-out;
}


/* --- Основной Контент (Скрыт до нажатия кнопки) --- */
#content-area {
    padding: 40px 20px;
    flex-grow: 1; /* Занимает оставшееся место до футера */
}

/* --- Хаотичные Секции --- */
.chaotic-section {
    margin-bottom: 60px;
    padding: 20px;
    border: 1px dashed rgba(0, 255, 255, 0.5); /* Бирюзовая пунктирная граница */
    position: relative; /* Для возможных смещений */
}

/* Пример небольшого хаоса в расположении */
#prototypes {
    transform: rotate(-1deg);
}
#manifesto {
    transform: rotate(0.5deg);
    margin-left: -10px;
    margin-right: 10px; /* Небольшое смещение */
}

.chaotic-section h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-align: center;
    display: inline-block; /* Для глитча */
}

/* --- Сетка Продуктов --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-item {
    border: 1px solid #555;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden; /* Для эффектов */
    background-color: rgba(255, 255, 255, 0.02); /* Еле заметный фон */
}

.product-item:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.product-image-placeholder {
    height: 150px;
    background-color: #222;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    color: #888;
    font-size: 0.9rem;
    border: 1px dashed #444;
}

.product-item h3 {
    margin-bottom: 10px;
    color: #0ff; /* Бирюзовый заголовок товара */
}

.buy-button {
    background: #444;
    color: #eee;
    border: none;
    padding: 8px 15px;
    margin-top: 15px;
    cursor: pointer;
    font-family: 'Roboto Mono', monospace;
    transition: background-color 0.2s, color 0.2s;
}

.buy-button:hover {
    background-color: #f0f; /* Фиолетовый при наведении */
    color: #111;
}

/* --- Секция Манифеста --- */
#manifesto .log-entry {
    background: rgba(0, 255, 0, 0.05); /* Легкий зеленый фон */
    padding: 15px;
    border-left: 3px solid #0f0;
}
#manifesto .log-entry p {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* --- Секция Трансляций --- */
#transmissions {
     border: 1px solid rgba(255, 0, 0, 0.3); /* Красная граница */
     padding: 20px;
}
#transmissions h2 {
    text-align: left;
}
.transmission-list p {
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 1px dotted #888;
}

/* --- Подвал --- */
#page-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #444;
    margin-top: auto; /* Прижимаем к низу */
    font-size: 0.9rem;
    color: #888;
}

#page-footer p {
    margin-bottom: 5px;
}

.critical-status {
    color: #f00; /* Красный для критического статуса */
    font-weight: bold;
}

.footer-link {
    color: #888;
}
.footer-link:hover {
    color: #0ff;
}


/* --- След Курсора --- */
#cursor-trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы не мешал кликам */
    z-index: 9999;
}

.trail-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: rgba(0, 255, 0, 0.5); /* Полупрозрачный зеленый */
    border-radius: 50%;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Плавное исчезновение и уменьшение */
    opacity: 1;
    transform: scale(1);
}

.trail-dot.fade-out {
    opacity: 0;
    transform: scale(0.5);
}

/* --- Классы для JS интерактивности --- */
.temp-glitch-active { /* Класс для временного глитча */
    animation: glitch-anim 150ms 2; /* Проиграть 2 раза быстро */
}

.temp-shake-active { /* Класс для временного дрожания */
     animation: shake-anim 200ms 1 ease-in-out; /* Проиграть 1 раз */
}

.temp-flicker-active { /* Класс для временного мерцания */
    animation: flicker-anim 300ms 1 alternate; /* Проиграть 1 раз */
}

/* --- Адаптивность (Очень базовая) --- */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }
    .product-grid {
        grid-template-columns: 1fr; /* Один товар в ряд на маленьких экранах */
    }
    .chaotic-section {
        transform: none; /* Убираем наклоны на мобильных */
        margin-left: 0;
        margin-right: 0;
    }
}