@import url("https://fonts.cdnfonts.com/css/pixeloid-sans");
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

:root {
    --bg-color: #0a0a1a;
    --bg-block-color: #1a1a2d;
    --text-primary: #ffffff;
    --text-secondary: #8f8fb7;
    --accent-primary: #4f9cff;
    --accent-secondary: #2a5cff;
    --accent-tertiary: #a0c8ff;
    --panel-bg: rgba(10, 10, 26, 0.8);
    --panel-border: rgba(79, 156, 255, 0.5);
    --panel-highlight: rgba(79, 156, 255, 0.2);
    --snake-color: #146ef5;
    --gsap-color: #0ae448; /* GSAP green */
    --webflow-color: #146ef5; /* Webflow blue */
    --food-color: #ff4e8f;
    --meteor-color-1: #ff6a00;
    --meteor-color-2: #ff9d00;
    --meteor-color-3: #ffcf00;
    --font-primary: "Press Start 2P", system-ui;
    --font-secondary: "Pixeloid Mono", monospace;

    /* Font size variables */
    --font-size-title: 3rem;
    --font-size-section-title: 1.5rem;
    --font-size-body: 0.875rem;
    --font-size-small: 0.75rem;
    --font-size-xs: 0.625rem;
}

.snake-game-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;

}

.snake-game-container {
    position: relative;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-secondary);
    overflow: hidden;
    height: 100svh;
    text-transform: uppercase;
    font-size: var(--font-size-body);
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    z-index: 10000;
}

.snake-game-container button,
.snake-game-container input,
.snake-game-container select,
.snake-game-container textarea {
    font-family: inherit;
}

.snake-game-container .pixel-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../../assets/images/BG-5.jpg");
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.8;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
            to right,
            rgba(79, 156, 255, 0.065) 1px,
            transparent 1px
    ),
    linear-gradient(to bottom, rgba(79, 156, 255, 0.065) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

.snake-game-container .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s;
}

.snake-game-container .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    padding: 1.25rem;
}

.snake-game-container .loading-text {
    margin-top: 1.25rem;
    text-align: center;
    font-family: var(--font-secondary);
    color: var(--accent-primary);
    letter-spacing: 2px;
    font-size: var(--font-size-small);
}

.snake-game-container .interface-container {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.snake-game-container .header {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem;
}

.snake-game-container .header-item {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .game-canvas-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .game-canvas {
    display: block;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .pixelated-border {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    z-index: -1;
    border: 8px solid var(--accent-primary);
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--accent-primary), 0 0 0 6px #000;
}

.snake-game-container .data-panel {
    width: 300px;
    background: var(--panel-bg);
    border: 4px solid var(--panel-border);
    padding: 0.9375rem;
    pointer-events: auto;
    z-index: 10;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .data-panel-title {
    font-size: var(--font-size-small);
    color: var(--accent-primary);
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .data-readouts {
    margin-top: 0.625rem;
}

.snake-game-container .data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3125rem;
    font-size: var(--font-size-small);
}

.snake-game-container .data-label {
    color: var(--text-secondary);
}

.snake-game-container .data-value {
    color: var(--text-primary);
}

.snake-game-container .data-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.625rem 0;
    position: relative;
    border: 2px solid var(--panel-border);
}

.snake-game-container .data-bar-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.5s;
}

.snake-game-container .control-panel {
    width: 300px;
    background: var(--panel-bg);
    border: 4px solid var(--panel-border);
    padding: 0.9375rem;
    position: absolute;
    pointer-events: auto;
    z-index: 10;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
    margin-bottom: 1rem;
}

.snake-game-container .control-group {
    margin-bottom: 0.9375rem;
}

.snake-game-container .control-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.snake-game-container .control-label {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
}

.snake-game-container .control-value {
    font-size: var(--font-size-small);
    color: var(--text-primary);
}

.snake-game-container .slider-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.snake-game-container .slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    border: 2px solid var(--panel-border);
}

.snake-game-container .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    cursor: pointer;
}

.snake-game-container .buttons {
    display: flex;
    gap: 0.625rem;
    margin-top: 0.9375rem;
}

.snake-game-container .btn {
    flex: 1;
    padding: 0.5rem 0;
    background: var(--panel-highlight);
    border: 2px solid var(--panel-border);
    color: var(--accent-primary);
    font-size: var(--font-size-small);
    cursor: pointer;
    transition: all 0.2s;
}

.snake-game-container .btn:hover {
    background: var(--panel-border);
    color: var(--text-primary);
}

.snake-game-container .terminal-panel {
    position: absolute;
    left: 20px;
    bottom: 20px;
    width: 300px;
    height: 150px;
    background: var(--panel-bg);
    border: 4px solid var(--panel-border);
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .terminal-header {
    padding: 0.5rem 0.625rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: var(--font-size-small);
    color: var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .terminal-content {
    padding: 0.625rem;
    height: calc(100% - 31px);
    overflow-y: auto;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.4;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.snake-game-container .terminal-content::-webkit-scrollbar {
    display: none;
}

.snake-game-container .terminal-line {
    margin-bottom: 0.3125rem;
}

.snake-game-container .command-line {
    color: white;
}

.snake-game-container .regular-line {
    color: var(--accent-tertiary);
}

.snake-game-container .typing {
    position: relative;
}

.snake-game-container .typing::after {
    content: "_";
    position: absolute;
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;
}

@-webkit-keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.snake-game-container .floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

.snake-game-container .particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    pointer-events: none;
}

.snake-game-container .meteor {
    pointer-events: none;
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    visibility: visible !important;
    overflow: visible !important;
}

.snake-game-container .game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.snake-game-container .game-over-title {
    font-size: var(--font-size-title);
    color: var(--accent-primary);
    margin-bottom: 2rem;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .game-over-score {
    font-size: var(--font-size-section-title);
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .restart-btn {
    padding: 1rem 2rem;
    background: var(--panel-highlight);
    border: 4px solid var(--panel-border);
    color: var(--accent-primary);
    font-size: var(--font-size-body);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2rem;
}

.snake-game-container .restart-btn:hover {
    background: var(--panel-border);
    color: var(--text-primary);
}

.snake-game-container .game-over-credits {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    margin-top: 1rem;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .game-over-credits a {
    color: var(--accent-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}

.snake-game-container .game-over-credits a:hover {
    color: var(--accent-primary);
}

.snake-game-container .pixel-art {
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.snake-game-container .preloader-container {
    width: 180px;
    height: 180px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--accent-primary);
    overflow: hidden;
    background-color: rgba(10, 10, 26, 0.5);
}

.snake-game-container .pixel-loader {
    width: 120px;
    height: 120px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.snake-game-container .pixel-snake {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--accent-primary);
    box-shadow: 16px 0 0 var(--accent-primary), 32px 0 0 var(--accent-primary),
    48px 0 0 var(--accent-primary);
    -webkit-animation: snake-move 2s infinite;
    animation: snake-move 2s infinite;
}

.snake-game-container .pixel-food {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--food-color);
    right: 0;
    -webkit-animation: food-pulse 1s infinite;
    animation: food-pulse 1s infinite;
}

.snake-game-container .loading-progress {
    position: absolute;
    bottom: 10px;
    width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--panel-border);
}

.snake-game-container .loading-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 0.2s;
}

@-webkit-keyframes snake-move {
    0% {
        transform: translateX(-80px);
    }
    50% {
        transform: translateX(20px);
    }
    100% {
        transform: translateX(-80px);
    }
}

@keyframes snake-move {
    0% {
        transform: translateX(-80px);
    }
    50% {
        transform: translateX(20px);
    }
    100% {
        transform: translateX(-80px);
    }
}

@-webkit-keyframes food-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes food-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.snake-game-container .score-popup {
    position: absolute;
    font-size: var(--font-size-body);
    color: var(--accent-tertiary);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    z-index: 10;
    pointer-events: none;
}

.snake-game-container .story-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 400px;
    background: var(--panel-bg);
    border: 4px solid var(--panel-border);
    overflow: hidden;
    pointer-events: auto;
    z-index: 10;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
}

.snake-game-container .story-header {
    padding: 0.5rem 0.625rem;
    background: rgba(0, 0, 0, 0.3);
    font-size: var(--font-size-small);
    color: var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.snake-game-container .story-content {
    padding: 0.625rem;
    height: 150px;
    overflow-y: auto;
    font-size: var(--font-size-small);
    color: var(--text-primary);
    line-height: 1.5;
    text-transform: uppercase;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.snake-game-container .story-content::-webkit-scrollbar {
    display: none;
}

.snake-game-container .start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 26, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.snake-game-container .start-title {
    font-size: var(--font-size-title);
    color: var(--accent-primary);
    margin-bottom: 2rem;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.snake-game-container .start-subtitle {
    font-size: var(--font-size-body);
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.snake-game-container .start-btn {
    padding: 1rem 2rem;
    background: var(--panel-highlight);
    border: 4px solid var(--panel-border);
    color: var(--accent-primary);
    font-size: var(--font-size-section-title);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 2rem;
}

.snake-game-container .start-btn:hover {
    background: var(--panel-border);
    color: var(--text-primary);
}

.snake-game-container .audio-control {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 15;
    display: none;
    visibility: hidden;
}

.snake-game-container .audio-btn {
    width: 36px;
    height: 36px;
    background: var(--panel-bg);
    border: 2px solid var(--panel-border);
    color: var(--accent-primary);
    font-size: var(--font-size-body);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.snake-game-container .meteor-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
    background-color: transparent;
}

@-webkit-keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.snake-game-container .heart-preloader-container {
    width: 180px;
    height: 180px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--accent-primary);
    background-color: rgba(10, 10, 26, 0.5);
    overflow: hidden;
}

.snake-game-container .pixel-heart-container {
    position: relative;
    width: 135px;
    height: 160px;
}

.snake-game-container .pixel-heart {
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    box-shadow: calc(2 * 15px) calc(1 * 15px) var(--accent-primary),
    calc(3 * 15px) calc(1 * 15px) var(--accent-secondary),
    calc(5 * 15px) calc(1 * 15px) #a0c8ff, calc(6 * 15px) calc(1 * 15px) #c0e0ff,
    calc(1 * 15px) calc(2 * 15px) #2a5cff,
    calc(2 * 15px) calc(2 * 15px) var(--accent-secondary),
    calc(3 * 15px) calc(2 * 15px) var(--accent-primary),
    calc(4 * 15px) calc(2 * 15px) #4f9cff, calc(5 * 15px) calc(2 * 15px) #78b8ff,
    calc(6 * 15px) calc(2 * 15px) #6ba8ff, calc(7 * 15px) calc(2 * 15px) #a0c8ff,
    calc(1 * 15px) calc(3 * 15px) #1a4cff, calc(2 * 15px) calc(3 * 15px) #2a5cff,
    calc(3 * 15px) calc(3 * 15px) var(--accent-secondary),
    calc(4 * 15px) calc(3 * 15px) #4f9cff,
    calc(5 * 15px) calc(3 * 15px) var(--accent-primary),
    calc(6 * 15px) calc(3 * 15px) #78b8ff, calc(7 * 15px) calc(3 * 15px) #6ba8ff,
    calc(1 * 15px) calc(4 * 15px) #1a4cff, calc(2 * 15px) calc(4 * 15px) #2a5cff,
    calc(3 * 15px) calc(4 * 15px) var(--accent-secondary),
    calc(4 * 15px) calc(4 * 15px) #4f9cff,
    calc(5 * 15px) calc(4 * 15px) var(--accent-primary),
    calc(6 * 15px) calc(4 * 15px) #78b8ff, calc(7 * 15px) calc(4 * 15px) #6ba8ff,
    calc(2 * 15px) calc(5 * 15px) #1a4cff, calc(3 * 15px) calc(5 * 15px) #2a5cff,
    calc(4 * 15px) calc(5 * 15px) var(--accent-secondary),
    calc(5 * 15px) calc(5 * 15px) #4f9cff,
    calc(6 * 15px) calc(5 * 15px) var(--accent-primary),
    calc(3 * 15px) calc(6 * 15px) #1a4cff, calc(4 * 15px) calc(6 * 15px) #2a5cff,
    calc(5 * 15px) calc(6 * 15px) #4f9cff, calc(4 * 15px) calc(7 * 15px) #1a4cff;
    -webkit-animation: shadow-colors 3s ease-in-out infinite;
    animation: shadow-colors 3s ease-in-out infinite;
}

@-webkit-keyframes shadow-colors {
    0%,
    100% {
        box-shadow: calc(2 * 15px) calc(1 * 15px) var(--accent-primary),
        calc(3 * 15px) calc(1 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(1 * 15px) #a0c8ff,
        calc(6 * 15px) calc(1 * 15px) #c0e0ff,
        calc(1 * 15px) calc(2 * 15px) #2a5cff,
        calc(2 * 15px) calc(2 * 15px) var(--accent-secondary),
        calc(3 * 15px) calc(2 * 15px) var(--accent-primary),
        calc(4 * 15px) calc(2 * 15px) #4f9cff,
        calc(5 * 15px) calc(2 * 15px) #78b8ff,
        calc(6 * 15px) calc(2 * 15px) #6ba8ff,
        calc(7 * 15px) calc(2 * 15px) #a0c8ff,
        calc(1 * 15px) calc(3 * 15px) #1a4cff,
        calc(2 * 15px) calc(3 * 15px) #2a5cff,
        calc(3 * 15px) calc(3 * 15px) var(--accent-secondary),
        calc(4 * 15px) calc(3 * 15px) #4f9cff,
        calc(5 * 15px) calc(3 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(3 * 15px) #78b8ff,
        calc(7 * 15px) calc(3 * 15px) #6ba8ff,
        calc(1 * 15px) calc(4 * 15px) #1a4cff,
        calc(2 * 15px) calc(4 * 15px) #2a5cff,
        calc(3 * 15px) calc(4 * 15px) var(--accent-secondary),
        calc(4 * 15px) calc(4 * 15px) #4f9cff,
        calc(5 * 15px) calc(4 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(4 * 15px) #78b8ff,
        calc(7 * 15px) calc(4 * 15px) #6ba8ff,
        calc(2 * 15px) calc(5 * 15px) #1a4cff,
        calc(3 * 15px) calc(5 * 15px) #2a5cff,
        calc(4 * 15px) calc(5 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(5 * 15px) #4f9cff,
        calc(6 * 15px) calc(5 * 15px) var(--accent-primary),
        calc(3 * 15px) calc(6 * 15px) #1a4cff,
        calc(4 * 15px) calc(6 * 15px) #2a5cff,
        calc(5 * 15px) calc(6 * 15px) #4f9cff,
        calc(4 * 15px) calc(7 * 15px) #1a4cff;
    }

    50% {
        box-shadow: calc(2 * 15px) calc(1 * 15px) var(--accent-secondary),
        calc(3 * 15px) calc(1 * 15px) var(--accent-primary),
        calc(5 * 15px) calc(1 * 15px) #c0e0ff,
        calc(6 * 15px) calc(1 * 15px) #a0c8ff,
        calc(1 * 15px) calc(2 * 15px) #6ba8ff,
        calc(2 * 15px) calc(2 * 15px) #78b8ff,
        calc(3 * 15px) calc(2 * 15px) #4f9cff,
        calc(4 * 15px) calc(2 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(2 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(2 * 15px) #2a5cff,
        calc(7 * 15px) calc(2 * 15px) #1a4cff,
        calc(1 * 15px) calc(3 * 15px) #6ba8ff,
        calc(2 * 15px) calc(3 * 15px) #78b8ff,
        calc(3 * 15px) calc(3 * 15px) var(--accent-primary),
        calc(4 * 15px) calc(3 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(3 * 15px) #a0c8ff,
        calc(6 * 15px) calc(3 * 15px) #4f9cff,
        calc(7 * 15px) calc(3 * 15px) #2a5cff,
        calc(1 * 15px) calc(4 * 15px) #6ba8ff,
        calc(2 * 15px) calc(4 * 15px) #78b8ff,
        calc(3 * 15px) calc(4 * 15px) #a0c8ff,
        calc(4 * 15px) calc(4 * 15px) var(--accent-primary),
        calc(5 * 15px) calc(4 * 15px) var(--accent-secondary),
        calc(6 * 15px) calc(4 * 15px) #2a5cff,
        calc(7 * 15px) calc(4 * 15px) #1a4cff,
        calc(2 * 15px) calc(5 * 15px) #6ba8ff,
        calc(3 * 15px) calc(5 * 15px) #78b8ff,
        calc(4 * 15px) calc(5 * 15px) #a0c8ff,
        calc(5 * 15px) calc(5 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(5 * 15px) var(--accent-secondary),
        calc(3 * 15px) calc(6 * 15px) #6ba8ff,
        calc(4 * 15px) calc(6 * 15px) #78b8ff,
        calc(5 * 15px) calc(6 * 15px) #a0c8ff,
        calc(4 * 15px) calc(7 * 15px) var(--accent-primary);
    }
}

@keyframes shadow-colors {
    0%,
    100% {
        box-shadow: calc(2 * 15px) calc(1 * 15px) var(--accent-primary),
        calc(3 * 15px) calc(1 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(1 * 15px) #a0c8ff,
        calc(6 * 15px) calc(1 * 15px) #c0e0ff,
        calc(1 * 15px) calc(2 * 15px) #2a5cff,
        calc(2 * 15px) calc(2 * 15px) var(--accent-secondary),
        calc(3 * 15px) calc(2 * 15px) var(--accent-primary),
        calc(4 * 15px) calc(2 * 15px) #4f9cff,
        calc(5 * 15px) calc(2 * 15px) #78b8ff,
        calc(6 * 15px) calc(2 * 15px) #6ba8ff,
        calc(7 * 15px) calc(2 * 15px) #a0c8ff,
        calc(1 * 15px) calc(3 * 15px) #1a4cff,
        calc(2 * 15px) calc(3 * 15px) #2a5cff,
        calc(3 * 15px) calc(3 * 15px) var(--accent-secondary),
        calc(4 * 15px) calc(3 * 15px) #4f9cff,
        calc(5 * 15px) calc(3 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(3 * 15px) #78b8ff,
        calc(7 * 15px) calc(3 * 15px) #6ba8ff,
        calc(1 * 15px) calc(4 * 15px) #1a4cff,
        calc(2 * 15px) calc(4 * 15px) #2a5cff,
        calc(3 * 15px) calc(4 * 15px) var(--accent-secondary),
        calc(4 * 15px) calc(4 * 15px) #4f9cff,
        calc(5 * 15px) calc(4 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(4 * 15px) #78b8ff,
        calc(7 * 15px) calc(4 * 15px) #6ba8ff,
        calc(2 * 15px) calc(5 * 15px) #1a4cff,
        calc(3 * 15px) calc(5 * 15px) #2a5cff,
        calc(4 * 15px) calc(5 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(5 * 15px) #4f9cff,
        calc(6 * 15px) calc(5 * 15px) var(--accent-primary),
        calc(3 * 15px) calc(6 * 15px) #1a4cff,
        calc(4 * 15px) calc(6 * 15px) #2a5cff,
        calc(5 * 15px) calc(6 * 15px) #4f9cff,
        calc(4 * 15px) calc(7 * 15px) #1a4cff;
    }

    50% {
        box-shadow: calc(2 * 15px) calc(1 * 15px) var(--accent-secondary),
        calc(3 * 15px) calc(1 * 15px) var(--accent-primary),
        calc(5 * 15px) calc(1 * 15px) #c0e0ff,
        calc(6 * 15px) calc(1 * 15px) #a0c8ff,
        calc(1 * 15px) calc(2 * 15px) #6ba8ff,
        calc(2 * 15px) calc(2 * 15px) #78b8ff,
        calc(3 * 15px) calc(2 * 15px) #4f9cff,
        calc(4 * 15px) calc(2 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(2 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(2 * 15px) #2a5cff,
        calc(7 * 15px) calc(2 * 15px) #1a4cff,
        calc(1 * 15px) calc(3 * 15px) #6ba8ff,
        calc(2 * 15px) calc(3 * 15px) #78b8ff,
        calc(3 * 15px) calc(3 * 15px) var(--accent-primary),
        calc(4 * 15px) calc(3 * 15px) var(--accent-secondary),
        calc(5 * 15px) calc(3 * 15px) #a0c8ff,
        calc(6 * 15px) calc(3 * 15px) #4f9cff,
        calc(7 * 15px) calc(3 * 15px) #2a5cff,
        calc(1 * 15px) calc(4 * 15px) #6ba8ff,
        calc(2 * 15px) calc(4 * 15px) #78b8ff,
        calc(3 * 15px) calc(4 * 15px) #a0c8ff,
        calc(4 * 15px) calc(4 * 15px) var(--accent-primary),
        calc(5 * 15px) calc(4 * 15px) var(--accent-secondary),
        calc(6 * 15px) calc(4 * 15px) #2a5cff,
        calc(7 * 15px) calc(4 * 15px) #1a4cff,
        calc(2 * 15px) calc(5 * 15px) #6ba8ff,
        calc(3 * 15px) calc(5 * 15px) #78b8ff,
        calc(4 * 15px) calc(5 * 15px) #a0c8ff,
        calc(5 * 15px) calc(5 * 15px) var(--accent-primary),
        calc(6 * 15px) calc(5 * 15px) var(--accent-secondary),
        calc(3 * 15px) calc(6 * 15px) #6ba8ff,
        calc(4 * 15px) calc(6 * 15px) #78b8ff,
        calc(5 * 15px) calc(6 * 15px) #a0c8ff,
        calc(4 * 15px) calc(7 * 15px) var(--accent-primary);
    }
}

.snake-game-container .loading-progress {
    position: absolute;
    bottom: 20px;
    width: 80%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--panel-border);
}

.snake-game-container .arrow-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.snake-game-container .arrow-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 4px 0;
}

.snake-game-container .arrow-cell {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.snake-game-container .arrow-img {
    width: 24px;
    height: 24px;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    filter: brightness(0) invert(1);
}

.snake-game-container .arrow-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    text-align: center;
}

.snake-game-container .arrow-left-right {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.snake-game-container .arrow-up {
    transform: rotate(270deg);
}

.snake-game-container .arrow-left {
    transform: rotate(180deg);
}

.snake-game-container .arrow-right {
    transform: rotate(0deg);
}

.snake-game-container .arrow-down {
    transform: rotate(90deg);
}

.snake-game-container .pixel-reveal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 999;
    pointer-events: none;
}

.snake-game-container .pixel-reveal-row {
    display: flex;
    width: 100%;
    height: 10vh;
}

.snake-game-container .pixel-reveal-block {
    width: 10vh;
    height: 100%;
    background-color: var(--bg-block-color);
    opacity: 1;
}

.snake-game-container .cat-sprite {
    opacity: 0;
    position: fixed;
    top: 50%;
    left: -10px;
    width: 64px;
    height: 64px;
    background: url("https://assets.codepen.io/7558/8-bit-cat-sprite-256.png") no-repeat 0 0;
    -ms-interpolation-mode: nearest-neighbor;
    image-rendering: -moz-crisp-edges;
    image-rendering: pixelated;
    -webkit-animation: blink 1.5s steps(4) infinite, peek 8s ease-in-out infinite;
    animation: blink 1.5s steps(4) infinite, peek 8s ease-in-out infinite;
    transform-origin: center center;
    z-index: 1000;
}

@keyframes blink {
    from {
        background-position: 0 0;
    }
    to {
        background-position: -256px 0;
    }
}

@-webkit-keyframes peek {
    0%,
    100% {
        transform: translateX(-2px);
    }
    50% {
        transform: translateX(-16px);
    }
}

@keyframes peek {
    0%,
    100% {
        transform: translateX(-2px);
    }
    50% {
        transform: translateX(-16px);
    }
}

/* Media query for small devices */
@media (max-width: 768px) {
    .snake-game-container .terminal-panel,
    .snake-game-container .story-panel,
    .snake-game-container .control-panel,
    .snake-game-container .data-panel,
    .snake-game-container .arrow-controls {
        display: none;
    }

    .snake-game-container .game-canvas-container {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .snake-game-container .game-canvas {
        max-width: 96%;
        max-height: 96%;
        border: 8px solid var(--accent-primary);
        -ms-interpolation-mode: nearest-neighbor;
        image-rendering: -moz-crisp-edges;
        image-rendering: pixelated;
        box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--accent-primary), 0 0 0 6px #000;
    }

    .snake-game-container .interface-container {
        padding: 0.5rem;
    }

    .snake-game-container .header {
        padding: 0.5rem;
    }

    .snake-game-container .start-title {
        font-size: calc(var(--font-size-title) * 0.7);
        text-align: center;
        padding: 0 1rem;
    }

    .snake-game-container .start-subtitle {
        font-size: calc(var(--font-size-body) * 0.9);
        padding: 0 1rem;
        text-align: center;
    }

    .snake-game-container .game-over-title {
        font-size: calc(var(--font-size-title) * 0.7);
        text-align: center;
    }
}