@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
}

#scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

#terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
}

.terminal-text {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #0f0;
    font-size: 14px;
    text-shadow: 0 0 10px #0f0;
    white-space: pre-wrap;
    opacity: 0.8;
}

#message {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

#message h1 {
    font-size: 3rem;
    color: #0f0;
    text-shadow:
        0 0 10px #0f0,
        0 0 20px #0f0,
        0 0 40px #0f0,
        0 0 80px #00ff00;
    animation: glitch 2s infinite, flicker 0.15s infinite;
    letter-spacing: 4px;
}

#message .subtitle {
    color: #ff0040;
    font-size: 1rem;
    margin-top: 10px;
    text-shadow: 0 0 10px #ff0040;
    animation: pulse 2s infinite;
}

#message .credits {
    color: #00ffff;
    font-size: 0.8rem;
    margin-top: 20px;
    opacity: 0.7;
    text-shadow: 0 0 5px #00ffff;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    92% {
        transform: translate(-5px, 2px);
    }
    94% {
        transform: translate(5px, -2px);
    }
    96% {
        transform: translate(-3px, 1px);
    }
    98% {
        transform: translate(3px, -1px);
    }
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.95;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Scanlines effect */
#terminal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
}

/* CRT flicker */
#terminal-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 0, 0.03);
    animation: crt-flicker 0.1s infinite;
    pointer-events: none;
}

@keyframes crt-flicker {
    0% { opacity: 0.27; }
    10% { opacity: 0.25; }
    20% { opacity: 0.27; }
    30% { opacity: 0.25; }
    40% { opacity: 0.26; }
    50% { opacity: 0.27; }
    60% { opacity: 0.25; }
    70% { opacity: 0.27; }
    80% { opacity: 0.25; }
    90% { opacity: 0.26; }
    100% { opacity: 0.27; }
}

#audio-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#audio-btn {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    padding: 10px 20px;
    cursor: pointer;
    text-shadow: 0 0 10px #0f0;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    transition: all 0.3s ease;
}

#audio-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

#audio-btn.playing {
    border-color: #ff0040;
    color: #ff0040;
    text-shadow: 0 0 10px #ff0040;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
}

#audio-btn.playing:hover {
    background: rgba(255, 0, 64, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
}

@media (max-width: 768px) {
    #message h1 {
        font-size: 1.5rem;
    }

    #message .subtitle {
        font-size: 0.8rem;
    }

    .terminal-text {
        font-size: 10px;
    }

    #audio-btn {
        font-size: 0.7rem;
        padding: 8px 12px;
    }
}
