body {
    margin: 0;
    padding: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    position: relative;
}

#controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff00ff;
    font-size: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    z-index: 10;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#gameContainer {
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff00ff;
    border-radius: 20px;
    box-shadow: 
        0 0 50px rgba(255, 0, 255, 0.5),
        inset 0 0 50px rgba(0, 255, 255, 0.1);
    animation: neonBorder 2s ease-in-out infinite alternate;
}

@keyframes neonBorder {
    0% { box-shadow: 0 0 30px rgba(255, 0, 255, 0.5), inset 0 0 30px rgba(0, 255, 255, 0.1); }
    100% { box-shadow: 0 0 60px rgba(0, 255, 255, 0.8), inset 0 0 60px rgba(255, 0, 255, 0.2); }
}

canvas {
    display: block;
    border-radius: 18px;
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #00ffff;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff;
    letter-spacing: 2px;
}

#ui div {
    margin-bottom: 10px;
    animation: textGlow 1.5s ease-in-out infinite alternate;
}

#combo {
    color: #ffff00 !important;
    text-shadow: 
        0 0 10px #ffff00,
        0 0 20px #ffff00,
        0 0 30px #ffff00 !important;
}

#victory {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    color: white;
    display: none;
    border: 3px solid #ffff00;
    box-shadow: 
        0 0 50px rgba(255, 255, 0, 0.8),
        inset 0 0 50px rgba(255, 255, 0, 0.3);
    animation: victoryPulse 2s ease-in-out infinite;
}

@keyframes victoryPulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255, 255, 0, 0.6), inset 0 0 30px rgba(255, 255, 0, 0.2);
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        box-shadow: 0 0 60px rgba(255, 255, 0, 1), inset 0 0 60px rgba(255, 255, 0, 0.4);
        transform: translate(-50%, -50%) scale(1.02);
    }
}

#victory h1 {
    margin: 0 0 30px 0;
    font-size: 48px;
    color: #ffff00;
    text-shadow: 
        0 0 20px #ffff00,
        0 0 40px #ffff00,
        0 0 60px #ffff00;
    animation: victoryTextGlow 1.5s ease-in-out infinite alternate;
    letter-spacing: 3px;
}

@keyframes victoryTextGlow {
    0% { text-shadow: 0 0 20px #ffff00, 0 0 40px #ffff00, 0 0 60px #ffff00; }
    100% { text-shadow: 0 0 30px #ffff00, 0 0 60px #ffff00, 0 0 80px #ffff00; }
}

#victory p {
    color: #00ffff;
    font-size: 24px;
    margin: 15px 0;
    text-shadow: 0 0 10px #00ffff;
    letter-spacing: 1px;
}

#victory button {
    padding: 20px 50px;
    font-size: 20px;
    background: transparent;
    color: #00ff00;
    border: 3px solid #00ff00;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    margin-top: 30px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
}

#victory button:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 
        0 0 40px rgba(0, 255, 0, 0.8),
        inset 0 0 40px rgba(0, 255, 0, 0.3);
    transform: scale(1.1);
}

@keyframes textGlow {
    0% { text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff; }
    100% { text-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff, 0 0 40px #00ffff; }
}

#gameOver {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    color: white;
    display: none;
    border: 2px solid #ff00ff;
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.8),
        inset 0 0 30px rgba(255, 0, 255, 0.3);
}

#gameOver h2 {
    margin: 0 0 20px 0;
    font-size: 36px;
    color: #ff00ff;
    text-shadow: 
        0 0 10px #ff00ff,
        0 0 20px #ff00ff;
    animation: textGlow 1s ease-in-out infinite alternate;
}

#gameOver p {
    color: #00ffff;
    font-size: 20px;
    margin: 10px 0;
    text-shadow: 0 0 5px #00ffff;
}

#gameOver button {
    padding: 15px 40px;
    font-size: 18px;
    background: transparent;
    color: #00ff00;
    border: 2px solid #00ff00;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    margin-top: 20px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.5),
        inset 0 0 20px rgba(0, 255, 0, 0.1);
}

#gameOver button:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 
        0 0 30px rgba(0, 255, 0, 0.8),
        inset 0 0 30px rgba(0, 255, 0, 0.3);
    transform: scale(1.1);
}

#tutorial {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff00ff;
    font-size: 18px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px 30px;
    border-radius: 30px;
    border: 2px solid #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
    letter-spacing: 1px;
}

#levelComplete {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00ff00;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 
        0 0 20px #00ff00,
        0 0 40px #00ff00,
        0 0 60px #00ff00;
    display: none;
    animation: neonPulse 1s ease-out;
    text-transform: uppercase;
    letter-spacing: 4px;
}

@keyframes neonPulse {
    0% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.5); 
        text-shadow: 0 0 20px #00ff00;
    }
    50% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.2); 
        text-shadow: 0 0 40px #00ff00, 0 0 80px #00ff00;
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(1); 
        text-shadow: 0 0 20px #00ff00;
    }
}