/* ========================================= */
/* 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: #0a1118; }
@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; font-size: 40px; bottom: 20px; transition: left 0.1s linear; }
#touch-controls { position: absolute; top: 0; width: 100%; height: 100%; display: flex; z-index: 5; }
#touch-left, #touch-right { flex: 1; }
#game-header { display: flex; justify-content: space-between; padding: 15px; background: #0d1a24; border-bottom: 1px solid #4dd0e1; color: white;}

/* 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; 
    min-height: 100vh;
    position: relative; /* ¡Esta es el ancla para el botón! */
    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: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    transition: none !important;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

/* ========================================= */
/* 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);
}