/* Сброс отступов и фон */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #ff0000;
    font-family: 'Orbitron', 'Russo One', sans-serif;
    height: 100vh;
    overflow: hidden;
    cursor: none;
}

/* 3D сцена */
.scene {
    position: relative;
    width: 100%;
    height: 100vh;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 0, 0.1) 0%, transparent 50%);
}

/* Основной текст с анимацией "выезда" */
.text-container {
    position: relative;
    transform-style: preserve-3d;
    animation: floatIn 8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    text-align: center;
}

.main-text {
    font-size: 15vw;
    color: #ff0000;
    text-shadow: 
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 40px #ff0000,
        0 0 80px #ff0000,
        0 0 120px #ff0000;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    position: relative;
    animation: pulse 2s infinite alternate;
}

/* Эффект глитча */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #ffff00;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

/* Подзаголовок */
.subtitle {
    font-size: 2.5vw;
    color: #ff3333;
    text-shadow: 0 0 10px #ff0000;
    opacity: 0;
    animation: subtitleAppear 4s 6s forwards;
    letter-spacing: 0.3em;
}

/* Частицы для эффекта глубины */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff0000;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff0000;
    animation: particleFloat 15s infinite linear;
}

/* Кнопки управления */
.controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.controls button {
    background: rgba(0, 0, 0, 0.7);
    color: #ff0000;
    border: 1px solid #ff0000;
    padding: 10px 15px;
    margin: 5px;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.controls button:hover {
    background: #ff0000;
    color: #000;
    box-shadow: 0 0 15px #ff0000;
}

/* Подсказка и кнопка входа */
.hint {
    position: absolute;
    bottom: 30%;
    opacity: 0;
    animation: fadeIn 3s 10s forwards;
    text-align: center;
}

.hint p {
    font-size: 1.2vw;
    margin-bottom: 20px;
    color: #ff6666;
}

#enterBtn {
    background: transparent;
    color: #ff0000;
    border: 2px solid #ff0000;
    padding: 15px 40px;
    font-size: 1.5vw;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    transition: all 0.5s;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

#enterBtn:hover {
    background: #ff0000;
    color: #000;
    box-shadow: 0 0 30px #ff0000;
    transform: scale(1.1);
}

/* АНИМАЦИИ */
@keyframes floatIn {
    0% {
        transform: translateZ(-1000px) scale(0.1);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateZ(200px) scale(1.2);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        text-shadow: 
            0 0 10px #ff0000,
            0 0 20px #ff0000,
            0 0 40px #ff0000;
    }
    100% {
        text-shadow: 
            0 0 20px #ff0000,
            0 0 40px #ff0000,
            0 0 80px #ff0000,
            0 0 120px #ff0000,
            0 0 160px #ff0000;
    }
}

@keyframes glitch-anim {
    0% {
        clip: rect(42px, 9999px, 44px, 0);
    }
    5% {
        clip: rect(12px, 9999px, 59px, 0);
    }
    10% {
        clip: rect(48px, 9999px, 29px, 0);
    }
    15% {
        clip: rect(42px, 9999px, 73px, 0);
    }
    20% {
        clip: rect(63px, 9999px, 27px, 0);
    }
    100% {
        clip: rect(90px, 9999px, 98px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }
    5% {
        clip: rect(52px, 9999px, 74px, 0);
    }
    10% {
        clip: rect(79px, 9999px, 85px, 0);
    }
    15% {
        clip: rect(75px, 9999px, 5px, 0);
    }
    20% {
        clip: rect(67px, 9999px, 61px, 0);
    }
    100% {
        clip: rect(10px, 9999px, 35px, 0);
    }
}

@keyframes subtitleAppear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateZ(-500px) scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateZ(500px) scale(2);
        opacity: 0;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-text {
        font-size: 20vw;
    }
    
    .subtitle {
        font-size: 4vw;
    }
    
    #enterBtn {
        font-size: 3vw;
        padding: 10px 20px;
    }
    
    .hint p {
        font-size: 3vw;
    }
}