/* ========================================= */
/* screens.css - FONDOS Y DISEÑO DE PANTALLAS*/
/* ========================================= */

.screen-title { text-align: center; color: #fff; margin-top: 30px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.back-btn {
    margin: auto auto 20px auto;
    padding: 12px 25px;
    border-radius: 8px;
    border: 1px solid #80deea;
    background: #0d1a24;
    color: #80deea;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(128, 222, 234, 0.2);
    transition: all 0.3s ease;
}
.back-btn:hover {
    background: #80deea;
    color: #0d1a24;
    box-shadow: 0 0 20px #80deea, 0 0 40px rgba(128, 222, 234, 0.6);
    transform: scale(1.03);
}

/* 1. EL LABORATORIO PRINCIPAL (AZUL UNIFORME) */
#room-area { 
    background: linear-gradient(180deg, #4dd0e1 0%, #26c6da 100%); 
    position: relative; 
}
#room-area::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 2px, transparent 2px, transparent 8px);
    pointer-events: none; z-index: 4; 
}

/* MAQUINARIA DE FONDO (Solo Anillo) */
#lab-machinery { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.holo-ring { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%) rotateX(70deg); width: 250px; height: 250px; border: 2px dashed rgba(255, 255, 255, 0.5); border-radius: 50%; box-shadow: 0 0 30px rgba(255, 255, 255, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.2); animation: spinRing 20s linear infinite; }
@keyframes spinRing { 0% { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg); } 100% { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg); } }

/* PEDESTAL Y GENO */
#incubator-capsule { position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%); width: 220px; height: 300px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.pedestal-bottom { width: 100%; height: 60px; background: radial-gradient(ellipse at top, #2c3e50, #0a1118); border-radius: 50%; z-index: 3; border-top: 2px solid rgba(77, 208, 225, 0.9); box-shadow: 0 15px 25px rgba(0,0,0,0.6), inset 0 5px 20px rgba(77,208,225,0.3); display: flex; justify-content: center; align-items: center; }
.pedestal-light { width: 60px; height: 6px; background: #80deea; border-radius: 10px; box-shadow: 0 0 20px #80deea, 0 0 40px #4dd0e1; margin-top: 25px; }
.energy-beam { position: absolute; bottom: 30px; width: 150px; height: 250px; background: linear-gradient(to top, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%); border-radius: 50% 50% 0 0 / 20% 20% 0 0; z-index: 1; mask-image: radial-gradient(ellipse at bottom, black 40%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse at bottom, black 40%, transparent 100%); }
.energy-particle { position: absolute; bottom: 0; width: 3px; height: 12px; background: rgba(255, 255, 255, 0.9); border-radius: 10px; box-shadow: 0 0 10px #fff, 0 0 20px #80deea; animation: floatEnergy infinite ease-in; }
@keyframes floatEnergy { 0% { transform: translateY(0) scale(1); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 0.8; transform: translateY(-180px) scale(0.6); } 100% { transform: translateY(-220px) scale(0); opacity: 0; } }

/* LA SOLUCIÓN AL GENO INVISIBLE: Darle un tamaño explícito al contenedor */
#geno-container { 
    position: absolute; 
    top: 40%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 10; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    /* Estas dos líneas son la clave: fuerzan un tamaño físico de 140x140px */
    width: 140px; 
    height: 140px;
}
.geno-idle { animation: floatIdle 4s ease-in-out infinite; position: absolute; cursor: pointer; z-index: 10; width: 100%; height: 100%;}
@keyframes floatIdle { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -57%); } }
/* 2. ARCADE */
.arcade-grid { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.arcade-card { background: #0d1a24; border-radius: 12px; padding: 15px; display: flex; flex-direction: column; align-items: center; border: 1px solid #4dd0e1; cursor: pointer; color: white;}
.arcade-card.locked { opacity: 0.5; filter: grayscale(1); cursor: not-allowed; border-color: #555;}
#minigame-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
#minigame-screen.hidden {
    display: none !important;
}
#play-area { 
    flex: 1; 
    position: relative; 
    overflow: hidden; 
    background: radial-gradient(circle at center, #162430 0%, #0a1118 100%); 
}
#play-area::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(77, 208, 225, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(77, 208, 225, 0.02) 1px, transparent 1px);
    background-size: 25px 25px;
    background-position: center;
    pointer-events: none;
    z-index: 1;
}

/* Fondos específicos y dinámicos para cada minijuego */
#play-area.game-catch-bg {
    background: radial-gradient(circle at center, #0e4d3a 0%, #071a14 100%) !important;
}
#play-area.game-catch-bg::before {
    display: block !important;
    background-image: 
        linear-gradient(rgba(105, 240, 174, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(105, 240, 174, 0.15) 1px, transparent 1px) !important;
}

#play-area.game-flappy-bg {
    background: radial-gradient(circle at center, #102636 0%, #061118 100%) !important;
}
#play-area.game-flappy-bg::before {
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px) !important;
}

#play-area.game-memory-bg {
    background: radial-gradient(circle at center, #0a2d45 0%, #03121c 100%) !important;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0, 229, 255, 0.25), inset 0 0 15px rgba(138, 43, 226, 0.2) !important;
}
#play-area.game-memory-bg::before {
    display: block !important;
    background: 
        radial-gradient(circle, transparent 20%, rgba(0, 229, 255, 0.03) 21%, transparent 22%, transparent 40%, rgba(0, 229, 255, 0.03) 41%, transparent 42%, transparent 60%, rgba(0, 229, 255, 0.03) 61%, transparent 62%),
        linear-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.08) 1px, transparent 1px) !important;
    background-size: 100% 100%, 45px 45px, 45px 45px !important;
}
#play-area.game-memory-bg::after {
    content: "" !important;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.06) 0%, 
        transparent 5%, 
        transparent 95%, 
        rgba(255,255,255,0.06) 100%
    ) !important;
    border-left: 2px solid rgba(0, 229, 255, 0.35);
    border-right: 2px solid rgba(0, 229, 255, 0.35);
    box-shadow: inset 10px 0 20px rgba(0, 229, 255, 0.08), inset -10px 0 20px rgba(0, 229, 255, 0.08) !important;
}
@keyframes pulse {
    0%   { filter: drop-shadow(0 0 4px #FFD700) drop-shadow(0 0 8px rgba(255,215,0,0.5)); }
    100% { filter: drop-shadow(0 0 10px #FFD700) drop-shadow(0 0 20px rgba(255,215,0,0.8)); }
}

#falling-object { position: absolute; font-size: 30px; transition: none !important; }
#player-basket {
    position: absolute;
    width: 85px;
    height: 85px;
    bottom: 2px;
    transition: left 0.1s linear;
}
#player-basket::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 15%;
    width: 70%;
    height: 8px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    filter: blur(2px);
    z-index: -1;
}
#player-basket svg {
    width: 100%;
    height: 100%;
}
#touch-controls { position: absolute; top: 0; width: 100%; height: 100%; display: flex; z-index: 5; }
#touch-left, #touch-right { flex: 1; }
#game-header { 
    display: grid; 
    grid-template-columns: 1fr auto 1fr; 
    align-items: center; 
    padding: 8px 12px; 
    background: #0d1a24; 
    border-bottom: 1px solid #4dd0e1; 
    color: white;
    gap: 8px;
}
.back-btn.small {
    padding: 6px 12px;
    margin: 0;
    font-size: 11px;
    border-radius: 4px;
    justify-self: start;
}
#minigame-timer {
    color: #ffcc00;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 0 8px rgba(255, 204, 0, 0.3);
    white-space: nowrap;
    justify-self: center;
    text-align: center;
}
#minigame-score {
    color: #00e5ff;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    white-space: nowrap;
    justify-self: end;
    text-align: right;
}

/* 3. SANTUARIO */
.sanctuary-grid { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; overflow-y: auto; flex: 1; }
.geno-card { background: #0d1a24; border-radius: 12px; padding: 10px; text-align: center; border: 1px solid #4dd0e1; display: flex; flex-direction: column; justify-content: space-between; color: white;}
.geno-card svg { width: 60px; height: 60px; margin: 0 auto 10px auto; filter: drop-shadow(0 5px 5px rgba(0,0,0,0.5));}
.geno-card h4 { margin: 0 0 5px 0; font-size: 14px; color: #80deea; }
.geno-card p { margin: 0; font-size: 11px; color: #aaa; }
.geno-reward { font-weight: bold; color: #f0ad4e; margin: 8px 0; font-size: 13px; }
.btn-liberar-geno { background: transparent; color: #d9534f; border: 1px solid #d9534f; padding: 8px; border-radius: 6px; cursor: pointer; font-weight: bold; width: 100%; transition: all 0.2s;}
.btn-liberar-geno:hover { background: rgba(217, 83, 79, 0.2); }
.btn-liberar-geno:disabled { border-color: #555; color: #555; cursor: not-allowed; }

/* 4. REACTOR & CRIANZA (ALQUIMIA) */
.alchemy-panel { background: #0d1a24; margin: 20px; border-radius: 15px; padding: 20px; border: 1px solid #8A2BE2; display: flex; flex-direction: column; align-items: center; box-shadow: inset 0 0 20px rgba(138, 43, 226, 0.1); color: white;}
.alchemy-stats { width: 100%; display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px dashed #333;}
.alchemy-visual { font-size: 24px; background: #1a2a36; padding: 15px; border-radius: 10px; margin-bottom: 20px; width: 100%; text-align: center; letter-spacing: 2px; border: 1px solid #333;}
.btn-fuse { background: rgba(138, 43, 226, 0.2); color: #e0b0ff; border: 1px solid #8A2BE2; padding: 12px 20px; border-radius: 8px; font-weight: bold; font-size: 16px; cursor: pointer; width: 100%; transition: all 0.3s;}
.btn-fuse:hover { background: rgba(138, 43, 226, 0.4); box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);}
.btn-fuse:disabled { border-color: #555; color: #555; cursor: not-allowed; }

/* ========================================= */
/* AJUSTES GLOBALES RED NEXO                 */
/* ========================================= */

/* 1. Fuerza el fondo azul oscuro en todas las pantallas (Crianza, Arcade, etc.) */
/* MODO OSCURO PARA TODAS LAS PANTALLAS */
.app-screen {
    background-color: #0d1a24 !important; 
    color: #fff !important; 
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden;
}

/* 2. Formato de Títulos idéntico a "RED NEXO" */
.screen-title {
    text-align: center; 
    color: #80deea !important; /* El cian característico de Nexo */
    margin-top: 25px; 
    text-transform: uppercase !important; /* Fuerza las mayúsculas */
    letter-spacing: 2px !important; /* Separa las letras para darle toque Tech */
    font-size: 20px !important;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(128, 222, 234, 0.4) !important; /* Brillo neón sutil */
    border-bottom: 1px solid rgba(128, 222, 234, 0.2); /* Línea sutil debajo del título */
    padding-bottom: 15px;
}

/* ========================================= */
/* FONDO CIAN PARA EL CENTRO DE CRIANZA      */
/* ========================================= */

/* 1. Aplicamos el mismo degradado cian de la pantalla principal */
#breeding-screen {
    background: linear-gradient(180deg, #4dd0e1 0%, #26c6da 100%) !important;
}

/* 2. Añadimos el efecto de líneas de monitor (scanlines) */
#breeding-screen::before {
    content: ""; 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 2px, transparent 2px, transparent 8px);
    pointer-events: none; 
    z-index: 0; 
}

/* 3. Aseguramos que la caja oscura y los botones no queden detrás de las líneas */
#breeding-screen > * {
    position: relative;
    z-index: 1;
}

/* 4. Damos volumen y profundidad al texto (Adiós al texto plano) */
#breeding-screen h3 {
    color: #0d1a24 !important; 
    font-weight: 900 !important;
    letter-spacing: 3px !important;
    /* Doble sombra: una difuminada para separar del fondo y una nítida para darle estilo */
    text-shadow: 0px 5px 10px rgba(0, 0, 0, 0.4), 1px 2px 0px rgba(0, 0, 0, 0.3) !important;
}

#breeding-screen > p {
    color: #1a2a36 !important; 
    font-weight: 800 !important;
    /* Sombra más suave para que el texto pequeño no se manche pero gane relieve */
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25) !important;
}

/* ========================================= */
/* FIX: EVITAR SELECCIÓN AL ACARICIAR GENOS  */
/* ========================================= */
#geno-container, .geno-idle, svg {
    /* Quita el destello/recuadro de color al tocar en el celular */
    -webkit-tap-highlight-color: transparent !important;
    tap-highlight-color: transparent !important;
    
    /* Evita que el celular intente "seleccionar" la imagen al tocar rápido */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    
    /* Evita el borde de enfoque (focus) */
    outline: none !important;
}

/* ========================================= */
/* PANTALLAS DESLIZANTES: HABITACIONES GENO  */
/* ========================================= */
#main-slider-screen {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #0d1a24 !important;
}

#desktop-slider {
    display: flex;
    width: 200%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: absolute;
    top: 0;
    left: 0;
}

#room-area, #bathroom-screen {
    width: 50% !important;
    height: 100% !important;
    position: relative !important;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#bathroom-screen {
    min-height: 100% !important;
    overflow-y: auto !important;
}

.bg-bubble {
    position: absolute;
    bottom: -20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: floatBubbleUp infinite linear;
    pointer-events: none;
}

@keyframes floatBubbleUp {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-280px) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

.soap-bubble {
    position: absolute;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 0, 127, 0.4) 60%, rgba(255, 0, 127, 0.1) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(255, 0, 127, 0.3), inset 0 2px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    z-index: 1000;
    animation: bubblePop 0.8s forwards ease-out;
}

@keyframes bubblePop {
    0% {
        transform: scale(0.2) translate(0, 0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 0.9;
    }
    100% {
        transform: scale(1.3) translate(var(--dx, 10px), var(--dy, -40px));
        opacity: 0;
    }
}

.water-stream {
    position: absolute;
    width: 3px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(0, 229, 255, 0.6));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
    pointer-events: none;
    z-index: 1000;
    animation: waterFall 0.6s forwards linear;
}

@keyframes waterFall {
    0% {
        transform: translateY(0) scaleY(0.5);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(var(--dy, 80px)) translateX(var(--dx, 0px)) scaleY(1.2);
        opacity: 0;
    }
}

#tool-cursor-follower {
    position: absolute;
    pointer-events: none;
    z-index: 10000;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    transition: none !important;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}
#tool-cursor-follower svg {
    width: 100% !important;
    height: 100% !important;
}

/* ========================================= */
/* CENTRO DE CUIDADO: BOTONES DE ACCIÓN      */
/* ========================================= */

.care-action-btn {
    flex: 1;
    height: 52px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    padding: 0;
}

.care-action-btn svg {
    filter: drop-shadow(0 0 3px currentColor);
    pointer-events: none;
}

.care-action-btn:active {
    transform: scale(0.95);
}

.care-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.care-btn-pink {
    color: #ff007f;
    background: rgba(255, 0, 127, 0.08);
    border: 1.5px solid rgba(255, 0, 127, 0.4);
}
.care-btn-pink:hover:not(:disabled) {
    background: rgba(255, 0, 127, 0.2);
    border-color: #ff007f;
    box-shadow: 0 0 12px rgba(255, 0, 127, 0.3);
}

.care-btn-blue {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.08);
    border: 1.5px solid rgba(0, 210, 255, 0.4);
}
.care-btn-blue:hover:not(:disabled) {
    background: rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

.care-btn-orange {
    color: #ff7043;
    background: rgba(255, 112, 67, 0.08);
    border: 1.5px solid rgba(255, 112, 67, 0.4);
}
.care-btn-orange:hover:not(:disabled) {
    background: rgba(255, 112, 67, 0.2);
    border-color: #ff7043;
    box-shadow: 0 0 12px rgba(255, 112, 67, 0.3);
}

.care-btn-green {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.08);
    border: 1.5px solid rgba(76, 175, 80, 0.4);
}
.care-btn-green:hover:not(:disabled) {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
}



/* Sub-panel de limpieza: ocultar con clase hidden */
#care-clean-tools.hidden {
    display: none !important;
}

/* ============================================= */
/* ANIMACIÓN DE DESCANSO / RECUPERACIÓN DE GENO  */
/* ============================================= */
@keyframes restLineRise {
    0%   { transform: translateY(0) scaleY(0); opacity: 0; }
    12%  { opacity: 1; transform: translateY(0) scaleY(1); }
    80%  { opacity: 0.6; }
    100% { transform: translateY(-160px) scaleY(0.3); opacity: 0; }
}
@keyframes restBoltFloat {
    0%   { transform: translateY(0) scale(0.6); opacity: 0; }
    20%  { opacity: 1; transform: translateY(-18px) scale(1); }
    75%  { opacity: 0.8; }
    100% { transform: translateY(-120px) scale(0.7); opacity: 0; }
}

/* Contenedor del aura — se posiciona absolutamente sobre el Geno */
.geno-resting-aura {
    pointer-events: none;
    overflow: visible;
}

/* Línea verde que sube */
.rest-line {
    position: absolute;
    bottom: 0;
    width: 1px;
    border-radius: 2px;
    background: linear-gradient(to top, #4CAF50 0%, #a5d6a7 60%, transparent 100%);
    box-shadow: 0 0 5px #4CAF50, 0 0 12px rgba(76, 175, 80, 0.3);
    animation: restLineRise ease-in infinite;
    transform-origin: bottom center;
}

/* Rayo flotante pequeño */
.rest-bolt {
    position: absolute;
    bottom: 0;
    animation: restBoltFloat ease-in infinite;
    filter: drop-shadow(0 0 5px #4CAF50);
}

/* ========================================= */
/* VISTAS DE PERFIL SIMULADAS Y FLAPPY GENO  */
/* ========================================= */

#flappy-player {
    position: absolute;
    width: 65px;
    height: 65px;
    z-index: 10;
}
#flappy-player svg {
    width: 100%;
    height: 100%;
}

/* Perfil Izquierdo (Simulado 3D sin cosméticos) */
.profile-left .g-ojos > *, .profile-view .g-ojos > * {
    transform: translate(-16px, 0px) scaleX(0.65) !important;
    transform-origin: 80px 85px !important;
}
.profile-left .g-boca > *, .profile-view .g-boca > * {
    transform: translate(-14px, 1px) scaleX(0.65) !important;
    transform-origin: 80px 110px !important;
}
.profile-left .g-cuerpo, .profile-view .g-cuerpo {
    transform: scaleX(0.92) translate(-4px, 0px) !important;
    transform-origin: 80px 136px !important;
}
/* Ocultar cosméticos (sombreros, alas, drones, auras y efectos) */
.profile-left .g-sombrero-anchor, .profile-view .g-sombrero-anchor,
.profile-left .g-alas-anchor, .profile-view .g-alas-anchor,
.profile-left .g-dron-anchor, .profile-view .g-dron-anchor,
.profile-left [class*="anim-holograma"], .profile-view [class*="anim-holograma"],
.profile-left [class*="anim-emblema"], .profile-view [class*="anim-emblema"] {
    display: none !important;
}
.profile-left svg > *:not(defs):not(style):not(.g-cuerpo),
.profile-view svg > *:not(defs):not(style):not(.g-cuerpo) {
    display: none !important;
}

/* Perfil Derecho (Simulado 3D sin cosméticos) */
.profile-right .g-ojos > *, .profile-view-right .g-ojos > * {
    transform: translate(16px, 0px) scaleX(0.65) !important;
    transform-origin: 80px 85px !important;
}
.profile-right .g-boca > *, .profile-view-right .g-boca > * {
    transform: translate(14px, 1px) scaleX(0.65) !important;
    transform-origin: 80px 110px !important;
}
.profile-right .g-cuerpo, .profile-view-right .g-cuerpo {
    transform: scaleX(0.92) translate(4px, 0px) !important;
    transform-origin: 80px 136px !important;
}
/* Ocultar cosméticos (sombreros, alas, drones, auras y efectos) */
.profile-right .g-sombrero-anchor, .profile-view-right .g-sombrero-anchor,
.profile-right .g-alas-anchor, .profile-view-right .g-alas-anchor,
.profile-right .g-dron-anchor, .profile-view-right .g-dron-anchor,
.profile-right [class*="anim-holograma"], .profile-view-right [class*="anim-holograma"],
.profile-right [class*="anim-emblema"], .profile-view-right [class*="anim-emblema"] {
    display: none !important;
}
.profile-right svg > *:not(defs):not(style):not(.g-cuerpo),
.profile-view-right svg > *:not(defs):not(style):not(.g-cuerpo) {
    display: none !important;
}

/* ========================================= */
/* RUNNER GENO (CARRERA DEL NEXO)            */
/* ========================================= */
#runner-player {
    position: absolute;
    width: 65px;
    height: 65px;
    z-index: 10;
}
#runner-player svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.runner-ground-line {
    position: absolute;
    bottom: 135px; /* Anclado a 135px del fondo para alinearse con el subsuelo */
    left: 0;
    width: 100%;
    height: 3px;
    background: #00ffcc;
    box-shadow: 0 0 8px #00ffcc, 0 0 15px rgba(0, 255, 204, 0.5);
    z-index: 2;
}
.runner-obstacle {
    position: absolute;
    z-index: 8; /* Aumentado a 8 para estar siempre sobre el subsuelo y la línea de superficie */
}
.runner-obstacle svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.runner-cell {
    position: absolute;
    z-index: 8; /* Aumentado a 8 para estar siempre visible sobre los fondos y el subsuelo */
    animation: cellFloat 1.2s infinite ease-in-out;
}
.runner-cell svg {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
@keyframes cellFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes runnerWarningFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.runner-warning {
    animation: runnerWarningFlash 0.4s infinite ease-in-out;
}

#play-area.game-runner-bg {
    background: linear-gradient(180deg, #0f051c 0%, #150930 50%, #08111e 100%) !important;
}
#play-area.game-runner-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(138, 43, 226, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 43, 226, 0.15) 1px, transparent 1px);
    background-size: 35px 35px;
    pointer-events: none;
    z-index: 1;
}
#play-area.game-runner-bg::after {
    content: "";
    position: absolute;
    bottom: 120px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(0deg, rgba(0, 255, 204, 0.12) 0%, transparent 100%);
    pointer-events: none;
    z-index: 3;
}
.runner-far-bg, .runner-mid-bg, .runner-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 135px);
    pointer-events: none;
}

.runner-far-bg {
    z-index: 1;
    background: radial-gradient(circle at center, #1b0a30 0%, #080310 100%);
}

.runner-mid-bg {
    z-index: 2;
    background-size: 400px 100%;
    background-repeat: repeat-x;
    /* Ondas neón puras con frecuencia y amplitud intermedia perfectamente calibrada y brillo de neón, separadas verticalmente */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="300" viewBox="0 0 400 300"><defs><filter id="neon-glow" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="4.5" result="blur"/><feMerge><feMergeNode in="blur"/><feMergeNode in="SourceGraphic"/></feMerge></filter></defs><path d="M 0 35 Q 100 110 200 35 T 400 35" fill="none" stroke="%23ff007f" stroke-width="4" filter="url(%23neon-glow)"/><path d="M 0 85 Q 100 20 200 85 T 400 85" fill="none" stroke="%2300e5ff" stroke-width="3" filter="url(%23neon-glow)"/><path d="M 0 135 Q 100 200 200 135 T 400 135" fill="none" stroke="%23ffd54f" stroke-width="2" filter="url(%23neon-glow)"/></svg>');
    animation: neon-pulse 3.5s ease-in-out infinite;
}

@keyframes neon-pulse {
    0%, 100% {
        opacity: 0.30;
        filter: drop-shadow(0 0 3px rgba(0, 229, 255, 0.2));
    }
    50% {
        opacity: 0.75;
        filter: drop-shadow(0 0 12px rgba(255, 0, 127, 0.6));
    }
}

.runner-grid-bg {
    z-index: 3;
    opacity: 0.12;
    background-size: 30px 30px;
    background-repeat: repeat;
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.15) 1px, transparent 1px);
}

/* Animación de carrera (bobbing y rotación step-by-step) del Geno */
#runner-player.running svg {
    animation: runner-bob 0.45s linear infinite;
    transform-origin: bottom center;
}

#runner-player:not(.running) svg {
    transform: rotate(-10deg);
    transition: transform 0.15s ease-out;
}

@keyframes runner-bob {
    0% { transform: scaleY(1) translateY(0) rotate(0deg); }
    25% { transform: scaleY(0.94) translateY(1.5px) rotate(3deg); }
    50% { transform: scaleY(1) translateY(0) rotate(0deg); }
    75% { transform: scaleY(0.94) translateY(1.5px) rotate(-3deg); }
    100% { transform: scaleY(1) translateY(0) rotate(0deg); }
}
.runner-subfloor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 135px;
    background: linear-gradient(180deg, #101925 0%, #05080c 100%);
    border-top: 4px solid #00ffcc;
    box-shadow: 0 -4px 20px rgba(0, 255, 204, 0.6);
    pointer-events: none;
    z-index: 5;
}

.runner-subfloor-stripes {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 12px;
    background: repeating-linear-gradient(
        -45deg,
        #ffd54f,
        #ffd54f 10px,
        #05080c 10px,
        #05080c 20px
    );
    background-size: 28px 100%;
    pointer-events: none;
    opacity: 0.95;
    z-index: 6;
}

.runner-subfloor-grid {
    position: absolute;
    top: 12px; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 204, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.08) 2px, transparent 2px);
    background-size: 25px 25px;
    pointer-events: none;
    z-index: 5;
}

/* ========================================= */
/* DNA SORTER (CLASIFICADOR DE ADN)          */
/* ========================================= */
#play-area.game-sorting-bg {
    background: 
        linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at center, #1b1e36 0%, #090a14 100%) !important;
    background-size: 25px 25px, 25px 25px, 100% 100% !important;
    position: relative;
    box-shadow: inset 0 0 40px rgba(0, 229, 255, 0.15);
}

/* El cuerpo del tubo de ensayo de vidrio */
#play-area.game-sorting-bg::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 220px;
    min-width: 160px;
    height: calc(100% - 15px);
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.02) 15%, 
        rgba(255, 255, 255, 0) 50%, 
        rgba(255, 255, 255, 0.02) 85%, 
        rgba(255, 255, 255, 0.08) 100%
    );
    border: 2px solid rgba(0, 229, 255, 0.35);
    border-top: none;
    border-radius: 0 0 110px 110px; /* Fondo redondeado de tubo de ensayo */
    box-shadow: 
        0 0 25px rgba(0, 229, 255, 0.2),
        inset 0 0 20px rgba(0, 229, 255, 0.15),
        inset -12px 0 15px rgba(255, 255, 255, 0.08),
        inset 12px 0 15px rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* El líquido químico neón en el fondo del tubo */
#play-area.game-sorting-bg::after {
    content: "";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 220px;
    min-width: 160px;
    height: 100px; /* Cubre el fondo del tubo */
    background: linear-gradient(180deg, rgba(224, 64, 251, 0.25) 0%, rgba(0, 229, 255, 0.5) 100%);
    border-radius: 0 0 110px 110px;
    box-shadow: 
        inset 0 8px 15px rgba(0, 229, 255, 0.5),
        0 0 25px rgba(0, 229, 255, 0.3);
    border-top: 2px dashed rgba(0, 229, 255, 0.7);
    z-index: 1;
    pointer-events: none;
}

/* Receptáculos de clasificación (Izquierda y Derecha) */
.sorting-zone-left, .sorting-zone-right {
    position: absolute;
    top: 0;
    width: 25%; /* Ajustado de 33% a 25% para alinearse con los bordes del tubo */
    height: calc(100% - 120px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    pointer-events: none;
    transition: background 0.2s ease;
}
.sorting-zone-left {
    left: 0;
    border-right: 2px dashed rgba(0, 229, 255, 0.3);
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.06) 0%, transparent 100%);
}
.sorting-zone-right {
    right: 0;
    border-left: 2px dashed rgba(224, 64, 251, 0.3);
    background: linear-gradient(-90deg, rgba(224, 64, 251, 0.06) 0%, transparent 100%);
}

.sorting-zone-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 9px; /* Reducido para evitar solapamiento en pantallas angostas */
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.5px;
    opacity: 0.85;
    text-transform: uppercase;
    white-space: normal; /* Permitir salto de línea */
    padding: 0 6px;
    line-height: 1.4;
}
.sorting-zone-left .sorting-zone-label {
    color: #00e5ff;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}
.sorting-zone-right .sorting-zone-label {
    color: #ff007f;
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.5);
}

/* El Bio-Núcleo */
.sorting-nucleus {
    position: absolute;
    width: 64px;
    height: 64px;
    cursor: grab;
    z-index: 5;
    user-select: none;
    touch-action: none;
}
.sorting-nucleus:active {
    cursor: grabbing;
}
.sorting-nucleus svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Badge de Combo */
.sorting-combo-badge {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 10;
    pointer-events: none;
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
}
.sorting-combo-badge.combo-x1 {
    color: #b0bec5;
    background: rgba(30, 30, 45, 0.85);
    border-color: rgba(176, 190, 197, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.sorting-combo-badge.combo-x2 {
    color: #ffd54f;
    background: rgba(45, 38, 10, 0.9);
    border-color: #ffd54f;
    box-shadow: 0 0 10px rgba(255, 213, 79, 0.45);
    transform: translateX(-50%) scale(1.08);
}
.sorting-combo-badge.combo-x3 {
    color: #ff007f;
    background: rgba(45, 10, 32, 0.95);
    border-color: #ff007f;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.6);
    animation: BP-pulse-glow 0.8s infinite alternate;
    transform: translateX(-50%) scale(1.15);
}

/* Textos flotantes (+EV / -EV) */
.sorting-floating-text {
    position: absolute;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 900;
    z-index: 100;
    pointer-events: none;
    animation: sortFloatUp 0.8s forwards ease-out;
}
.sorting-floating-text.correct {
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc, 0 0 20px rgba(0, 255, 204, 0.5);
}
.sorting-floating-text.fail {
    color: #ff1744;
    text-shadow: 0 0 10px #ff1744, 0 0 20px rgba(255, 23, 68, 0.5);
}

@keyframes sortFloatUp {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -100px) scale(1.2);
        opacity: 0;
    }
}

/* Animaciones y estilos para botes especiales del Clasificador */
@keyframes bombBlink {
    0%, 100% { filter: drop-shadow(0 0 6px #ff3d00); }
    50% { filter: drop-shadow(0 0 14px #ff3d00) drop-shadow(0 0 2px #ff1744); }
}
.sorting-nucleus.bomb {
    animation: bombBlink 0.6s infinite ease-in-out;
}
.sorting-bomb-glow {
    transform-origin: center;
    animation: bombGlowPulse 0.6s infinite alternate ease-in-out;
}
@keyframes bombGlowPulse {
    0% { opacity: 0.25; transform: scale(0.9); }
    100% { opacity: 0.55; transform: scale(1.1); }
}

@keyframes goldGlow {
    0%, 100% { filter: drop-shadow(0 0 5px #ffd54f); }
    50% { filter: drop-shadow(0 0 12px #ffd54f) drop-shadow(0 0 2px #ffb300); }
}
.sorting-nucleus.gold {
    animation: goldGlow 0.8s infinite ease-in-out;
}

.sorting-floating-text.gold {
    color: #ffd54f;
    text-shadow: 0 0 10px #ffd54f, 0 0 20px rgba(255, 213, 79, 0.6);
}

/* Estilos para el Bio-Núcleo de Toxina (Calavera Verde Radioactiva) y Alerta de Controles Invertidos */
@keyframes toxicGlow {
    0%, 100% { filter: drop-shadow(0 0 5px #39ff14); }
    50% { filter: drop-shadow(0 0 14px #39ff14) drop-shadow(0 0 2px #20c20e); }
}
.sorting-nucleus.toxic {
    animation: toxicGlow 0.7s infinite ease-in-out;
}

.sorting-warning-inverted {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(4, 26, 4, 0.9);
    border: 2px solid #39ff14;
    border-radius: 8px;
    color: #39ff14;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 16px;
    text-align: center;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4), inset 0 0 10px rgba(57, 255, 20, 0.2);
    z-index: 1000;
    pointer-events: none;
    animation: warningFlash 0.5s infinite alternate ease-in-out;
}

@keyframes warningFlash {
    0% {
        opacity: 0.6;
        box-shadow: 0 0 5px rgba(57, 255, 20, 0.2);
    }
    100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(57, 255, 20, 0.7);
    }
}

/* Modo Pánico - Alerta visual de fin de tiempo */
#play-area.panic-mode {
    animation: panicFlash 0.5s infinite alternate ease-in-out;
}

@keyframes panicFlash {
    0% {
        box-shadow: inset 0 0 15px rgba(255, 23, 68, 0.2);
        border: 2px solid rgba(255, 23, 68, 0.2);
    }
    100% {
        box-shadow: inset 0 0 40px rgba(255, 23, 68, 0.6);
        border: 2px solid #ff1744;
    }
}

/* ========================================= */
/* DEFENSA INMUNE (WHACK-A-MOLE)            */
/* ========================================= */

#play-area.game-defense-bg {
    background: 
        /* Rejilla técnica neón de laboratorio */
        linear-gradient(rgba(0, 229, 255, 0.08) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.08) 1.5px, transparent 1.5px),
        /* Brillo de célula cian izquierda */
        radial-gradient(circle at 20% 30%, rgba(0, 229, 255, 0.22) 0%, transparent 60%),
        /* Brillo de célula magenta derecha */
        radial-gradient(circle at 80% 75%, rgba(224, 64, 251, 0.22) 0%, transparent 60%),
        /* Degradado base muy colorido y futurista */
        linear-gradient(135deg, #28144d 0%, #153258 50%, #0d2938 100%) !important;
    background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%, 100% 100% !important;
    position: relative;
    box-shadow: 
        inset 0 0 60px rgba(0, 229, 255, 0.25),
        inset 0 0 120px rgba(224, 64, 251, 0.15);
}

.defense-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 14px;
    width: 90%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.defense-capsule {
    position: relative;
    background: rgba(18, 12, 32, 0.88); /* Menos translúcida (más sólida y definida) */
    border: 2px solid rgba(170, 0, 255, 0.65); /* Borde neón púrpura más vibrante */
    border-radius: 18px;
    box-shadow: 
        0 6px 15px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(170, 0, 255, 0.15);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.defense-capsule:active {
    transform: scale(0.95);
}

/* Capa de brillo de vidrio de la cápsula */
.defense-capsule-glass {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
    z-index: 3;
}

/* Contenido de la cápsula */
.defense-capsule-content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    box-sizing: border-box;
    z-index: 2;
}

/* Entidades */
.defense-entity {
    width: 100%;
    height: 100%;
    animation: entityPopIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: center;
}

@keyframes entityPopIn {
    0% { transform: scale(0) rotate(-15deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Animación de sacudida (advertencia de escape) */
.defense-capsule.shaking {
    animation: shakeCapsule 0.15s infinite alternate ease-in-out;
}
.defense-capsule.shaking.shaking-danger {
    border-color: rgba(255, 23, 68, 0.8) !important;
    box-shadow: 0 0 14px rgba(255, 23, 68, 0.5) !important;
}
.defense-capsule.shaking.shaking-safe {
    border-color: rgba(0, 230, 118, 0.8) !important;
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.5) !important;
    animation: shakeCapsuleSafe 0.2s infinite alternate ease-in-out;
}

@keyframes shakeCapsule {
    0% { transform: translate(-2px, 0) rotate(-1deg); }
    100% { transform: translate(2px, 0) rotate(1deg); }
}
@keyframes shakeCapsuleSafe {
    0% { transform: translate(-1px, 0) rotate(-0.5deg); }
    100% { transform: translate(1px, 0) rotate(0.5deg); }
}

/* Desactivación exitosa (Impacto de virus) */
.defense-capsule.tapped-success {
    border-color: #00e5ff !important;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6), inset 0 0 15px rgba(0, 229, 255, 0.3) !important;
    background: rgba(0, 229, 255, 0.05);
}

/* Expiración segura (Desaparición de Anticuerpos) */
.defense-capsule.tapped-success-green {
    border-color: #00e676 !important;
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.6), inset 0 0 15px rgba(0, 230, 118, 0.3) !important;
    background: rgba(0, 230, 118, 0.05);
}

/* Error por tocar Aliado */
.defense-capsule.tapped-fail {
    border-color: #ff1744 !important;
    box-shadow: 0 0 25px rgba(255, 23, 68, 0.7), inset 0 0 15px rgba(255, 23, 68, 0.4) !important;
    background: rgba(255, 23, 68, 0.08);
}

/* Animación de colapso de cápsula cuando escapa un virus */
.defense-capsule.capsule-broken {
    animation: capsuleFracture 0.5s ease-out forwards;
}

@keyframes capsuleFracture {
    0% {
        border-color: #ff3d00;
        box-shadow: 0 0 25px rgba(255, 61, 0, 0.8), inset 0 0 20px rgba(255, 61, 0, 0.5);
        transform: scale(0.9);
        opacity: 1;
    }
    50% {
        background: rgba(255, 61, 0, 0.15);
        opacity: 0.8;
    }
    100% {
        border-color: rgba(170, 0, 255, 0.25);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================= */
/* MINIJUEGO 7 - APILA-NÚCLEOS (STACKER)     */
/* ========================================= */

#play-area.game-stacker-bg {
    background: linear-gradient(180deg, #18092b 0%, #0c1520 100%);
    position: relative;
    overflow: hidden;
}

#play-area.game-stacker-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(45deg, #ffeb3b, #ffeb3b 10px, #111 10px, #111 20px);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(255, 235, 59, 0.4);
}

.stacker-crane-rail {
    position: absolute;
    top: 25px;
    left: 5%;
    width: 90%;
    height: 4px;
    background: #ffeb3b;
    box-shadow: 0 0 10px #ffeb3b, 0 0 20px rgba(255, 235, 59, 0.5);
    z-index: 8;
    border-radius: 2px;
}

.stacker-crane-claw {
    position: absolute;
    top: 15px;
    width: 24px;
    height: 24px;
    background: #263238;
    border: 2.5px solid #ffeb3b;
    box-shadow: 0 0 12px rgba(255, 235, 59, 0.6);
    border-radius: 4px;
    z-index: 9;
    transition: left 0.02s linear;
}

.stacker-rope {
    position: absolute;
    top: 36px;
    width: 2px;
    background: linear-gradient(180deg, #ffeb3b, #00e5ff);
    box-shadow: 0 0 8px #00e5ff, 0 0 15px rgba(0, 229, 255, 0.5);
    z-index: 7;
    transition: left 0.02s linear;
}

.stacker-tower-container {
    transition: transform 0.02s linear;
}

.stacker-base {
    position: absolute;
    background: linear-gradient(90deg, #37474f, #90a4ae, #37474f);
    border: 2px solid #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5), inset 0 0 10px rgba(0, 229, 255, 0.3);
    border-radius: 4px 4px 0 0;
    z-index: 6;
}

.stacker-block {
    position: absolute;
    background: linear-gradient(180deg, #0d253f 0%, #1565c0 100%);
    border: 2px solid #00e5ff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.5), inset 0 0 8px rgba(0, 229, 255, 0.3);
    border-radius: 4px;
    z-index: 6;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stacker-block::after {
    content: "🧬";
    font-size: 11px;
    text-shadow: 0 0 4px #00e5ff;
}

.stacker-block.active {
    background: linear-gradient(180deg, #0a1f1d 0%, #00acc1 100%);
    border-color: #00e5ff;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.7);
    transition: left 0.02s linear;
}

.stacker-block.perfect {
    animation: perfectPulse 0.4s ease-out;
}

.stacker-block.sliced {
    animation: slicePulse 0.4s ease-out;
}

.stacker-block.falling-dead {
    border-color: #ff1744 !important;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.8) !important;
    background: rgba(255, 23, 68, 0.15) !important;
    z-index: 5;
}

.sliced-piece {
    position: absolute;
    background: linear-gradient(180deg, #3e2723 0%, #d84315 100%);
    border: 1.5px solid #ff5722;
    box-shadow: 0 0 10px rgba(255, 87, 34, 0.6);
    border-radius: 2px;
    z-index: 4;
    box-sizing: border-box;
    opacity: 0.85;
}

#play-area.crash-flash {
    animation: screenCrash 0.6s ease-out;
}

@keyframes perfectPulse {
    0% { border-color: #00e676; box-shadow: 0 0 25px #00e676, inset 0 0 15px #00e676; background: rgba(0, 230, 118, 0.2); transform: scale(1.03); }
    100% { border-color: #00e5ff; box-shadow: 0 0 12px rgba(0, 229, 255, 0.5); transform: scale(1); }
}

@keyframes slicePulse {
    0% { border-color: #ff9100; box-shadow: 0 0 20px #ff9100, inset 0 0 12px #ff9100; background: rgba(255, 145, 0, 0.2); }
    100% { border-color: #00e5ff; box-shadow: 0 0 12px rgba(0, 229, 255, 0.5); }
}

@keyframes screenCrash {
    0% { box-shadow: inset 0 0 35px rgba(255, 23, 68, 0.8); background: rgba(255, 23, 68, 0.2); }
    100% { box-shadow: none; background: transparent; }
}

/* ========================================= */
/* MINIJUEGO 8 - BURBUJAS ELEMENTALES        */
/* ========================================= */

#play-area.game-bubbles-bg {
    background: linear-gradient(180deg, #090916 0%, #0d1222 100%);
    position: relative;
    overflow: hidden;
}

/* Rejilla cibernética sutil de fondo */
#play-area.game-bubbles-bg::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

.danger-threshold-line {
    border-top: 1.5px dashed #ff1744;
    box-shadow: 0 0 8px rgba(255, 23, 68, 0.4);
    opacity: 0.85;
    z-index: 3;
    pointer-events: none;
    animation: laserPulse 1.2s infinite alternate ease-in-out;
}

@keyframes laserPulse {
    0% { opacity: 0.4; box-shadow: 0 0 4px rgba(255, 23, 68, 0.2); }
    100% { opacity: 0.95; box-shadow: 0 0 12px rgba(255, 23, 68, 0.6); }
}

.aim-guide-line {
    stroke: #00e5ff;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 4px #00e5ff);
    opacity: 0.65;
}

/* Cañón */
.bubble-cannon {
    z-index: 5;
    pointer-events: none;
}

.cannon-pipe {
    position: absolute;
    top: 0;
    left: 11px;
    width: 14px;
    height: 32px;
    background: linear-gradient(90deg, #37474f, #78909c, #37474f);
    border: 2px solid #00e5ff;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
    border-radius: 4px 4px 0 0;
}

.cannon-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 18px;
    background: linear-gradient(180deg, #546e7a, #263238);
    border: 2px solid #00e5ff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Burbujas */
.elemental-bubble {
    border-radius: 50%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
}

/* Tipos elementales */
.elemental-bubble.biomutante svg { filter: drop-shadow(0 0 4px #00e676); }
.elemental-bubble.viral svg { filter: drop-shadow(0 0 4px #d500f9); }
.elemental-bubble.cibernetico svg { filter: drop-shadow(0 0 4px #00e5ff); }
.elemental-bubble.radiactivo svg { filter: drop-shadow(0 0 4px #ff9100); }
.elemental-bubble.toxico svg { filter: drop-shadow(0 0 4px #c6ff00); }
.elemental-bubble.sintetico svg { filter: drop-shadow(0 0 4px #ff007f); }

/* Animación de reventado (Pop) */
.elemental-bubble.pop {
    animation: popBubble 0.22s forwards cubic-bezier(0.1, 0.8, 0.3, 1);
    pointer-events: none;
    z-index: 10;
}

@keyframes popBubble {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.8; filter: brightness(1.5) blur(1px); }
    100% { transform: scale(0.1); opacity: 0; }
}

/* Burbujas caídas (físicas) */
.elemental-bubble.falling {
    pointer-events: none;
    z-index: 4;
    opacity: 0.85;
}

/* Alertas de Recompensas Pendientes en Menú Lateral */
@keyframes drawerRedPulse {
    0% {
        box-shadow: 4px 0 6px rgba(255, 23, 68, 0.4);
        border-color: rgba(255, 23, 68, 0.5) !important;
        color: #ff1744 !important;
        text-shadow: 0 0 4px rgba(255, 23, 68, 0.4) !important;
    }
    100% {
        box-shadow: 6px 0 15px rgba(255, 23, 68, 0.9), 4px 0 10px rgba(255, 23, 68, 0.5);
        border-color: #ff1744 !important;
        color: #ff8a80 !important;
        text-shadow: 0 0 8px rgba(255, 23, 68, 0.8) !important;
    }
}

.drawer-alert-glow {
    animation: drawerRedPulse 1.0s infinite alternate ease-in-out !important;
    background: rgba(45, 10, 20, 0.98) !important;
}

.drawer-alert-glow:hover {
    color: #ffffff !important;
    text-shadow: 0 0 6px #ffffff !important;
    box-shadow: 6px 0 20px rgba(255, 23, 68, 0.9), 4px 0 10px rgba(255, 23, 68, 0.6) !important;
}

@keyframes buttonAlertPulse {
    0% {
        box-shadow: 0 0 4px rgba(255, 23, 68, 0.3);
        border-color: rgba(255, 23, 68, 0.4) !important;
    }
    100% {
        box-shadow: 0 0 12px rgba(255, 23, 68, 0.75);
        border-color: #ff1744 !important;
    }
}

.btn-alert-pulse {
    animation: buttonAlertPulse 1.0s infinite alternate ease-in-out !important;
    text-shadow: 0 0 4px rgba(255, 23, 68, 0.5) !important;
}

/* Animaciones de Daño y Explosiones de Bombas (Lluvia de Manzanas) */
.damage-flash {
    animation: damage-flash-anim 0.15s ease-in-out infinite alternate !important;
}

@keyframes damage-flash-anim {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 0px transparent); }
    50% { filter: brightness(2) contrast(1.5) sepia(1) hue-rotate(-50deg) drop-shadow(0 0 15px #ff0055); opacity: 0.6; }
}

.bomb-explosion {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #ff00ffff 20%, #00e5ff 60%, transparent 100%);
    border-radius: 50%;
    transform: translate(-25%, -25%);
    animation: bomb-burst-anim 0.4s ease-out forwards;
    filter: drop-shadow(0 0 10px #00e5ff);
}

@keyframes bomb-burst-anim {
    0% { transform: translate(-25%, -25%) scale(0.2); opacity: 1; }
    50% { opacity: 0.9; }
    100% { transform: translate(-25%, -25%) scale(1.6); opacity: 0; }
}