* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: Consolas, Monaco, monospace;
    text-align: center;
    color: #fff;
    background-color: #000;
    overflow: hidden;
    position: relative;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* Фон за текстом */
}

.container {
    position: relative;
    z-index: 2; /* Текст поверх фона */
    padding: 20px;
}

h1 {
    font-size: 22px;
    font-weight: normal;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    position: relative;
}

.typing {
    display: inline-block;
    overflow: hidden;
    position: relative;
    font-weight: bold; /* Жирный текст */
}

.cursor {
    display: inline-block;
    width: 4px;
    height: 22px;
    background-color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.subtext {
    font-size: 16px;
    opacity: 0.8;
    margin-top: 10px;
}

/* Глич-анимация */
.glitch {
    position: relative;
    display: inline-block;
    animation: glitch 1s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    width: 100%;
    background: transparent;
}

.glitch::before {
    top: -2px;
    left: -2px;
    color: #f00;
    animation: glitch-anim 0.3s infinite;
}

.glitch::after {
    top: 2px;
    left: 2px;
    color: #00f;
    animation: glitch-anim 0.3s infinite reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(24px, 550px, 90px, 0); }
    25% { clip: rect(0, 550px, 18px, 0); }
    50% { clip: rect(40px, 550px, 56px, 0); }
    75% { clip: rect(10px, 550px, 100px, 0); }
    100% { clip: rect(64px, 550px, 72px, 0); }
}