#snake-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'VT323', monospace;
    clip-path: circle(0% at 50% 50%);
    transition: background 1.2s ease, clip-path 0.6s cubic-bezier(0.7, 0, 0.3, 1);
    overflow: hidden;
}
#snake-game-overlay.bg-animated {
    background: linear-gradient(135deg, rgba(10, 0, 20, 0.9) 0%, rgba(0, 10, 20, 0.85) 50%, rgba(20, 0, 10, 0.9) 100%);
}
#snake-game-overlay.visible {
    clip-path: circle(150% at 50% 50%);
}
#snake-game-overlay.game-active {
    cursor: none;
}
#snake-game-overlay.enter-active {
    transition: clip-path 0.8s cubic-bezier(0.7, 0, 0.3, 1), background 1.2s ease;
}
#snake-game-overlay.exit-active {
    transition: clip-path 0.5s cubic-bezier(0.7, 0, 0.3, 1), background 1.2s ease;
    clip-path: circle(0% at 50% 50%);
}
#snake-canvas {
    --snake-color: #c586ff;
    --food-color: #ffde59;
    --bg-color: rgba(15, 15, 15, 0.6);
    background: linear-gradient(135deg, var(--bg-color), rgba(25, 25, 25, 0.4));
    border: 3px solid #c586ff;
    border-radius: 12px;
    box-shadow:
        0 0 30px rgba(197, 134, 255, 0.6),
        0 0 60px rgba(197, 134, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    transition: border-color 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
}
#snake-game-ui {
    color: #c586ff;
    text-shadow: 0 0 12px rgba(197, 134, 255, 0.7), 0 0 25px rgba(197, 134, 255, 0.4);
    text-align: center;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
    background: rgba(197, 134, 255, 0.05);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(197, 134, 255, 0.2);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}
#snake-title {
    font-size: 2.8rem;
    margin-bottom: 12px;
    font-weight: 600;
}
#snake-score {
    font-size: 1.6rem;
    margin-bottom: 12px;
}
#snake-instructions {
    font-size: 1.1rem;
    opacity: 0.8;
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

.void-choices button:hover {
    transform: none !important;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}
#snake-game-overlay.milestone-anarchic-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(rgba(77, 255, 77, 0.1) 1px, transparent 1px);
    background-size: 1px 30px;
    opacity: 0.5;
    animation: matrix-fall 5s linear infinite;
}

@keyframes savage-pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.3; }
}
#snake-game-overlay.milestone-savage-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(77, 255, 255, 0.2) 0%, transparent 70%);
    animation: savage-pulse 3s ease-in-out infinite;
}

@keyframes god-rays {
    0% { transform: rotate(0deg); opacity: 0.2; }
    50% { opacity: 0.4; }
    100% { transform: rotate(360deg); opacity: 0.2; }
}
#snake-game-overlay.milestone-god-bg::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(255, 77, 255, 0.3) 10%, transparent 20%);
    animation: god-rays 10s linear infinite;
}

@keyframes mgr-lightning {
    0%, 100% { opacity: 0; }
    5%, 50% { opacity: 0.8; }
    6%, 51% { opacity: 0; }
}
#snake-game-overlay.milestone-mgr-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top left, rgba(255, 26, 26, 0.7), transparent 50%),
                radial-gradient(circle at bottom right, rgba(255, 26, 26, 0.7), transparent 50%);
    animation: mgr-lightning 4s linear infinite;
}

@keyframes dmc-sparkle {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}
#snake-game-overlay.milestone-dmc-bg::before {
    content: '★';
    font-size: 50px;
    position: absolute;
    color: white;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #00ff00, 0 0 30px #0000ff;
    top: calc(var(--y, 0) * 1px);
    left: calc(var(--x, 0) * 1px);
    animation: dmc-sparkle 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes ultrakill-embers {
    0% { transform: translateY(100vh) scale(1); opacity: 1; }
    100% { transform: translateY(-10vh) scale(0.5); opacity: 0; }
}
#snake-game-overlay.milestone-ultrakill-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--ember-gradient);
    animation: ultrakill-embers 5s linear infinite;
    animation-delay: var(--ember-delay);
}

@keyframes bubble-rise {
    0% { transform: translateY(110vh) scale(0.5); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

#snake-game-overlay.milestone-aero-bubbles-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,0.6) 1px, transparent 1px),
                      radial-gradient(circle, rgba(173,216,230,0.5) 3px, transparent 3px);
    background-size: 50px 50px, 80px 80px;
    background-position: 0 0, 40px 40px;
    animation: bubble-rise 15s linear infinite;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
#snake-game-overlay.milestone-aero-bubbles-bg { opacity: 1; }

@keyframes lens-flare-sweep {
    0% { transform: translateX(-100%) skewX(-30deg); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateX(100%) skewX(-30deg); opacity: 0; }
}
#snake-game-overlay.milestone-aero-shine-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: lens-flare-sweep 6s ease-in-out infinite;
}

/* Miami/Hotline Theme */
body.hotline-miami-theme #snake-game-overlay {
    background: linear-gradient(135deg, #ff1493 0%, #ff00ff 50%, #00ffff 100%);
    background-size: 400% 400%;
    animation: miami-snake-gradient 4s ease infinite;
}

body.hotline-miami-theme #snake-canvas {
    --snake-color: #00ffff;
    --food-color: #ff1493;
    --bg-color: rgba(0, 0, 0, 0.8);
    border: 4px solid #00ffff;
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.8),
        0 0 80px rgba(255, 20, 147, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

body.hotline-miami-theme #snake-game-ui {
    color: #00ffff;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.9), rgba(0, 0, 0, 0.8));
    border: 3px solid #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    text-shadow: 0 0 10px rgba(0, 255, 255, 1);
    font-family: 'Courier New', monospace;
}

/* Akai Theme */
body.akai-theme #snake-game-overlay {
    background: linear-gradient(135deg, #8b0000 0%, #dc143c 50%, #ff0000 100%);
    background-size: 200% 200%;
    animation: akai-snake-pulse 3s ease infinite;
}

body.akai-theme #snake-canvas {
    --snake-color: #ff0000;
    --food-color: #ffffff;
    --bg-color: rgba(0, 0, 0, 0.9);
    border: 3px solid #ff0000;
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.9),
        0 0 60px rgba(220, 20, 60, 0.7),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

body.akai-theme #snake-game-ui {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.95), rgba(0, 0, 0, 0.9));
    border: 2px solid #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    text-shadow: 0 0 8px rgba(255, 0, 0, 1);
    font-family: 'MS Gothic', monospace;
}

/* Star Glitcher Theme */
body.star-glitcher-theme #snake-game-overlay {
    background: linear-gradient(135deg, #8000ff 0%, #00ffff 50%, #ff00ff 100%);
    background-size: 300% 300%;
    animation: star-snake-glitch 2s linear infinite;
}

body.star-glitcher-theme #snake-canvas {
    --snake-color: #8000ff;
    --food-color: #00ffff;
    --bg-color: rgba(0, 0, 0, 0.8);
    border: 4px solid transparent;
    background-clip: padding-box;
    border-image: linear-gradient(45deg, #8000ff, #00ffff) 1;
    box-shadow: 
        0 0 50px rgba(128, 0, 255, 0.8),
        0 0 100px rgba(0, 255, 255, 0.6),
        inset 0 0 25px rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

body.star-glitcher-theme #snake-game-ui {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(128, 0, 255, 0.9), rgba(0, 255, 255, 0.8));
    border: 3px solid transparent;
    background-clip: padding-box;
    border-image: linear-gradient(45deg, #8000ff, #00ffff) 1;
    box-shadow: 0 0 25px rgba(128, 0, 255, 0.7);
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 1),
        0 0 30px rgba(128, 0, 255, 0.8);
    font-family: 'Orbitron', 'VT323', monospace;
}

/* Frutiger Aero Theme */
body.frutiger-aero-theme #snake-game-overlay {
    background: linear-gradient(to bottom, #4a90e2 0%, #87ceeb 100%);
    backdrop-filter: blur(10px);
}

body.frutiger-aero-theme #snake-canvas {
    --snake-color: #003d7a;
    --food-color: #ff6b35;
    --bg-color: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2), 
        inset 0 2px 5px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(135, 206, 235, 0.4);
    border-radius: 20px;
}

body.frutiger-aero-theme #snake-game-ui {
    color: #003d7a;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(200, 220, 240, 0.8));
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
    font-family: 'Segoe UI', Arial, sans-serif;
    border-radius: 15px;
}

/* Theme Animations */
@keyframes miami-snake-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes akai-snake-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2) saturate(1.3); }
}

@keyframes star-snake-glitch {
    0% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    25% { 
        background-position: 100% 50%;
        filter: hue-rotate(90deg);
    }
    50% { 
        background-position: 0% 100%;
        filter: hue-rotate(180deg);
    }
    75% { 
        background-position: 100% 0%;
        filter: hue-rotate(270deg);
    }
    100% { 
        background-position: 0% 50%;
        filter: hue-rotate(360deg);
    }
}

@media (max-width: 768px) {
    #snake-game-ui {
        padding: 15px;
        margin-bottom: 20px;
    }
    #snake-title {
        font-size: 2.2rem;
    }
    #snake-score {
        font-size: 1.4rem;
    }
    #snake-instructions {
        font-size: 1rem;
    }
}