:root { --azul-puro: #0055FF; --azul-oscuro: #003BBA; --rojo: #CF142B; --verde: #58CC02; }
body { font-family: 'Nunito', sans-serif; background-color: #E5E5E5; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; overflow: hidden; }
.app-container { width: 100%; max-width: 400px; height: 100vh; max-height: 800px; background-color: #FFFFFF; border-radius: 30px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); overflow: hidden; position: relative; display: flex; flex-direction: column; }
.pantalla { display: none; height: 100%; flex-direction: column; }
.pantalla.activa { display: flex; }

#splash-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 100; transition: opacity 0.6s ease, visibility 0.6s; display: flex; justify-content: center; align-items: center; overflow: hidden; }
#splash-screen.hidden { opacity: 0; visibility: hidden; }
.splash-bg-diagonal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.splash-triangulo-azul { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #002A8F; clip-path: polygon(0 0, 100% 0, 0 100%); }
.splash-triangulo-rojo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #CF142B; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.splash-contenido { position: relative; z-index: 10; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%; }
.estrella-splash { width: 220px; height: 220px; position: absolute; filter: drop-shadow(0 8px 15px rgba(0,0,0,0.4)); animation: pulseLogo 2s infinite alternate; }
.splash-logo { font-family: 'Bungee', 'Bauhaus 93', sans-serif; font-size: 2.2rem; color: #002A8F; text-transform: uppercase; letter-spacing: 1px; margin: 0; transform: rotate(-5deg); text-shadow: 0 2px 0 rgba(255,255,255,0.8); z-index: 20; }
@keyframes pulseLogo { 0% { transform: scale(0.95) rotate(0deg); } 100% { transform: scale(1.05) rotate(2deg); } }

#pantalla-mapa { display: none; flex-direction: column; height: 100%; }
#pantalla-mapa.activa { display: flex; }

.mapa-header { padding: 10px 20px; border-radius: 0 0 15px 15px; z-index: 20; box-shadow: 0 4px 10px rgba(0,0,0,0.15); border-bottom: 2px solid rgba(255,255,255,0.3); }
.mapa-header h1 { color: #E0E7FF; font-weight: 900; font-size: 0.75rem; margin: 0; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.mapa-header h2 { color: white; font-weight: 900; font-size: 1.2rem; margin: 0; text-shadow: 0 2px 4px rgba(0,0,0,0.6); }

.bg-bandera-cuba { background: linear-gradient(135deg, #002A8F 0%, #0055FF 40%, #FFFFFF 70%, #CF142B 100%); box-shadow: inset 0 0 20px rgba(255,255,255,0.2), 0 4px 10px rgba(0,0,0,0.2); }

.stat-pill { display: flex; align-items: center; justify-content: center; gap: 4px; background-color: #001A5C; padding: 4px 8px; border-radius: 20px; border: 1px solid #003BBA; box-shadow: inset 0 2px 4px rgba(0,0,0,0.3); min-width: 50px; transition: all 0.3s; }
.stat-text { color: #FFFFFF !important; font-size: 1rem !important; font-weight: 900 !important; line-height: 1; display: inline-block !important; opacity: 1 !important; visibility: visible !important; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }
#ui-tiempo-infinito { font-size: 0.9rem !important; color: #10B981 !important; font-weight: 900; }

/* --- CONTENEDOR DEL MAPA BASE --- */
.mapa-container { 
    flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; 
    display: flex; flex-direction: column-reverse; scrollbar-width: none; 
    background-color: #FFFFFF;
}
.mapa-container::-webkit-scrollbar { display: none; }

/* --- TEMAS: FORZADOS CON !IMPORTANT --- */
.tema-blanco { 
    background: linear-gradient(180deg, #F0F9FF 0%, #E0F2FE 50%, #F0F9FF 100%) !important;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 42, 143, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(207, 20, 43, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, #F0F9FF 0%, #E0F2FE 100%) !important;
}

.tema-cuba { 
    background: linear-gradient(180deg, #FF9A9E 0%, #FECFEF 50%, #FEE140 100%) !important; 
}

/* --- TEMA EL MORRO (Única imagen, sin duplicados) --- */




/* Asegurar que el contenido esté por encima de la imagen */


/* --- NIVELES Y NODOS --- */
.niveles-container { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 55px; padding-top: 50px; padding-bottom: 100px; width: 100%; }
.nodo-wrapper { display: flex; flex-direction: column; align-items: center; position: relative; width: 80px; flex-shrink: 0; }
.nodo-wrapper:nth-child(even) { transform: translateX(-55px); }
.nodo-wrapper:nth-child(odd) { transform: translateX(55px); }

.nodo { width: 85px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.1s; position: relative; font-size: 34px; font-weight: 900; box-shadow: 0 8px 15px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.4); z-index: 10; color: white; text-shadow: 0 2px 2px rgba(0,0,0,0.3); }
.nodo::after { content: ''; position: absolute; top: 5px; left: 10%; width: 80%; height: 35%; background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%); border-radius: 50%; pointer-events: none; }
.nodo-activo { background: linear-gradient(180deg, #5C99FF 0%, var(--azul-puro) 100%); border-bottom: 8px solid var(--azul-oscuro); animation: float 2.5s ease-in-out infinite; }
.nodo-activo:active { transform: translateY(4px); box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.2); border-bottom-width: 4px; }
.nodo-dorado { background: linear-gradient(180deg, #FFE44D 0%, #FFB800 100%); border-bottom: 8px solid #D99A00; color: #8A5A00; text-shadow: 0 1px 1px rgba(255,255,255,0.4); box-shadow: 0 8px 15px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.6); }
.nodo-dorado:active { transform: translateY(4px); box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 2px 4px rgba(255,255,255,0.2); border-bottom-width: 4px; }
.nodo-bloqueado { background: linear-gradient(180deg, #F1F5F9 0%, #CBD5E1 100%); border-bottom: 8px solid #94A3B8; color: #64748B; cursor: not-allowed; box-shadow: 0 4px 0 rgba(0,0,0,0.1), inset 0 2px 4px rgba(255,255,255,0.3); }

@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } }
.tooltip-empezar { position: absolute; top: -55px; background-color: white; color: var(--azul-puro); border: 3px solid var(--azul-puro); padding: 6px 14px; border-radius: 12px; font-weight: 900; font-size: 0.85rem; animation: float 2.5s ease-in-out infinite; box-shadow: 0 4px 6px rgba(0,0,0,0.15); z-index: 30; }
.tooltip-empezar::after { content: ''; position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background-color: white; border-bottom: 3px solid var(--azul-puro); border-right: 3px solid var(--azul-puro); }

.progress-bg { background-color: #E5E5E5; height: 12px; border-radius: 8px; overflow: hidden; margin: 12px 20px; }
.progress-fill { background-color: var(--rojo); height: 100%; width: 0%; border-radius: 8px; transition: width 0.3s; }

.leccion-container { flex-grow: 1; display: flex; flex-direction: column; padding: 20px; background-color: #FFFFFF; }
.pregunta-texto { font-size: 24px; font-weight: 900; color: #333; text-align: center; margin-top: 20px; margin-bottom: 20px; }
.btn-audio { background-color: #1CB0F6; color: white; padding: 15px; border-radius: 15px; font-weight: 900; font-size: 1.2rem; border-bottom: 5px solid #0096D6; margin-bottom: 20px; cursor: pointer; width: 100%; }
.opciones { display: flex; flex-direction: column; gap: 15px; }
.btn-opcion { width: 100%; padding: 15px; background-color: white; border: 2px solid #E5E5E5; border-radius: 15px; font-weight: 700; font-size: 1.1rem; color: #333; cursor: pointer; transition: all 0.2s; border-bottom: 4px solid #E5E5E5; }
.btn-opcion.correcta { background-color: #D7FFB8; border-color: var(--verde); color: var(--verde); border-bottom-color: #46A302; }
.btn-opcion.incorrecta { background-color: #FFDFE0; border-color: #EA2B2B; color: #EA2B2B; border-bottom-color: #B91C1C; }
.feedback { margin-top: 20px; padding: 15px; border-radius: 15px; font-weight: 700; text-align: center; display: none; }
.feedback.exito { background-color: #D7FFB8; color: var(--verde); display: block; }
.feedback.error { background-color: #FFDFE0; color: #EA2B2B; display: block; }
.hidden { display: none !important; }
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 50; }
.modal-card { background-color: white; width: 85%; border-radius: 25px; padding: 30px 20px; text-align: center; border: 4px solid #002A8F; }
.modal-title { font-size: 1.8rem; font-weight: 900; color: #002A8F; margin-bottom: 10px; }
.modal-text { font-size: 1rem; font-weight: 700; color: #666; margin-bottom: 25px; }
.btn-modal { width: 100%; padding: 15px; border-radius: 15px; font-weight: 900; font-size: 1.1rem; cursor: pointer; border: none; border-bottom: 5px solid; }
.btn-modal-primario { background-color: var(--rojo); color: white; border-color: #8B0000; }
.btn-modal-secundario { background-color: #E5E5E5; color: #666; border-color: #CCC; }
.perfil-container { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; align-items: center; background-color: #F7F7F7; }
.avatar { width: 100px; height: 100px; background-color: #002A8F; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 36px; font-weight: 900; margin-bottom: 15px; border: 4px solid var(--rojo); }
.nav-bar { background-color: white; border-top: 2px solid #F0F0F0; padding: 6px 0; display: flex; justify-content: space-around; z-index: 30; position: absolute; bottom: 0; width: 100%; }
.nav-btn { display: flex; flex-direction: column; align-items: center; color: #9CA3AF; font-weight: 700; width: 25%; background: none; border: none; cursor: pointer; }
.nav-btn.activo { color: #002A8F; }
.nav-btn span { font-size: 9px; margin-top: 2px; }

.tienda-container { flex-grow: 1; overflow-y: auto; padding: 20px; padding-bottom: 90px; background-color: #F4F7FB; scrollbar-width: none; }
.tienda-container::-webkit-scrollbar { display: none; }
.saldo-card { background: linear-gradient(135deg, #002A8F 0%, #0040CC 100%); color: white; padding: 20px; border-radius: 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; box-shadow: 0 8px 20px rgba(0,42,143,0.3); border-bottom: 5px solid #001A5C; }
.saldo-label { font-weight: 900; font-size: 1rem; letter-spacing: 0.5px; }
.saldo-valor { font-weight: 900; font-size: 2rem; color: #FFD700; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.tienda-titulo { font-size: 0.85rem; font-weight: 900; color: #5A6B8C; text-transform: uppercase; letter-spacing: 1.5px; margin: 25px 0 12px 5px; }
.tienda-card { background-color: white; border-radius: 20px; padding: 15px; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; border: 2px solid #E2E8F0; border-bottom: 6px solid #CBD5E1; box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: transform 0.1s; }
.tienda-card:active { transform: scale(0.98); }
.tienda-icono { width: 65px; height: 65px; border-radius: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: inset 0 2px 4px rgba(255,255,255,0.5); }
.bg-red-100 { background-color: #FEE2E2; }
.bg-blue-100 { background-color: #DBEAFE; }
.bg-purple-100 { background-color: #F3E8FF; }
.bg-yellow-100 { background-color: #FEF3C7; }
.bg-green-100 { background-color: #D1FAE5; }
.tienda-info { flex-grow: 1; display: flex; flex-direction: column; }
.tienda-nombre { font-weight: 900; color: #1E293B; font-size: 1.05rem; margin-bottom: 2px; }
.tienda-precio { font-weight: 900; color: #0055FF; font-size: 0.9rem; }
.btn-comprar { background: linear-gradient(180deg, #7AE838 0%, var(--verde) 100%); color: white; border: none; padding: 12px 20px; border-radius: 15px; font-weight: 900; font-size: 0.95rem; cursor: pointer; border-bottom: 5px solid #46A302; flex-shrink: 0; box-shadow: 0 4px 6px rgba(88, 204, 2, 0.2); text-shadow: 0 1px 1px rgba(0,0,0,0.1); transition: all 0.1s; }
.btn-comprar:active { transform: translateY(3px); border-bottom-width: 2px; box-shadow: none; }

/* --- BOTON TIENDA GRANDE Y VISIBLE --- */
.btn-tienda {
    display: inline-block !important;
    color: #FFD700 !important; /* Dorado brillante */
    background: rgba(255, 215, 0, 0.15) !important; /* Fondo dorado semitransparente */
    border: 2px solid #FFD700 !important; /* Borde dorado */
    border-radius: 15px !important;
    cursor: pointer !important;
    padding: 4px 12px !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important; /* Que no se aplaste */
    flex-shrink: 0 !important; /* Evita que flex lo encoja */
    transition: all 0.2s !important;
}

.btn-tienda:hover {
    background: #FFD700 !important;
    color: #002A8F !important; /* Azul oscuro al pasar el ratón */
}
/* ========================================================
   TEMA MORRO DEFINITIVO (Ajustado: sin zoom y con opacidad media)
   ======================================================== */


/* La imagen cubre TODO el contenedor de la app */


/* Capa de velo blanco encima de la imagen para legibilidad */


/* Aseguramos que el mapa y los niveles estén por ENCIMA del velo */


/* --- BANNER DE JEFE FINAL --- */
.banner-jefe {
    background: linear-gradient(90deg, #FFD700, #FF8C00);
    color: #8A5A00;
    text-align: center;
    padding: 8px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 1.1rem;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    animation: pulseJefe 1.5s infinite alternate;
    letter-spacing: 1px;
}
@keyframes pulseJefe {
    0% { transform: scale(1); box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4); }
    100% { transform: scale(1.02); box-shadow: 0 6px 15px rgba(255, 215, 0, 0.8); }
}

/* --- CONFETI --- */
.confeti {
    position: absolute;
    width: 10px;
    height: 20px;
    top: -20px;
    animation: caerConfeti 3s linear forwards;
    z-index: 100;
}
@keyframes caerConfeti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
/* --- PANTALLA DE LOGROS --- */
.logros-container { flex-grow: 1; overflow-y: auto; padding: 20px; padding-bottom: 90px; background-color: #F4F7FB; scrollbar-width: none; }
.logros-container::-webkit-scrollbar { display: none; }





/* --- ANIMACION DE LOGRO DESBLOQUEADO --- */
@keyframes brilloLogro {
    0% { transform: scale(1); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1); }
}
/* --- PANTALLA DE LOGROS --- */
.logros-container { 
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 20px; 
    padding-bottom: 90px; 
    background-color: #F4F7FB; 
    scrollbar-width: none; 
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.logros-container::-webkit-scrollbar { display: none; }

.logro-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: white;
    border-radius: 15px;
    padding: 15px;
    border: 2px solid #E2E8F0;
    border-bottom: 5px solid #CBD5E1;
    transition: all 0.3s;
}

.logro-icono {
    font-size: 2rem;
    background: #F1F5F9;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.logro-info h3 {
    font-weight: 900;
    color: #1E293B;
    margin: 0;
    font-size: 1rem;
}

.logro-info p {
    color: #64748B;
    font-weight: 700;
    font-size: 0.8rem;
    margin: 2px 0 0 0;
}

/* Clase especial para los desbloqueados */
.logro-card.completado {
    border-color: #FFD700;
    border-bottom-color: #D99A00;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
}

.logro-card.completado .logro-icono {
    background: #FFF3C4;
}

/* --- IFRAME DE LOGROS --- */
#pantalla-logros iframe {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    display: block;
    background: #F4F7FB;
    padding-bottom: 64px; /* hueco para la nav-bar absoluta */
    box-sizing: border-box;
}

/* ==================================================
   TEMA EL MORRO (Solución definitiva: una sola imagen)
   ================================================== */


/* Velo blanco suave encima de la imagen para que los nodos resalten */


/* Aseguramos que el contenido esté por encima */

/* ==========================================================
   TEMA MORRO DEFINITIVO (Fondo fijo a pantalla completa)
   ========================================================== */


/* Capa de fondo que cubre TODA la pantalla y no se mueve */


/* Velo blanco encima de la imagen (fijo, cubre toda la pantalla) */


/* Aseguramos que el contenedor de la app no tenga fondo blanco que tape la imagen */


/* Y el mapa tampoco */

/* ==========================================================
   TEMA EL MORRO (Imagen contenida dentro del app-container)
   ========================================================== */
body.tema-morro-activo .app-container {
    position: relative;
    overflow: hidden; /* Evita que la imagen se salga */
}

/* La imagen se coloca dentro del app-container */
body.tema-morro-activo .app-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('morro.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0; /* Capa base */
    pointer-events: none;
    opacity: 1;
}

/* Velo blanco encima de la imagen */
body.tema-morro-activo .app-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.25) !important; /* Opacidad del velo (ajústalo) */
    z-index: 1;
    pointer-events: none;
}

/* Asegurar que el contenido de las pantallas quede por ENCIMA del velo */
body.tema-morro-activo .pantalla {
    position: relative;
    z-index: 2;
}

/* Los fondos internos del mapa quedan transparentes para ver la imagen */
body.tema-morro-activo .mapa-container {
    background-color: transparent !important;
    background-image: none !important;
}
/* --- CALENDARIO SEMANAL --- */
.calendario-semanal {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    margin-top: 10px;
}

.dia-calendario {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 2px;
    border-radius: 10px;
    background-color: #F1F5F9;
    border: 2px solid #E2E8F0;
    min-height: 60px;
    transition: all 0.3s ease;
}

.dia-calendario .nombre-dia {
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dia-calendario .icono-dia {
    font-size: 1.2rem;
    margin-top: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: scale(0);
}

/* Día completado */
.dia-calendario.completado {
    background: linear-gradient(180deg, #FFF3C4 0%, #FFD700 100%);
    border-color: #FFB800;
    border-bottom-color: #D99A00;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.3);
}

.dia-calendario.completado .nombre-dia {
    color: #8A5A00;
}

.dia-calendario.completado .icono-dia {
    opacity: 1;
    transform: scale(1);
    animation: brilloFuego 1.5s ease-in-out infinite alternate;
}

/* Día actual (hoy) */
.dia-calendario.hoy {
    border-color: #0055FF;
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.15);
}

.dia-calendario.hoy.completado {
    border-color: #FFB800;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3), 0 3px 8px rgba(255, 215, 0, 0.4);
}

@keyframes brilloFuego {
    0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(255, 150, 0, 0.5)); }
    100% { transform: scale(1.1); filter: drop-shadow(0 0 6px rgba(255, 150, 0, 0.9)); }
}
/* --- SISTEMA DE XP Y NIVELES --- */
.nivel-badge {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(180deg, #FFE44D 0%, #FFB800 100%);
    color: #8A5A00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.3rem;
    border-bottom: 4px solid #D99A00;
    box-shadow: 0 4px 8px rgba(255, 184, 0, 0.3);
    text-shadow: 0 1px 1px rgba(255,255,255,0.4);
    flex-shrink: 0;
}

/* Colores del rango según el nivel */
.rango-bronce { color: #CD7F32 !important; }
.rango-plata { color: #A8A8A8 !important; }
.rango-oro { color: #FFD700 !important; }
.rango-diamante { color: #1CB0F6 !important; }
.rango-leyenda { color: #CF142B !important; }
/* --- TEMPORIZADOR DE VIDAS --- */
#ui-timer-vidas {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    background-color: rgba(0,0,0,0.2);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}
/* --- PÍLDORA DEL TEMPORIZADOR DE VIDAS --- */
#contenedor-timer-vidas {
    transition: all 0.3s;
}

#contenedor-timer-vidas #ui-timer-vidas {
    font-family: 'Courier New', monospace !important;
    font-size: 0.8rem !important;
    color: #FFD700 !important;
    letter-spacing: 0.5px;
}
/* ============================================================
   QvaLingo UI PRO — añadido automáticamente
   ============================================================ */

/* ---------- 1. DARK MODE AUTOMÁTICO ---------- */
@media (prefers-color-scheme: dark) {
    body { background-color: #0f172a; }
    .app-container { background-color: #1e293b; box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
    .pantalla { background-color: #1e293b; }
    .leccion-container { background-color: #1e293b; }
    .pregunta-texto { color: #f1f5f9; }
    .btn-opcion { background-color: #334155; border-color: #475569; color: #f1f5f9; border-bottom-color: #1e293b; }
    .btn-opcion:hover { border-color: #64748b; }
    .modal-card { background-color: #1e293b; border-color: #475569; }
    .modal-title { color: #f1f5f9; }
    .modal-text { color: #cbd5e1; }
    .perfil-container { background-color: #0f172a; }
    .tienda-container { background-color: #0f172a; }
    .logros-container { background-color: #0f172a; }
    .tienda-card { background-color: #1e293b; border-color: #475569; border-bottom-color: #334155; }
    .tienda-nombre { color: #f1f5f9; }
    .logro-card { background-color: #1e293b; border-color: #475569; }
    .logro-info h3 { color: #f1f5f9; }
    .nav-bar { background-color: #1e293b; border-top-color: #334155; }
    .nav-btn { color: #64748b; }
    .nav-btn.activo { color: #60a5fa; }
    .mapa-container.tema-blanco { background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important; }
    .dia-calendario { background-color: #334155; border-color: #475569; }
    .dia-calendario .nombre-dia { color: #94a3b8; }
}

/* ---------- 2. TRANSICIONES Y MICRO-ANIMACIONES ---------- */
.pantalla {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.pantalla.activa {
    opacity: 1;
    transform: translateY(0);
}
.btn-opcion, .btn-modal, .btn-comprar, .nav-btn, .stat-pill {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-opcion:active { transform: scale(0.97); }
.btn-comprar:active { transform: translateY(2px) scale(0.98); }
.nav-btn:active { transform: scale(0.92); }

.feedback.exito { animation: pulseExito 0.4s ease; }
.feedback.error { animation: shakeError 0.4s ease; }

@keyframes pulseExito {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@media (hover: hover) {
    .btn-opcion:not(:disabled):hover { border-color: var(--azul-puro); background-color: #F0F7FF; }
    .btn-comprar:hover { filter: brightness(1.05); }
    .nodo:not(.nodo-bloqueado):hover { transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- 3. TIPOGRAFÍA INTER PARA NÚMEROS ---------- */
.stat-text, .saldo-valor, .nivel-badge, #ui-timer-vidas, .tienda-precio {
    font-family: 'Inter', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

/* ---------- 4. BARRA DE PROGRESO CON GRADIENTE ---------- */
.progress-fill {
    background: linear-gradient(90deg, #58CC02 0%, #7AE838 50%, #58CC02 100%);
    background-size: 200% 100%;
    animation: shimmerProgress 2s linear infinite;
    height: 100%;
    width: 0%;
    border-radius: 8px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(88, 204, 2, 0.4);
}
@keyframes shimmerProgress {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* ---------- 5. TOAST NOTIFICATIONS ---------- */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 400px;
}
.toast {
    background: #1e293b;
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid #58CC02;
}
.toast.exito { border-left-color: #58CC02; }
.toast.error { border-left-color: #EA2B2B; }
.toast.info { border-left-color: #1CB0F6; }
.toast.gema { border-left-color: #FFD700; }
@keyframes toastIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.toast.saliendo { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut {
    to { transform: translateY(-20px); opacity: 0; }
}

/* ============================================================
   TOGGLE TEMA MANUAL (light / dark / auto)
   ============================================================ */
body.dark-mode { background-color: #0f172a !important; }
body.dark-mode .app-container { background-color: #1e293b; }
body.dark-mode .pantalla { background-color: #1e293b; }
body.dark-mode .leccion-container { background-color: #1e293b; }
body.dark-mode .pregunta-texto { color: #f1f5f9; }
body.dark-mode .btn-opcion { background-color: #334155; border-color: #475569; color: #f1f5f9; border-bottom-color: #1e293b; }
body.dark-mode .btn-opcion:hover { border-color: #64748b; }
body.dark-mode .modal-card { background-color: #1e293b; border-color: #475569; }
body.dark-mode .modal-title { color: #f1f5f9; }
body.dark-mode .modal-text { color: #cbd5e1; }
body.dark-mode .perfil-container { background-color: #0f172a; }
body.dark-mode .tienda-container { background-color: #0f172a; }
body.dark-mode .logros-container { background-color: #0f172a; }
body.dark-mode .tienda-card { background-color: #1e293b; border-color: #475569; border-bottom-color: #334155; }
body.dark-mode .tienda-nombre { color: #f1f5f9; }
body.dark-mode .logro-card { background-color: #1e293b; border-color: #475569; }
body.dark-mode .logro-info h3 { color: #f1f5f9; }
body.dark-mode .nav-bar { background-color: #1e293b; border-top-color: #334155; }
body.dark-mode .nav-btn { color: #64748b; }
body.dark-mode .nav-btn.activo { color: #60a5fa; }
body.dark-mode .mapa-container.tema-blanco { background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important; }
body.dark-mode .dia-calendario { background-color: #334155; border-color: #475569; }
body.dark-mode .dia-calendario .nombre-dia { color: #94a3b8; }

.btn-tema {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #9CA3AF;
    font-weight: 700;
    width: 20%;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-tema:active { transform: scale(0.9); }
.btn-tema span { font-size: 9px; margin-top: 2px; }
.btn-tema svg { transition: transform 0.3s; }
body.dark-mode .btn-tema svg { transform: rotate(180deg); }

/* ============================================================
   FORZAR MODO CLARO (body.light-mode)
   Sobrescribe @media (prefers-color-scheme: dark) con !important
   ============================================================ */
body.light-mode {
    background-color: #E5E5E5 !important;
}
body.light-mode .app-container { background-color: #FFFFFF !important; }
body.light-mode .pantalla { background-color: #FFFFFF !important; }
body.light-mode .leccion-container { background-color: #FFFFFF !important; }
body.light-mode .pregunta-texto { color: #333 !important; }
body.light-mode .btn-opcion { background-color: #FFFFFF !important; border-color: #E5E5E5 !important; color: #333 !important; border-bottom-color: #E5E5E5 !important; }
body.light-mode .modal-card { background-color: #FFFFFF !important; border-color: #002A8F !important; }
body.light-mode .modal-title { color: #002A8F !important; }
body.light-mode .modal-text { color: #666 !important; }
body.light-mode .perfil-container { background-color: #F7F7F7 !important; }
body.light-mode .tienda-container { background-color: #F4F7FB !important; }
body.light-mode .logros-container { background-color: #F4F7FB !important; }
body.light-mode .tienda-card { background-color: #FFFFFF !important; border-color: #E2E8F0 !important; border-bottom-color: #CBD5E1 !important; }
body.light-mode .tienda-nombre { color: #1E293B !important; }
body.light-mode .logro-card { background-color: #FFFFFF !important; border-color: #E2E8F0 !important; }
body.light-mode .logro-info h3 { color: #1E293B !important; }
body.light-mode .nav-bar { background-color: #FFFFFF !important; border-top-color: #F0F0F0 !important; }
body.light-mode .nav-btn { color: #9CA3AF !important; }
body.light-mode .nav-btn.activo { color: #002A8F !important; }
body.light-mode .mapa-container.tema-blanco { background: linear-gradient(180deg, #F0F9FF 0%, #E0F2FE 50%, #F0F9FF 100%) !important; }
body.light-mode .dia-calendario { background-color: #F1F5F9 !important; border-color: #E2E8F0 !important; }
body.light-mode .dia-calendario .nombre-dia { color: #64748B !important; }

/* Prioridad: light-mode > dark-mode (por si acaso) */
body.light-mode.dark-mode { background-color: #E5E5E5 !important; }

/* ============================================================
   FIX TIENDA EN MODO OSCURO — letras legibles
   ============================================================ */
body.dark-mode .tienda-precio { color: #60a5fa !important; }
body.dark-mode .tienda-nombre { color: #f1f5f9 !important; }
body.dark-mode .tienda-titulo { color: #94a3b8 !important; }
body.dark-mode .saldo-label { color: #cbd5e1 !important; }
body.dark-mode .saldo-valor { color: #FFD700 !important; }

/* Precios con colores Tailwind específicos */
body.dark-mode .tienda-precio.text-blue-600 { color: #93c5fd !important; }
body.dark-mode .tienda-precio.text-green-600 { color: #86efac !important; }
body.dark-mode .tienda-precio.text-yellow-600 { color: #fde047 !important; }
body.dark-mode .tienda-precio.text-purple-500 { color: #d8b4fe !important; }

/* Cards de tienda en modo oscuro (fondo más oscuro, bordes suaves) */
body.dark-mode .tienda-card {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    border-bottom-color: #334155 !important;
}
body.dark-mode .tienda-card .tienda-icono {
    background-color: #334155 !important;
}

/* Forzar textos claros en cualquier card de tienda */
body.dark-mode .tienda-card * { color: #e2e8f0 !important; }
body.dark-mode .tienda-card .tienda-precio { color: #60a5fa !important; }
body.dark-mode .tienda-card .tienda-precio.text-blue-600 { color: #93c5fd !important; }
body.dark-mode .tienda-card .tienda-precio.text-green-600 { color: #86efac !important; }
body.dark-mode .tienda-card .tienda-precio.text-yellow-600 { color: #fde047 !important; }
body.dark-mode .tienda-card .tienda-precio.text-purple-500 { color: #d8b4fe !important; }

/* ============================================================
   FIX MORRO: app-container transparente para que se vea el ::before
   ============================================================ */
body.tema-morro-activo .app-container {
    background-color: transparent !important;
    background: transparent !important;
}

/* Y las pantallas también (aunque ya estaba, reforzar) */
body.tema-morro-activo .pantalla {
    background-color: transparent !important;
    background: transparent !important;
}

/* El mapa también (refuerzo) */
body.tema-morro-activo .mapa-container {
    background-color: transparent !important;
    background: transparent !important;
}

/* El header del mapa necesita fondo para legibilidad */
body.tema-morro-activo .mapa-header {
    background: linear-gradient(135deg, rgba(0, 42, 143, 0.9) 0%, rgba(0, 85, 255, 0.85) 40%, rgba(255, 255, 255, 0.7) 70%, rgba(207, 20, 43, 0.9) 100%) !important;
}

/* La barra superior de stats también */
body.tema-morro-activo .bg-bandera-cuba.text-white {
    background: linear-gradient(135deg, rgba(0, 42, 143, 0.9) 0%, rgba(0, 85, 255, 0.85) 40%, rgba(255, 255, 255, 0.7) 70%, rgba(207, 20, 43, 0.9) 100%) !important;
}

/* ============================================================
   FONDOS TEMÁTICOS DE CUBA (9 fondos nuevos)
   Cada uno aplica el mismo patrón que el Morro:
   - ::before con la imagen
   - ::after con velo blanco
   - .app-container transparente
   ============================================================ */

/* --- Helper para todos los fondos temáticos --- */
body.tema-cangrejera-activo .app-container,
body.tema-capitolio-activo .app-container,
body.tema-cartacuba-activo .app-container,
body.tema-cobre-activo .app-container,
body.tema-cristo-activo .app-container,
body.tema-malecon-activo .app-container,
body.tema-tocororo-activo .app-container,
body.tema-varadero-activo .app-container,
body.tema-vinales-activo .app-container {
    position: relative !important;
    overflow: hidden !important;
    background-color: transparent !important;
    background: transparent !important;
}

body.tema-cangrejera-activo .app-container::before,
body.tema-capitolio-activo .app-container::before,
body.tema-cartacuba-activo .app-container::before,
body.tema-cobre-activo .app-container::before,
body.tema-cristo-activo .app-container::before,
body.tema-malecon-activo .app-container::before,
body.tema-tocororo-activo .app-container::before,
body.tema-varadero-activo .app-container::before,
body.tema-vinales-activo .app-container::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 1 !important;
}

body.tema-cangrejera-activo .app-container::after,
body.tema-capitolio-activo .app-container::after,
body.tema-cartacuba-activo .app-container::after,
body.tema-cobre-activo .app-container::after,
body.tema-cristo-activo .app-container::after,
body.tema-malecon-activo .app-container::after,
body.tema-tocororo-activo .app-container::after,
body.tema-varadero-activo .app-container::after,
body.tema-vinales-activo .app-container::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

body.tema-cangrejera-activo .pantalla,
body.tema-capitolio-activo .pantalla,
body.tema-cartacuba-activo .pantalla,
body.tema-cobre-activo .pantalla,
body.tema-cristo-activo .pantalla,
body.tema-malecon-activo .pantalla,
body.tema-tocororo-activo .pantalla,
body.tema-varadero-activo .pantalla,
body.tema-vinales-activo .pantalla {
    position: relative !important;
    z-index: 2 !important;
    background-color: transparent !important;
}

body.tema-cangrejera-activo .mapa-container,
body.tema-capitolio-activo .mapa-container,
body.tema-cartacuba-activo .mapa-container,
body.tema-cobre-activo .mapa-container,
body.tema-cristo-activo .mapa-container,
body.tema-malecon-activo .mapa-container,
body.tema-tocororo-activo .mapa-container,
body.tema-varadero-activo .mapa-container,
body.tema-vinales-activo .mapa-container {
    background-color: transparent !important;
    background-image: none !important;
}

body.tema-cangrejera-activo .mapa-header,
body.tema-capitolio-activo .mapa-header,
body.tema-cartacuba-activo .mapa-header,
body.tema-cobre-activo .mapa-header,
body.tema-cristo-activo .mapa-header,
body.tema-malecon-activo .mapa-header,
body.tema-tocororo-activo .mapa-header,
body.tema-varadero-activo .mapa-header,
body.tema-vinales-activo .mapa-header,
body.tema-cangrejera-activo .bg-bandera-cuba.text-white,
body.tema-capitolio-activo .bg-bandera-cuba.text-white,
body.tema-cartacuba-activo .bg-bandera-cuba.text-white,
body.tema-cobre-activo .bg-bandera-cuba.text-white,
body.tema-cristo-activo .bg-bandera-cuba.text-white,
body.tema-malecon-activo .bg-bandera-cuba.text-white,
body.tema-tocororo-activo .bg-bandera-cuba.text-white,
body.tema-varadero-activo .bg-bandera-cuba.text-white,
body.tema-vinales-activo .bg-bandera-cuba.text-white {
    background: linear-gradient(135deg, rgba(0, 42, 143, 0.9) 0%, rgba(0, 85, 255, 0.85) 40%, rgba(255, 255, 255, 0.7) 70%, rgba(207, 20, 43, 0.9) 100%) !important;
}

/* --- Imágenes específicas --- */
body.tema-cangrejera-activo .app-container::before { background-image: url('cangrejera.jpg') !important; }
body.tema-capitolio-activo .app-container::before { background-image: url('capitolio.jpg') !important; }
body.tema-cartacuba-activo .app-container::before { background-image: url('cartacuba.jpg') !important; }
body.tema-cobre-activo .app-container::before { background-image: url('cobre.jpg') !important; }
body.tema-cristo-activo .app-container::before { background-image: url('cristo.jpg') !important; }
body.tema-malecon-activo .app-container::before { background-image: url('malecon.jpg') !important; }
body.tema-tocororo-activo .app-container::before { background-image: url('tocororo.jpg') !important; }
body.tema-varadero-activo .app-container::before { background-image: url('varadero.jpg') !important; }
body.tema-vinales-activo .app-container::before { background-image: url('vinales.jpg') !important; }

/* ============================================================
   FIX: .mapa-container transparente en TODOS los fondos temáticos
   (anula el linear-gradient del tema-blanco)
   ============================================================
body.tema-malecon-activo .mapa-container,
body.tema-malecon-activo .mapa-container.tema-blanco,
body.tema-malecon-activo .mapa-container.tema-cuba,
body.tema-malecon-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-malecon-activo .mapa-visual,
body.tema-malecon-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-vinales-activo .mapa-container,
body.tema-vinales-activo .mapa-container.tema-blanco,
body.tema-vinales-activo .mapa-container.tema-cuba,
body.tema-vinales-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-vinales-activo .mapa-visual,
body.tema-vinales-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-capitolio-activo .mapa-container,
body.tema-capitolio-activo .mapa-container.tema-blanco,
body.tema-capitolio-activo .mapa-container.tema-cuba,
body.tema-capitolio-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-capitolio-activo .mapa-visual,
body.tema-capitolio-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cartacuba-activo .mapa-container,
body.tema-cartacuba-activo .mapa-container.tema-blanco,
body.tema-cartacuba-activo .mapa-container.tema-cuba,
body.tema-cartacuba-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cartacuba-activo .mapa-visual,
body.tema-cartacuba-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-varadero-activo .mapa-container,
body.tema-varadero-activo .mapa-container.tema-blanco,
body.tema-varadero-activo .mapa-container.tema-cuba,
body.tema-varadero-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-varadero-activo .mapa-visual,
body.tema-varadero-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cristo-activo .mapa-container,
body.tema-cristo-activo .mapa-container.tema-blanco,
body.tema-cristo-activo .mapa-container.tema-cuba,
body.tema-cristo-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cristo-activo .mapa-visual,
body.tema-cristo-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cobre-activo .mapa-container,
body.tema-cobre-activo .mapa-container.tema-blanco,
body.tema-cobre-activo .mapa-container.tema-cuba,
body.tema-cobre-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cobre-activo .mapa-visual,
body.tema-cobre-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cangrejera-activo .mapa-container,
body.tema-cangrejera-activo .mapa-container.tema-blanco,
body.tema-cangrejera-activo .mapa-container.tema-cuba,
body.tema-cangrejera-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-cangrejera-activo .mapa-visual,
body.tema-cangrejera-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-tocororo-activo .mapa-container,
body.tema-tocororo-activo .mapa-container.tema-blanco,
body.tema-tocororo-activo .mapa-container.tema-cuba,
body.tema-tocororo-activo .mapa-container.tema-morro {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
body.tema-tocororo-activo .mapa-visual,
body.tema-tocororo-activo .mapa-visual.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* ============================================================
   FIX DEFINITIVO: .mapa-container transparente en fondos temáticos
   Selector con .tema-blanco para empatar especificidad con light-mode
   ============================================================
/* malecon */
body.tema-malecon-activo .mapa-container,
body.tema-malecon-activo .mapa-container.tema-blanco,
body.tema-malecon-activo .mapa-container.tema-cuba,
body.tema-malecon-activo .mapa-container.tema-morro,
body.light-mode.tema-malecon-activo .mapa-container,
body.light-mode.tema-malecon-activo .mapa-container.tema-blanco,
body.dark-mode.tema-malecon-activo .mapa-container,
body.dark-mode.tema-malecon-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* vinales */
body.tema-vinales-activo .mapa-container,
body.tema-vinales-activo .mapa-container.tema-blanco,
body.tema-vinales-activo .mapa-container.tema-cuba,
body.tema-vinales-activo .mapa-container.tema-morro,
body.light-mode.tema-vinales-activo .mapa-container,
body.light-mode.tema-vinales-activo .mapa-container.tema-blanco,
body.dark-mode.tema-vinales-activo .mapa-container,
body.dark-mode.tema-vinales-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* capitolio */
body.tema-capitolio-activo .mapa-container,
body.tema-capitolio-activo .mapa-container.tema-blanco,
body.tema-capitolio-activo .mapa-container.tema-cuba,
body.tema-capitolio-activo .mapa-container.tema-morro,
body.light-mode.tema-capitolio-activo .mapa-container,
body.light-mode.tema-capitolio-activo .mapa-container.tema-blanco,
body.dark-mode.tema-capitolio-activo .mapa-container,
body.dark-mode.tema-capitolio-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* cartacuba */
body.tema-cartacuba-activo .mapa-container,
body.tema-cartacuba-activo .mapa-container.tema-blanco,
body.tema-cartacuba-activo .mapa-container.tema-cuba,
body.tema-cartacuba-activo .mapa-container.tema-morro,
body.light-mode.tema-cartacuba-activo .mapa-container,
body.light-mode.tema-cartacuba-activo .mapa-container.tema-blanco,
body.dark-mode.tema-cartacuba-activo .mapa-container,
body.dark-mode.tema-cartacuba-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* varadero */
body.tema-varadero-activo .mapa-container,
body.tema-varadero-activo .mapa-container.tema-blanco,
body.tema-varadero-activo .mapa-container.tema-cuba,
body.tema-varadero-activo .mapa-container.tema-morro,
body.light-mode.tema-varadero-activo .mapa-container,
body.light-mode.tema-varadero-activo .mapa-container.tema-blanco,
body.dark-mode.tema-varadero-activo .mapa-container,
body.dark-mode.tema-varadero-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* cristo */
body.tema-cristo-activo .mapa-container,
body.tema-cristo-activo .mapa-container.tema-blanco,
body.tema-cristo-activo .mapa-container.tema-cuba,
body.tema-cristo-activo .mapa-container.tema-morro,
body.light-mode.tema-cristo-activo .mapa-container,
body.light-mode.tema-cristo-activo .mapa-container.tema-blanco,
body.dark-mode.tema-cristo-activo .mapa-container,
body.dark-mode.tema-cristo-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* cobre */
body.tema-cobre-activo .mapa-container,
body.tema-cobre-activo .mapa-container.tema-blanco,
body.tema-cobre-activo .mapa-container.tema-cuba,
body.tema-cobre-activo .mapa-container.tema-morro,
body.light-mode.tema-cobre-activo .mapa-container,
body.light-mode.tema-cobre-activo .mapa-container.tema-blanco,
body.dark-mode.tema-cobre-activo .mapa-container,
body.dark-mode.tema-cobre-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* cangrejera */
body.tema-cangrejera-activo .mapa-container,
body.tema-cangrejera-activo .mapa-container.tema-blanco,
body.tema-cangrejera-activo .mapa-container.tema-cuba,
body.tema-cangrejera-activo .mapa-container.tema-morro,
body.light-mode.tema-cangrejera-activo .mapa-container,
body.light-mode.tema-cangrejera-activo .mapa-container.tema-blanco,
body.dark-mode.tema-cangrejera-activo .mapa-container,
body.dark-mode.tema-cangrejera-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}
/* tocororo */
body.tema-tocororo-activo .mapa-container,
body.tema-tocororo-activo .mapa-container.tema-blanco,
body.tema-tocororo-activo .mapa-container.tema-cuba,
body.tema-tocororo-activo .mapa-container.tema-morro,
body.light-mode.tema-tocororo-activo .mapa-container,
body.light-mode.tema-tocororo-activo .mapa-container.tema-blanco,
body.dark-mode.tema-tocororo-activo .mapa-container,
body.dark-mode.tema-tocororo-activo .mapa-container.tema-blanco {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* ============================================================
   TIENDA: SECCIONES COLAPSABLES (carpetas)
   ============================================================ */
.tienda-seccion {
    margin-bottom: 16px;
    border-radius: 16px;
    background: white;
    border: 2px solid #E2E8F0;
    border-bottom: 5px solid #CBD5E1;
    overflow: hidden;
    transition: all 0.3s;
}

.tienda-seccion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border-bottom: 1px solid #E2E8F0;
    transition: background 0.2s;
}

.tienda-seccion-header:hover {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.tienda-seccion-header:active {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.tienda-seccion-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1rem;
    color: #1E293B;
}

.tienda-seccion-icono {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    border: 2px solid #E2E8F0;
}

.tienda-seccion-contador {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

.tienda-seccion-flecha {
    font-size: 1.2rem;
    color: #64748B;
    transition: transform 0.3s;
}

.tienda-seccion.abierta .tienda-seccion-flecha {
    transform: rotate(180deg);
}

.tienda-seccion-contenido {
    display: none;
    padding: 12px 16px;
    flex-direction: column;
    gap: 12px;
}

.tienda-seccion.abierta .tienda-seccion-contenido {
    display: flex;
}

/* Los tienda-card dentro de secciones no tienen margen extra */
.tienda-seccion-contenido .tienda-card {
    margin-bottom: 0;
}

/* Dark mode para las secciones */
body.dark-mode .tienda-seccion {
    background: #1e293b;
    border-color: #475569;
    border-bottom-color: #334155;
}

body.dark-mode .tienda-seccion-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom-color: #475569;
}

body.dark-mode .tienda-seccion-header:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

body.dark-mode .tienda-seccion-titulo {
    color: #f1f5f9;
}

body.dark-mode .tienda-seccion-icono {
    background: #334155;
    border-color: #475569;
}

body.dark-mode .tienda-seccion-contador {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

body.dark-mode .tienda-seccion-flecha {
    color: #cbd5e1;
}

/* ============================================================
   TIENDA: PANTALLAS NAVEGABLES (menú + subpantallas)
   ============================================================ */
.tienda-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    padding-bottom: 100px;
    flex-grow: 1;
    overflow-y: auto;
}

.tienda-menu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    border: 2px solid #E2E8F0;
    border-bottom: 6px solid #CBD5E1;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.tienda-menu-card:hover {
    border-color: #3B82F6;
    border-bottom-color: #1E40AF;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.2);
}

.tienda-menu-card:active {
    transform: translateY(2px);
    border-bottom-width: 3px;
}

.tienda-menu-icono {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);
}

.tienda-menu-info {
    flex-grow: 1;
}

.tienda-menu-titulo {
    font-weight: 900;
    font-size: 1.1rem;
    color: #1E293B;
    margin-bottom: 2px;
}

.tienda-menu-desc {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748B;
}

.tienda-menu-flecha {
    font-size: 1.5rem;
    color: #94A3B8;
    font-weight: 900;
}

/* Pantallas interiores de la tienda */
.tienda-pantalla {
    display: none;
    flex-direction: column;
    height: 100%;
}

.tienda-pantalla.activa {
    display: flex;
}

.tienda-pantalla-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border-bottom: 2px solid #E2E8F0;
}

.tienda-pantalla-back {
    font-size: 1.8rem;
    color: #1E293B;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 900;
}

.tienda-pantalla-titulo {
    font-weight: 900;
    font-size: 1.2rem;
    color: #1E293B;
    flex-grow: 1;
}

.tienda-pantalla-contenido {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px 20px;
    padding-bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Dark mode */
body.dark-mode .tienda-menu-card {
    background: #1e293b;
    border-color: #475569;
    border-bottom-color: #334155;
}

body.dark-mode .tienda-menu-card:hover {
    border-color: #60a5fa;
    border-bottom-color: #3b82f6;
}

body.dark-mode .tienda-menu-titulo {
    color: #f1f5f9;
}

body.dark-mode .tienda-menu-desc {
    color: #cbd5e1;
}

body.dark-mode .tienda-pantalla-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom-color: #475569;
}

body.dark-mode .tienda-pantalla-back {
    color: #f1f5f9;
}

body.dark-mode .tienda-pantalla-titulo {
    color: #f1f5f9;
}

/* ============================================================
   SELECTOR DE NIVEL INICIAL
   ============================================================ */
.selector-nivel-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F4F7FB;
}

.selector-nivel-opcion {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: white;
    border-radius: 18px;
    border: 2px solid #E2E8F0;
    border-bottom: 5px solid #CBD5E1;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.selector-nivel-opcion:hover {
    border-color: #3B82F6;
    border-bottom-color: #1E40AF;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.15);
}

.selector-nivel-opcion:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.selector-nivel-icono {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
}

.selector-nivel-info {
    flex-grow: 1;
}

.selector-nivel-titulo {
    font-weight: 900;
    font-size: 1rem;
    color: #1E293B;
    margin-bottom: 2px;
}

.selector-nivel-desc {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748B;
}

.selector-nivel-footer {
    padding: 12px 16px 20px;
    background: #F4F7FB;
}

/* Dark mode */
body.dark-mode .selector-nivel-container,
body.dark-mode .selector-nivel-footer {
    background: #0f172a;
}

body.dark-mode .selector-nivel-opcion {
    background: #1e293b;
    border-color: #475569;
    border-bottom-color: #334155;
}

body.dark-mode .selector-nivel-opcion:hover {
    border-color: #60a5fa;
    border-bottom-color: #3b82f6;
}

body.dark-mode .selector-nivel-titulo {
    color: #f1f5f9;
}

body.dark-mode .selector-nivel-desc {
    color: #94a3b8;
}

body.dark-mode .selector-nivel-icono {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

/* Botón de cambiar nivel en el perfil */
.btn-cambiar-nivel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 5px solid #C2410C;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
    transition: all 0.15s;
    margin-bottom: 16px;
}

.btn-cambiar-nivel:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

body.dark-mode .btn-cambiar-nivel {
    background: linear-gradient(135deg, #F59E0B 0%, #C2410C 100%);
}

/* ============================================================
   EDITOR DE PERFIL: NOMBRE + AVATAR
   ============================================================ */
.perfil-avatar-editor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.perfil-avatar-grande {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 4px solid #3B82F6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-cambiar-avatar {
    padding: 8px 16px;
    background: linear-gradient(180deg, #60A5FA 0%, #3B82F6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 4px solid #1E40AF;
    transition: all 0.1s;
}

.btn-cambiar-avatar:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.perfil-nombre-editor {
    display: flex;
    flex-direction: column;
}

.perfil-nombre-input {
    flex-grow: 1;
    padding: 10px 14px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: #1E293B;
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.perfil-nombre-input:focus {
    border-color: #3B82F6;
}

.btn-guardar-nombre {
    padding: 10px 16px;
    background: linear-gradient(180deg, #7AE838 0%, #58CC02 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 4px solid #46A302;
    transition: all 0.1s;
}

.btn-guardar-nombre:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* Galería de avatares */
.perfil-galeria-avatares {
    background: white;
    border-radius: 16px;
    border: 2px solid #E2E8F0;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.perfil-galeria-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.perfil-galeria-cerrar {
    background: #F1F5F9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 900;
    color: #64748B;
    cursor: pointer;
    font-size: 1rem;
}

.perfil-galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.perfil-avatar-opcion {
    aspect-ratio: 1;
    border-radius: 14px;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
    border: 2px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.15s;
}

.perfil-avatar-opcion:hover {
    border-color: #3B82F6;
    transform: scale(1.05);
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.perfil-avatar-opcion.seleccionado {
    border-color: #3B82F6;
    border-width: 3px;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Dark mode */
body.dark-mode .perfil-avatar-grande {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-color: #60A5FA;
}

body.dark-mode .perfil-nombre-input {
    background: #1e293b;
    border-color: #475569;
    color: #f1f5f9;
}

body.dark-mode .perfil-galeria-avatares {
    background: #1e293b;
    border-color: #475569;
}

body.dark-mode .perfil-galeria-cerrar {
    background: #334155;
    color: #cbd5e1;
}

body.dark-mode .perfil-avatar-opcion {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-color: #475569;
}

body.dark-mode .perfil-avatar-opcion:hover {
    border-color: #60a5fa;
}

body.dark-mode .perfil-avatar-opcion.seleccionado {
    border-color: #60a5fa;
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

/* ============================================================
   FIX GALERÍA DE AVATARES: modal dentro del app-container
   ============================================================ */
.perfil-galeria-avatares {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.perfil-galeria-avatares.hidden {
    display: none !important;
}

.perfil-galeria-contenido {
    background: white !important;
    border-radius: 20px !important;
    padding: 16px !important;
    width: 100% !important;
    max-width: 360px !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

.perfil-galeria-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    flex-shrink: 0 !important;
}

.perfil-galeria-cerrar {
    background: #F1F5F9 !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    font-weight: 900 !important;
    color: #64748B !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.perfil-galeria-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px !important;
    overflow-y: auto !important;
    padding-right: 4px !important;
    flex-grow: 1 !important;
    max-height: 60vh !important;
}

.perfil-avatar-opcion {
    aspect-ratio: 1 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%) !important;
    border: 2px solid #E2E8F0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    padding: 0 !important;
}

.perfil-avatar-opcion:hover {
    border-color: #3B82F6 !important;
    transform: scale(1.05) !important;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%) !important;
}

.perfil-avatar-opcion.seleccionado {
    border-color: #3B82F6 !important;
    border-width: 3px !important;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Scrollbar delgado */
.perfil-galeria-grid::-webkit-scrollbar {
    width: 6px;
}

.perfil-galeria-grid::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

/* Dark mode */
body.dark-mode .perfil-galeria-avatares {
    background: rgba(0, 0, 0, 0.7) !important;
}

body.dark-mode .perfil-galeria-contenido {
    background: #1e293b !important;
}

body.dark-mode .perfil-galeria-cerrar {
    background: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .perfil-avatar-opcion {
    background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
    border-color: #475569 !important;
}

body.dark-mode .perfil-avatar-opcion:hover {
    border-color: #60a5fa !important;
}

body.dark-mode .perfil-avatar-opcion.seleccionado {
    border-color: #60a5fa !important;
    background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important;
}

body.dark-mode .perfil-galeria-grid::-webkit-scrollbar-thumb {
    background: #475569;
}

/* ============================================================
   REDISEÑO DEL PERFIL
   ============================================================ */
.perfil-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #F7F7F7;
}

.perfil-header-card {
    width: 100%;
    background: white;
    border-radius: 20px;
    border: 2px solid #E2E8F0;
    border-bottom: 6px solid #CBD5E1;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.perfil-avatar-grande {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 4px solid #3B82F6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    margin-bottom: 12px;
}

.perfil-nombre {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1E293B;
    margin-bottom: 16px;
    text-align: center;
}

.perfil-xp {
    width: 100%;
    margin-bottom: 16px;
}

.btn-cambiar-nivel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    border-bottom: 5px solid #C2410C;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
    transition: all 0.15s;
}

.btn-cambiar-nivel:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.btn-cambiar-avatar {
    padding: 10px 18px;
    background: linear-gradient(180deg, #60A5FA 0%, #3B82F6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 4px solid #1E40AF;
    transition: all 0.1s;
}

.btn-cambiar-avatar:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.btn-guardar-nombre {
    padding: 10px 16px;
    background: linear-gradient(180deg, #7AE838 0%, #58CC02 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 4px solid #46A302;
    transition: all 0.1s;
}

.btn-guardar-nombre:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

/* Dark mode */
body.dark-mode .perfil-container {
    background: #0f172a;
}

body.dark-mode .perfil-header-card {
    background: #1e293b;
    border-color: #475569;
    border-bottom-color: #334155;
}

body.dark-mode .perfil-avatar-grande {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border-color: #60A5FA;
}

body.dark-mode .perfil-nombre {
    color: #f1f5f9;
}

/* ============================================================
   TUTORIAL INTERACTIVO
   ============================================================ */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tutorial-overlay.hidden {
    display: none;
}

.tutorial-bloqueo {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    pointer-events: auto;
}

.tutorial-resaltado {
    position: absolute;
    border: 3px solid #58CC02;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 30px rgba(88, 204, 2, 0.8);
    transition: all 0.4s ease;
    pointer-events: none;
    z-index: 100000;
    display: none;
}

.tutorial-resaltado.visible {
    display: block;
}

.tutorial-cuadro {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 340px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 100001;
    pointer-events: auto;
    text-align: center;
    animation: tutorialIn 0.4s ease;
}

@keyframes tutorialIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.tutorial-icono {
    font-size: 3rem;
    margin-bottom: 12px;
}

.tutorial-titulo {
    font-size: 1.3rem;
    font-weight: 900;
    color: #1E293B;
    margin-bottom: 8px;
}

.tutorial-texto {
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748B;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tutorial-botones {
    display: flex;
    gap: 10px;
}

.tutorial-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
}

.tutorial-btn-primario {
    background: linear-gradient(180deg, #7AE838 0%, #58CC02 100%);
    color: white;
    border-bottom: 4px solid #46A302;
}

.tutorial-btn-primario:active {
    transform: translateY(2px);
    border-bottom-width: 2px;
}

.tutorial-btn-secundario {
    background: #F1F5F9;
    color: #64748B;
}

.tutorial-btn-secundario:active {
    transform: scale(0.97);
}

.tutorial-progreso {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.tutorial-punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
    transition: all 0.3s;
}

.tutorial-punto.activo {
    background: #58CC02;
    width: 24px;
    border-radius: 4px;
}

/* Dark mode */
body.dark-mode .tutorial-cuadro {
    background: #1e293b;
}

body.dark-mode .tutorial-titulo {
    color: #f1f5f9;
}

body.dark-mode .tutorial-texto {
    color: #cbd5e1;
}

body.dark-mode .tutorial-btn-secundario {
    background: #334155;
    color: #cbd5e1;
}

/* ===== SAFE AREA: evitar que la barra del sistema tape el nav-bar ===== */
.nav-bar {
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
}

.pantalla > .mapa-container,
.pantalla > .tienda-container,
.pantalla > .perfil-container {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
}