* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #16213e 50%, #1a1a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%);
    animation: shimmer 10s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.game-container {
    position: relative;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 2px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 255, 0.5);
    animation: containerNeonGlow 3s ease-in-out infinite;
}

@keyframes containerNeonGlow {
    0%, 100% {
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.8),
            0 0 20px rgba(0, 255, 255, 0.5),
            0 0 40px rgba(255, 0, 255, 0.3),
            0 0 0 2px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.8),
            0 0 40px rgba(0, 255, 255, 0.8),
            0 0 80px rgba(255, 0, 255, 0.6),
            0 0 0 2px rgba(255, 0, 255, 0.5);
    }
}

#gameCanvas {
    display: block;
    background: linear-gradient(180deg, #0a0e27 0%, #16213e 100%);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10;
    animation: fadeIn 0.3s ease-in;
}

.hidden {
    display: none !important;
}

.title {
    font-size: 64px;
    background: linear-gradient(45deg, #00FFFF, #FF00FF, #FFFF00, #00FFFF);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    margin-bottom: 10px;
    animation: bounce 1s infinite, neonGlow 3s ease infinite;
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 40px rgba(255, 0, 255, 0.6));
}

@keyframes neonGlow {
    0%, 100% { 
        background-position: 0% 50%;
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.8)) drop-shadow(0 0 40px rgba(255, 0, 255, 0.6));
    }
    50% { 
        background-position: 100% 50%;
        filter: drop-shadow(0 0 30px rgba(0, 255, 255, 1)) drop-shadow(0 0 60px rgba(255, 0, 255, 0.8));
    }
}

.subtitle {
    font-size: 24px;
    color: #FFF;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-over-title {
    font-size: 48px;
    color: #FF6B6B;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.score-display, .best-score {
    font-size: 28px;
    color: #FFF;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.instructions {
    font-size: 18px;
    color: #DDD;
    margin-top: 20px;
}

.btn {
    padding: 15px 40px;
    font-size: 24px;
    background: linear-gradient(135deg, #00FFFF 0%, #FF00FF 100%);
    border: 2px solid #00FFFF;
    border-radius: 50px;
    color: #FFF;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 255, 255, 0.8),
        0 0 60px rgba(255, 0, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: #FF00FF;
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
}

.score {
    font-size: 32px;
    color: #00FFFF;
    font-weight: bold;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 1),
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 30px rgba(0, 255, 255, 0.6);
    animation: scoreNeonGlow 2s ease-in-out infinite;
}

@keyframes scoreNeonGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(0, 255, 255, 1),
            0 0 20px rgba(0, 255, 255, 0.8),
            0 0 30px rgba(0, 255, 255, 0.6);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(0, 255, 255, 1),
            0 0 30px rgba(0, 255, 255, 1),
            0 0 50px rgba(0, 255, 255, 0.8);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
