/* css/snake_level.css */

/* Background specific for Snake scene */
.background-snakeLevel {
    background-image:
        linear-gradient(to bottom, rgba(10, 20, 10, 0.8), rgba(0, 10, 0, 0.9)),
        url('../assets/backgrounds/cave_bg.jpg'),
        /* Assuming generic bg or similar */
        url('../assets/backgrounds/landing.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Snake Game Container */
#snake-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* UI Stats Bar (Reusing Samurai/Shared Style) */
.snake-ui-bar {
    position: absolute;
    top: 60px;
    /* Below global navbar */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    z-index: 50;
    pointer-events: none;
    flex-wrap: wrap;
}

.snake-stat-capsule {
    background: rgba(15, 30, 15, 0.9);
    border: 2px solid #4ade80;
    /* Green theme */
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 700;
}

.snake-stat-target {
    border-color: #ffd700;
    color: #ffd700;
}

/* Game Board */
#snake-board-container {
    position: relative;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
    margin-top: 50px;
    /* Space for UI */
}

#snake-canvas {
    background: rgba(20, 25, 20, 0.95);
    border: 3px solid #4ade80;
    border-radius: 4px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    image-rendering: pixelated;
    /* Retro feel */
    max-width: 100%;
    max-height: 70vh;
}

/* Snake Segments */
/* (Handled by Canvas mostly, but if we used DOM elements...) */

/* Controls Overlay for Mobile */
.snake-controls-overlay {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: none;
    /* Hidden on desktop by default */
    justify-content: center;
    gap: 20px;
    z-index: 60;
}

@media (max-width: 768px) {
    .snake-controls-overlay {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .dpad-row {
        display: flex;
        gap: 10px;
    }

    .snake-btn {
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid #4ade80;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: #4ade80;
        backdrop-filter: blur(5px);
        user-select: none;
        active: scale(0.9);
        transition: transform 0.1s;
    }

    .snake-btn:active {
        background: rgba(74, 222, 128, 0.3);
        transform: scale(0.95);
    }

    /* Adjust canvas for mobile */
    #snake-canvas {
        width: 95vw;
        height: auto;
    }
}

/* Animations */
@keyframes orbPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 5px currentColor;
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 15px currentColor;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 5px currentColor;
    }
}

.snake-msg-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border: 2px solid #4ade80;
    border-radius: 12px;
    text-align: center;
    z-index: 100;
    display: none;
}

.snake-msg-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}