body {
    background-color: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#terminal {
    position: relative;
    z-index: 1;
    background-color: #000;
    border: 1px solid #00ff00;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    min-height: 400px;
    overflow: hidden;
}

/* Живий шум */
#terminal::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.13;
    animation: noise-move 0.05s steps(2) infinite;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" seed="2" /></filter><rect width="100" height="100" filter="url(%23noise)" /></svg>');
    background-size: 200px 200px;
}
@keyframes noise-move {
    0% { background-position: 0 0; }
    100% { background-position: 20px 40px; }
}

/* Смуги */
#terminal::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0,255,0,0.07) 0px,
        rgba(0,255,0,0.07) 1px,
        transparent 1px,
        transparent 8px
    );
}

.output {
    flex-grow: 1;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 10px;
}

.input-line {
    display: flex;
}

.prompt {
    color: #00ff00;
    margin-right: 5px;
}

.input {
    background-color: transparent;
    border: none;
    color: #00ff00;
    flex-grow: 1;
    outline: none;
    caret-color: #00ff00;
}

.container {
    width: 80%;
    max-width: 800px;
}

#footer {
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    margin-top: 15px;
    opacity: 0.7; /* Трохи прозоріший */
}

#header {
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.blink {
    animation: blink-effect 1s steps(1) infinite;
}

@keyframes blink-effect {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes terminal-blink {
    0%, 100% { background-color: #000; }
    50% { background-color: #002200; }
}

:root {
    --glitch-color-1: #00aaff;
    --glitch-color-2: #ff0000;
}

/* Глітч для всього тексту */
.glitch-text {
    position: relative;
    color: #00ff00;
    opacity: 1;
}

.glitch-text.glitch-line-active::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    color: var(--glitch-color-1, #00ff00);
    pointer-events: none;
    z-index: -1;
    animation: glitch-anim 1.5s infinite linear alternate;
    text-shadow:
        0.5px 0 var(--glitch-color-1, #00ff00),
        -0.5px 0 var(--glitch-color-2, #ff0000),
        0.5px 0.5px var(--glitch-color-1, #00ff00),
        -0.5px -0.5px var(--glitch-color-2, #ff0000);
}

@keyframes glitch-anim {
    0% {
        clip-path: inset(0 0 60% 0); /* Верхня позиція, смуга 40% висотою */
    }
    100% {
        clip-path: inset(60% 0 0 0); /* Нижня позиція, смуга 40% висотою */
    }
}