/* Основные стили и сброс */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: 'Roboto Mono', monospace; /* ИЗМЕНЕНО */
    overflow: hidden;
}

/* Шрифты */
@import url('https://fonts.googleapis.com/css2?family=Workbench&display=swap');

/* Стили для Canvas таймера */
canvas {
    position: absolute;
    left: 50%;
    top: 88vh;
    transform: translate(-50%, -50%);
    width: 35vmin;
    height: 35vmin;
    max-width: 280px;
    max-height: 280px;
    filter: blur(1vmin) brightness(4);
    z-index: 1;
}

.timer {
    position: absolute;
    left: 50%;
    top: 88vh;
    transform: translate(-50%, -50%);
    text-align: center;
    color: black;
    font-family: "Workbench", sans-serif;
    font-size: 5vmin;
    z-index: 3;
    mix-blend-mode: exclusion;
    filter: invert() drop-shadow(0 0 5px white);
}

/* Контейнер для центрирования текста API */
.content-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    position: relative;
    z-index: 10;
}

/* Стили для динамического текста */
#dynamic-text {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    font-size: clamp(16px, 2.2vw, 26px);
    line-height: 1.6;
    text-align: center;
    max-width: 90%;
    transition: opacity 0.5s ease-in-out;
    /* ИЗМЕНЕНО: Применяем анимацию свечения */
    animation: pulse-glow 4s ease-in-out infinite;
}

.dud {
    color: #757575;
}

/* Адаптивность */
@media (max-width: 768px) {
    #dynamic-text {
        font-size: 5.5vw;
        max-width: 90%;
    }
    .timer {
        font-size: 8vmin;
    }
    canvas {
        width: 50vmin;
        height: 50vmin;
    }
}

/* --- НОВЫЕ СТИЛИ ДЛЯ ШУМА --- */
@keyframes noise {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(25%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

@keyframes pulse-glow {
    0% {
        text-shadow:
            0 0 4px rgba(255, 255, 255, 0.4),
            0 0 8px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.1);
    }
    50% {
        text-shadow:
            0 0 6px rgba(255, 255, 255, 0.6),
            0 0 12px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(255, 255, 255, 0.3);
    }
    100% {
        text-shadow:
            0 0 4px rgba(255, 255, 255, 0.4),
            0 0 8px rgba(255, 255, 255, 0.3),
            0 0 20px rgba(255, 255, 255, 0.1);
    }
}
