 body {
            background-color: #1a1a1a;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            margin: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: white;
            overflow: hidden;
        }

        /* --- PANTALLA DE CARGA E INICIO --- */
        #startup-screen {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background-color: #0d0d0d;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
            transition: opacity 0.5s ease;
        }

        /* Animación de la serpiente comiendo la manzana */
        .loader-container {
            position: relative;
            width: 200px;
            height: 50px;
            margin-bottom: 20px;
        }

        .loader-snake {
            position: absolute;
            width: 60px;
            height: 20px;
            background: #32CD32;
            border-radius: 5px;
            left: -100px;
            animation: snakeMove 2s infinite linear;
        }

        .loader-apple {
            position: absolute;
            width: 15px;
            height: 15px;
            background: red;
            border-radius: 50%;
            right: 20px;
            top: 2px;
            animation: appleAppear 2s infinite linear;
        }

        @keyframes snakeMove {
            0% { left: -60px; width: 60px; }
            45% { left: 120px; width: 60px; }
            50% { left: 120px; width: 80px; } /* Se estira al comer */
            60% { left: 200px; width: 40px; }
            100% { left: 250px; }
        }

        @keyframes appleAppear {
            0%, 48% { opacity: 1; transform: scale(1); }
            50%, 100% { opacity: 0; transform: scale(0); }
        }

        #loading-text {
            font-size: 18px;
            letter-spacing: 2px;
            color: #555;
        }

        #begin-button {
            display: none; /* Aparece después de la carga */
            background-color: #501414;
            color: white;
            border: 2px solid #ff4d4d;
            padding: 15px 40px;
            font-size: 20px;
            font-weight: bold;
            cursor: pointer;
            text-transform: uppercase;
            box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
            transition: transform 0.2s;
        }

        #begin-button:hover { transform: scale(1.1); background-color: #701a1a; }

        /* --- ESTILOS DEL JUEGO (Igual a los anteriores) --- */
        #scoreboard {
            width: 100%;
            max-width: 600px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 20px;
            background-color: #0d0d0d;
            border-bottom: 2px solid #501414;
            box-sizing: border-box;
            font-size: 18px;
            font-weight: bold;
        }

        #game-container {
            position: relative;
            width: 600px;
            height: 600px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            touch-action: none;
        }

        canvas { background-color: #0d0d0d; display: block; max-width: 100%; height: auto; }

        #restart-button {
            background-color: rgba(40, 40, 40, 0.9);
            color: white;
            border: 1px solid rgb(70, 70, 70);
            padding: 8px 16px;
            font-weight: bold;
            cursor: pointer;
        }

        #game-over-overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(0, 0, 0, 0.85);
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        @media (max-width: 620px) {
            #game-container, #scoreboard { width: 95vw; }
            #game-container { height: 95vw; }
        }