@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,700;1,900&display=swap');



* {

    box-sizing: border-box;

    margin: 0;

    padding: 0;

    font-family: 'Montserrat', sans-serif;

    user-select: none;

}



html, body {

    width: 100%;

    height: 100%;

    overflow: hidden;

    background-color: #4a9c1c;

}



body {

    display: flex;

    flex-direction: column;

}



.fondo-app {

    position: absolute;

    top: 0;

    left: 0;

    width: 100vw;

    height: 100vh;

    background-image: url('../imagenes/desktopjuego.svg');

    background-size: cover;

    background-position: center;

    z-index: 1;

}



.game-viewport {

    position: relative;

    z-index: 2;

    width: 100vw;

    flex: 1;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

}



/* HEADER DESKTOP */

.header-desktop {

    display: flex;

    justify-content: space-between;

    align-items: center;

    width: 100%;

    background-color: #292E33;

    padding: 16px 40px;

    position: relative;

    z-index: 10;

}



.header-logo img {

    height: 38px;

    width: auto;

    object-fit: contain;

    display: block;

}



.header-nav {

    display: flex;

    gap: 32px;

    align-items: center;

}



.nav-link {

    display: inline-block;

    padding: 8px 18px;

    color: #FFEDD5;

    text-decoration: none;

    font-size: 16px;

    font-weight: 500;

    transition: color 0.2s ease;

}



.nav-link:hover { color: #FADBB3; }



.nav-link.activo {

    background-color: #7B7EBC;

    color: #ffffff;

    border-radius: 8px;

    font-weight: 600;

}



.header-perfil {

    cursor: pointer;

    transition: transform 0.2s ease;

    outline: none;

}



.header-perfil:hover { transform: scale(1.08); }



.header-perfil img {

    width: 40px;

    height: 40px;

    border-radius: 50%;

    border: 2px solid #7B7EBC;

    object-fit: cover;

    display: block;

}



.btn-hamburguesa {

    display: none;

    background: transparent;

    border: none;

    color: #ffffff;

    font-size: 34px;

    cursor: pointer;

}



/* BARRAS DE JUEGO */

.level-section { padding: 0 30px; margin-top: 10px; z-index: 5; }

.level-label {

    color: white; font-weight: 900; font-style: italic; font-size: 1.1rem;

    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); display: block; margin-bottom: 4px;

}

.progress-track { width: 100%; height: 18px; background-color: rgba(220,220,220,0.85); border-radius: 10px; padding: 2px; }

.progress-fill { height: 100%; background-color: #125808; border-radius: 8px; }



/* CONTADOR DE ENERGÍA */

.energy-counter {

    background: #ffffff; padding: 6px 16px; border-radius: 50px;

    display: inline-flex; align-items: center; gap: 8px;

    box-shadow: 0 4px 6px rgba(0,0,0,0.15); width: fit-content;      

    align-self: flex-start; margin: 15px 0 10px 30px;

}

.bolt-container { display: flex; align-items: center; filter: drop-shadow(0 0 3px rgba(0,210,255,0.6)); }

.energy-text { font-size: 1.4rem; font-weight: 900; color: #222; }





/* ========================================================

   DISEÑO BASE DE NODOS

   ======================================================== */

.map-area { flex-grow: 1; position: relative; width: 100%; }



.path-node {

    position: absolute; width: 42px; height: 42px; background-color: #ff6b3d;

    border: 4px solid #ffffff; border-radius: 50%; box-shadow: 0 6px 10px rgba(0,0,0,0.3);

    cursor: pointer; transition: transform 0.2s, background-color 0.4s ease; display: block;

    z-index: 5;

}



.path-node:hover { transform: scale(1.25); background-color: #ff855e; }



/* GANCHO PARA JAVASCRIPT: Al ponerle esta clase, pasa a verde oscuro */

.path-node.nodo-resuelto {

    background-color: #0c4a11 !important;

    border-color: #ffffff;

    box-shadow: 0 0 14px rgba(12, 74, 17, 0.85);

}



/* --------------------------------------------------------

   1. UBICACIONES NODOS - DESKTOP (PC)

   [Modificá exclusivamente estas líneas para acomodar en PC]

   -------------------------------------------------------- */

.node-1 { top:43%; left: 17%; }

.node-2 { top: 54%; left: 29%; }

.node-3 { top: 61%; left: 43%; }

.node-4 { top: 8%; left: 46%; }

.node-5 { top: 22%; left: 58%; }

.node-6 { top: 78%; left: 67%; }

.node-7 { top: 58%; left: 73%; }

.node-8 { top: 1%; left: 78%; }





/* ========================================================

   ANIMACIÓN ÁRBOLES

   ======================================================== */

@keyframes pvzRespiracion {

    0%   { transform: rotate(0deg) scaleY(1) scaleX(1); }

    35%  { transform: rotate(4.8deg) scaleY(1.08) scaleX(0.92); }

    70%  { transform: rotate(-3.8deg) scaleY(0.92) scaleX(1.08); }

    100% { transform: rotate(0deg) scaleY(1) scaleX(1); }

}



.arbol {

    position: absolute; height: auto; transform-origin: bottom center;

    animation: pvzRespiracion 3.2s ease-in-out infinite; pointer-events: none; z-index: 2;

}



/* Árboles Desktop */

.arbol-1 { top: 69%; left: 7%;  width: 76px; animation-duration: 2.8s; animation-delay: 0s; }

.arbol-2 { top: 50%; left: 26%; width: 56px; animation-duration: 3.4s; animation-delay: 0.7s; }

.arbol-3 { top: 72%; left: 44%; width: 66px; animation-duration: 3.1s; animation-delay: 1.4s; }

.arbol-4 { top: 36%; left: 47%; width: 80px; animation-duration: 3.7s; animation-delay: 0.2s; }

.arbol-5 { top: 43%; left: 68%; width: 58px; animation-duration: 2.9s; animation-delay: 1.9s; }

.arbol-6 { top: 18%; left: 84%; width: 72px; animation-duration: 3.3s; animation-delay: 0.9s; }

.arbol-7 { top: 22%; left: 12%; width: 64px; animation-duration: 3.5s; animation-delay: 0.4s; }



.bottom-nav { display: none; }





/* ========================================================

   MENÚ LATERAL DESPLEGABLE

   ======================================================== */

.menu-desplegable {

    position: fixed; top: 0; right: 0; width: 270px; height: 100vh;  

    background-color: #EF4F4F; background-image: url("../imagenes/fondoondeado9.png");

    background-size: cover; background-position: center;

    animation: moverFondoOndeado 20s ease-in-out infinite;

    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4); transform: translateX(100%);

    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 100;

    display: flex; flex-direction: column;

}



.menu-desplegable.activo { transform: translateX(0); }

.menu-header { display: flex; justify-content: flex-end; padding: 15px 20px 0 0; }

.btn-cerrar { background: transparent; border: none; color: #ffffff; font-size: 34px; cursor: pointer; line-height: 1; }



.contenedor-botones-menu { display: flex; flex-direction: column; height: 100%; padding: 0 24px 25px 24px; }

.menu-avatar { display: flex; justify-content: center; margin: 5px auto 12px auto; }

.menu-avatar img { width: 76px; height: 76px; border-radius: 50%; border: 3px solid #FADBB3; object-fit: cover; }



.btn-menu-usuario {

    display: block; width: 90%; margin: 0 auto 25px auto; padding: 8px 10px;

    border: 1.5px solid #FADBB3; color: #FADBB3; text-align: center;

    font-size: 15px; font-weight: 700; letter-spacing: 0.5px;

}



.grupo-principal { width: 100%; display: flex; flex-direction: column; gap: 12px;}

.item-ajustes-contenedor { width: 100%; }

.solo-movil { display: none !important; }



.btn-menu-blanco {

    display: flex; align-items: center; justify-content: center; width: 90%; margin: 0 auto; padding: 13px 0;

    background-color: #FADBB3; color: #ED6C3A; font-size: 14.5px; font-weight: 800; text-decoration: none;

    border-radius: 50px; border: none; box-shadow: 0 4px 10px rgba(0,0,0,0.15); cursor: pointer;

}



.submenu-ajustes {

    max-height: 0; overflow: hidden; display: flex; flex-direction: column;

    gap: 8px; width: 90%; margin: 0 auto; transition: max-height 0.35s ease;

}

.submenu-ajustes.abierto { max-height: 180px; padding-top: 12px; }



.btn-subopcion {

    padding: 8px 0; background-color: #7B7EBC; color: #fdf0dd; font-size: 12px;

    font-weight: 700; border-radius: 50px; border: none; cursor: pointer; width: 100%;

}

.btn-subopcion.desactivado { background-color: #292E33; color: #f57134; }



.footer-menu { margin-top: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px;}



.btn-cerrar-sesion {

    display: block; width: 90%; margin: 0 auto; padding: 14px 0; background-color: #23272b;

    color: #ffffff; text-align: center; text-decoration: none; font-size: 13.5px; font-weight: 700;  

    border-radius: 50px; box-shadow: 0 4px 10px rgba(0,0,0,0.25);      

}



.img-logo-menu { width: 50px; height: auto; object-fit: contain; }



.menu-overlay {

    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;

    background: rgba(0, 0, 0, 0.5); display: none; z-index: 99;

}

.menu-overlay.activo { display: block; }



@keyframes moverFondoOndeado {

    0% { background-position: 0% 50%; }

    50% { background-position: 100% 50%; }

    100% { background-position: 0% 50%; }

}





/* ========================================================

   RESPONSIVE MÓVIL (768px hacia abajo)

   ======================================================== */

@media (max-width: 768px) {

   

    .fondo-app {

        background-image: url('../imagenes/mobilejuego.svg');

    }



    .solo-movil { display: flex !important; }



    .header-desktop { background-color: transparent; padding: 12px 20px; }

    .header-nav, .header-perfil { display: none; }

    .btn-hamburguesa { display: block; }



    .bottom-nav {

        display: flex; height: 65px; background-color: #24262b;

        justify-content: space-around; align-items: center; width: 100%; z-index: 10; padding: 0 5px;

    }



    .bottom-nav a { display: flex; align-items: center; justify-content: center; height: 100%; flex: 1; }

    .bottom-nav a img { width: 28px; height: 28px; object-fit: contain; }

    .bottom-nav a:active img { transform: scale(0.82); }



    .level-section { padding: 0 20px; }

    .energy-counter { margin: 8px 0 10px 20px; }



    /* ----------------------------------------------------

       2. UBICACIONES NODOS - MÓVIL (Tus datos intactos)

       ---------------------------------------------------- */

    .node-1 { top: 85%; left: 38%; }

    .node-2 { top: 72%; left: 35%; }

    .node-3 { top: 60%; left: 29%; }

    .node-4 { top: 48%; left: 33%; }

    .node-5 { top: 47%; left: 60%; }

    .node-6 { top: 32%; left: 52%; }

    .node-7 { top: 20%; left: 20%; }

    .node-8 { top: 6%;  left: 58%; }



    /* Árboles Móvil */

    .arbol-1 { top: 84%; left: 14%; width: 48px; }

    .arbol-2 { top: 66%; left: 80%; width: 40px; }

    .arbol-3 { top: 56%; left: 20%; width: 52px; }

    .arbol-4 { top: 38%; left: 84%; width: 36px; }

    .arbol-5 { top: 24%; left: 15%; width: 44px; }

    .arbol-6 { top: 10%; left: 50%; width: 48px; }

    .arbol-7 { top: 25%; left: 80%; width: 48px; }

}



/* ==========================================================================

   ESTILOS EXCLUSIVOS DE LA TRIVIA (Aislados por body.page-trivia)

   ========================================================================== */



body.page-trivia {

    background-color: #619d78;

    height: 100vh; width: 100vw; overflow: hidden; position: relative;

    font-family: 'Montserrat', sans-serif; user-select: none;

}



/* ARREGLADO: Caída fluida y rotación suave de los signos (?) */

.bg-preguntas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

.bg-preguntas img {

    position: absolute;

    opacity: 0.12;

    top: -60px;

    animation-name: caerPreguntitas;

    animation-timing-function: linear;

    animation-iteration-count: infinite;

}



@keyframes caerPreguntitas {

    0% { transform: translateY(0) rotate(0deg); }

    100% { transform: translateY(112vh) rotate(360deg); }

}



.trivia-viewport {

    position: relative; z-index: 2; display: flex; flex-direction: column;

    height: 100%; max-width: 480px; margin: 0 auto; padding: 15px 20px;

}



.header-trivia { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }



.btn-back {

    background: #e2f1b3; border: none; color: #355848; font-size: 20px; font-weight: 900;

    width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;

    box-shadow: 0 4px 0px #b1c880; flex-shrink: 0;

}

.btn-back:active { transform: translateY(3px); box-shadow: none; }



.logo-trivia { height: 36px; width: auto; }



.trivia-progress-container { flex-grow: 1; height: 16px; background: rgba(0,0,0,0.18); border-radius: 20px; padding: 3px; }

.trivia-progress-bar { height: 100%; background: #084E00; border-radius: 20px; transition: width 0.45s cubic-bezier(0.25, 1, 0.5, 1); }



.main-content-trivia { flex: 1; display: flex; align-items: center; justify-content: center; padding-bottom: 20px; position: relative; }



.card-trivia {

    background: #e3f0b3; width: 100%; border-radius: 28px; padding: 45px 24px 30px 24px;

    position: relative; box-shadow: 0 12px 25px rgba(0,0,0,0.15); text-align: center;

    transition: opacity 0.25s ease; z-index: 5;

}



.icon-notch {

    position: absolute; top: -32px; left: 50%; transform: translateX(-50%);

    width: 68px; height: 68px; background: #e3f0b3; border-radius: 50%;

    display: flex; align-items: center; justify-content: center;

    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);

}

.icon-notch img { width: 42px; height: 42px; object-fit: contain; }



.step-indicator { font-size: 13px; font-weight: 800; color: #4b7a64; letter-spacing: 0.5px; display: block; margin-bottom: 12px;}

.question-title { font-size: 1.15rem; color: #234234; font-weight: 900; line-height: 1.35; margin-bottom: 25px; min-height: 3.8rem; display: flex; align-items: center; justify-content: center;}



.options-container { display: flex; flex-direction: column; gap: 12px; }



.btn-option {

    width: 100%; padding: 16px 14px; background-color: #518b76; color: #ffffff;

    border: none; border-radius: 50px; font-size: 14.5px; font-weight: 700;

    box-shadow: 0 5px 0px #386453; cursor: pointer; transition: all 0.15s;

}

.btn-option:hover { background-color: #5c9b84; }

.btn-option:active { transform: translateY(4px); box-shadow: 0 1px 0px #386453; }



@keyframes vibrarError {

    0%, 100% { transform: translateX(0); }

    20%, 60% { transform: translateX(-8px); background-color: #d94343; box-shadow: 0 5px 0 #9c2424;}

    40%, 80% { transform: translateX(8px); background-color: #d94343; box-shadow: 0 5px 0 #9c2424;}

}

.shake-anim { animation: vibrarError 0.4s ease; }



/* VICTORIA */

.card-victory { width: 100%; text-align: center; color: #ffffff; position: relative; z-index: 5; }

.victory-title { font-size: 2.4rem; font-weight: 900; letter-spacing: 1px; text-shadow: 0 3px 6px rgba(0,0,0,0.2); margin-bottom: 15px;}

.trophy-img { width: 180px; height: auto; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3)); margin: 10px auto; animation: flotarTrofeo 3s ease-in-out infinite;}

.victory-subtitle { color: #e2f1b3; font-size: 1.6rem; font-weight: 900; margin-top: 10px; line-height: 1.1;}

.victory-desc { font-size: 0.95rem; font-weight: 700; opacity: 0.9; margin: 12px 0 20px 0; }



.score-pill {

    display: inline-block; background: #e2f1b3; color: #355848; font-size: 1.4rem;

    font-weight: 900; padding: 6px 35px; border-radius: 50px; margin-bottom: 25px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.15);

}



.btn-action-verde {

    display: block; width: 100%; padding: 18px; background: #2f5845; color: #e2f1b3;

    border: none; border-radius: 50px; font-size: 16px; font-weight: 900; cursor: pointer;

    box-shadow: 0 6px 0px #1c362a; transition: all 0.2s;

}

.btn-action-verde:active { transform: translateY(5px); box-shadow: none; }



@keyframes flotarTrofeo {

    0%, 100% { transform: translateY(0); }

    50% { transform: translateY(-10px); }

}



/* MODALES */

.modal-overlay {

    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;

    background: rgba(0,0,0,0.65); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;

}

.modal-box {

    background: #EF4F4F; background-image: url("imagenes/fondoondeado9.png"); background-size: cover;

    width: 100%; max-width: 340px; padding: 30px 22px; border-radius: 25px; text-align: center; color: white;

    box-shadow: 0 15px 30px rgba(0,0,0,0.4); border: 3px solid #FADBB3;

}

.modal-box h3 { font-size: 1.6rem; font-weight: 900; margin-bottom: 10px; color: #FADBB3;}

.modal-box p { font-size: 1rem; font-weight: 700; margin-bottom: 25px; }



.modal-buttons { display: flex; flex-direction: column; gap: 10px; }

.btn-modal-si { padding: 12px; border-radius: 50px; border: none; background: #292E33; color: white; font-weight: 800; cursor: pointer;}

.btn-modal-piola { padding: 14px; border-radius: 50px; border: none; background: #FADBB3; color: #ED6C3A; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #c9ad8a;}



.oculta { display: none !important; }



/* PIEZAS DE CONFETI */

.confetti-piece {

    position: fixed;

    width: 10px;

    height: 14px;

    border-radius: 2px;

    z-index: 3;

    pointer-events: none;

}



.menu-nav-links {

    display: flex;

    flex-direction: column;

    gap: 15px;

    padding: 20px 0;

    align-items: center;

}



.btn-menu-pildora {

    display: block;

    width: 85%;

    padding: 14px;

    text-align: center;

    background-color: #FADBB3; /* Color crema de tus botones */

    color: #ED6C3A;            /* Texto naranja corporativo */

    font-weight: 900;

    font-size: 15px;

    text-decoration: none;

    border-radius: 50px;       /* Forma de cápsula */

    box-shadow: 0 4px 0 #c9ad8a;

    transition: transform 0.1s, box-shadow 0.1s;

    text-transform: uppercase;

}



.btn-menu-pildora:active {

    transform: translateY(4px);

    box-shadow: none;

}



/* ==========================================================================

   ESTILOS EXCLUSIVOS DE PANTALLA PERFIL

   ========================================================================== */



/* Ocultar el fondo verde solo si estamos en el perfil para respetar el diseño morado */

body:has(.perfil-main-area) {

    background-color: #383c74; /* Color base oscuro del perfil */

}

.oculta-en-perfil {

    display: none;

}



.perfil-main-area {

    flex-grow: 1;

    position: relative;

    width: 100%;

    display: flex;

    flex-direction: column;

    overflow-y: auto;

    overflow-x: hidden;

}



/* Fondo ondulado bicolor */

.perfil-curva-fondo {

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 45%;

    background-color: #989fee; /* Morado claro de arriba */

    border-bottom-left-radius: 40% 20%;

    border-bottom-right-radius: 40% 20%;

    z-index: 1;

}



.perfil-contenido {

    position: relative;

    z-index: 2;

    padding: 30px 20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    width: 100%;

    max-width: 1000px;

    margin: 0 auto;

    flex-grow: 1; /* Permite que el contenedor se expanda ocupando todo el alto */

}



/* Declarar columnas para móvil para controlar los espacios */

.perfil-columna-1 {

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

}



.perfil-columna-2 {

    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    margin-top: 35px; /* PUNTO 1: Separación de la biografía con la barra de progreso */

    flex-grow: 1;     /* PUNTO 2: Obliga a esta mitad a llenar el espacio vacío... */

    justify-content: space-evenly; /* ...y distribuye las tarjetas y el botón hacia abajo */

    padding-bottom: 20px;

}



/* Cabecera y Avatar */

.perfil-cabecera {

    text-align: center;

    margin-bottom: 20px;

}



.avatar-wrapper {

    position: relative;

    width: 140px;

    height: 140px;

    margin: 0 auto 10px auto;

}



.perfil-avatar {

    width: 100%;

    height: 100%;

    border-radius: 50%;

    object-fit: cover;

    border: 4px solid #383c74; /* Borde para separar del fondo */

    background-color: #383c74;

}



.nivel-badge {

    position: absolute;

    bottom: 5px;

    left: 5px;

    width: 35px;

    height: 35px;

    background-color: #e2e5f9;

    color: #383c74;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: 900;

    font-size: 1.2rem;

    box-shadow: 0 4px 6px rgba(0,0,0,0.2);

}



.perfil-usuario {

    color: #24265d;

    font-weight: 700;

    font-size: 1.4rem;

}



/* Estadísticas (Seguidores / Seguidos) */

.perfil-estadisticas {

    background-color: #989fee;

    display: flex;

    justify-content: center;

    gap: 40px;

    padding: 12px 30px;

    border-radius: 50px;

    margin-bottom: 20px;

    box-shadow: 0 6px 15px rgba(0,0,0,0.15);

    width: 100%;

    max-width: 320px;

}



.stat-item {

    display: flex;

    flex-direction: column;

    align-items: center;

}



.stat-icon-wrapper {

    display: flex;

    align-items: center;

    gap: 5px;

    color: #383c74;

    font-size: 1.8rem;

    font-weight: 900;

}



.stat-icon {

    width: 24px;

    height: auto;

    filter: brightness(0.2) sepia(1) hue-rotate(200deg) saturate(3); /* Truco para teñir SVG al tono oscuro si es necesario */

}



.stat-label {

    font-size: 0.65rem;

    font-weight: 700;

    color: #383c74;

    margin-top: -2px;

}



/* Barra de Progreso Perfil */

.perfil-progreso-contenedor {

    display: flex;

    align-items: center;

    justify-content: space-between; /* Asegura que los textos queden en los extremos */

    gap: 12px;

    width: 100%;

    max-width: 320px;

    margin-bottom: 25px;

}



.progreso-texto, .progreso-porcentaje {

    color: #383c74; /* Violeta oscuro para que resalte y combine con el borde */

    font-weight: 800;

    font-size: 0.9rem;

    white-space: nowrap; /* Evita que el texto se rompa en dos líneas */

}



.perfil-track {

    flex-grow: 1;

    background-color: transparent;

    border: 2px solid #383c74; /* El marco violeta oscuro que pediste */

    border-radius: 12px; /* Bordes redondeados para mantener el estilo de la app */

    height: 16px;

    padding: 2px;

}



.perfil-fill {

    background-color: #e2e5f9;

    height: 100%;

    border-radius: 8px; /* Redondeo interior para que encaje perfecto en el marco */

    transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);

}



/* Bio */

.perfile-bio {

    color: #d1d4f2;

    text-align: center;

    font-size: 0.95rem;

    line-height: 1.4;

    margin-bottom: 25px;

    max-width: 320px;

}



/* Tarjetas */

.perfil-tarjetas {

    display: flex;

    justify-content: center;

    gap: 12px;

    width: 100%;

    max-width: 380px;

    margin-bottom: 30px;

}



.tarjeta-info {

    background-color: #989fee;

    border-radius: 12px;

    padding: 15px 10px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    align-items: center;

    text-align: center;

    flex: 1;

    box-shadow: 0 4px 10px rgba(0,0,0,0.15);

    min-height: 120px;

}



.tarjeta-icono {

    width: 24px;

    height: 24px;

    margin-bottom: 8px;

    align-self: flex-start;

}



.tarjeta-texto {

    color: #383c74;

    font-size: 0.7rem;

    font-weight: 600;

    flex-grow: 1;

    display: flex;

    align-items: center;

}



.tarjeta-texto.text-large { font-size: 0.65rem; line-height: 1.2; }

.tarjeta-texto.numero-grande { font-size: 2.2rem; font-weight: 900; line-height: 1; align-items: flex-end;}



.tarjeta-titulo {

    color: #24265d;

    font-size: 0.75rem;

    font-weight: 900;

    margin-top: 8px;

    letter-spacing: 0.5px;

}





.btn-compartir {

    background-color: #f07141; /* Naranja del diseño */

    color: white;

    border: none;

    padding: 16px 20px;

    border-radius: 50px;

    font-size: 0.85rem;

    font-weight: 800;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    width: 100%;

    max-width: 320px;

    cursor: pointer;

    box-shadow: 0 5px 15px rgba(240, 113, 65, 0.4);

    transition: transform 0.15s, box-shadow 0.15s;

}



.btn-compartir:active {

    transform: translateY(3px);

    box-shadow: 0 2px 5px rgba(240, 113, 65, 0.4);

}



.icono-compartir-btn {

    width: 18px;

    height: auto;

}



/* Animaciones */

@keyframes flotarAvatar {

    0%, 100% { transform: translateY(0); }

    50% { transform: translateY(-6px); }

}

.animacion-flotar { animation: flotarAvatar 4s ease-in-out infinite; }



@keyframes aparecerArriba {

    from { opacity: 0; transform: translateY(20px); }

    to { opacity: 1; transform: translateY(0); }

}

.animacion-aparecer {

    opacity: 0;

    animation: aparecerArriba 0.5s ease forwards;

}



/* ==========================================================================

   RESPONSIVE: ADAPTACIÓN A DESKTOP (Distribución en columnas)

   ========================================================================== */

@media (min-width: 769px) {

    .perfil-contenido {

        flex-direction: row;

        align-items: center;

        justify-content: center;

        gap: 60px;

        height: 100%;

    }



    .perfil-curva-fondo {

        height: 100%;

        width: 45%;

        border-bottom-left-radius: 0;

        border-bottom-right-radius: 0;

        border-top-right-radius: 50% 20%;

        border-bottom-right-radius: 50% 20%;

    }



    .perfil-columna-1, .perfil-columna-2 {

        display: flex;

        flex-direction: column;

        align-items: center;

        width: 50%;

        margin-top: 0; /* Resetea el margen de separación de móvil */

        justify-content: flex-start; /* Resetea la distribución hacia abajo de móvil */

        padding-bottom: 0; /* Resetea el padding de móvil */

    }



    .perfil-columna-1 { align-items: center; }

    .perfil-columna-2 { align-items: flex-start; padding-top: 20px;}



    .perfil-usuario { color: #383c74; }

   

    .perfil-bio {

        text-align: left;

        font-size: 1.1rem;

        max-width: 400px;

    }



    .perfil-tarjetas { justify-content: flex-start; max-width: 450px;}

   

    .btn-compartir {

        margin: 0 auto;

        align-self: center;

        max-width: 380px;

    }

}
/* ==========================================================================
   PANTALLA MAPA Y BUSCADOR (NUEVO)
   ========================================================================== */

/* Layout general de la pantalla mapa para mantener headers y footers fijos */
.layout-mapa {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Contenedor del buscador fijo */
.contenedor-buscador-mapa {
    position: absolute;
    top: 80px; /* Debajo del header */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 100;
    pointer-events: none; /* Deja pasar clicks al mapa si no tocas el input */
}

.buscador-mapa {
    pointer-events: auto; /* Reactiva clicks en la barra */
    background-color: #292E33;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.buscador-mapa input {
    background: none;
    border: none;
    color: white;
    width: 100%;
    font-size: 16px;
    outline: none;
}

.buscador-mapa input::placeholder {
    color: #a0a0a0;
}

.btn-limpiar-mapa {
    color: #a0a0a0;
    font-size: 20px;
    cursor: pointer;
    margin-left: 10px;
}

/* Área del mapa interactivo/estático */
.contenedor-mapa-interactivo {
    flex: 1;
    position: relative;
    background-color: #F4EFE6;
    /* Comportamiento DESKTOP (Estático) por defecto */
    overflow: hidden; 
}

.mapa-scroll {
    position: relative;
    width: 100%;
    height: 100%;
}

.img-fondomapa {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

/* Estilos de los pines (Avatares flotantes) */
.pin-jugador {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transform: translate(-50%, -50%); /* Centra el pin exacto en las coordenadas */
    transition: transform 0.2s ease;
    z-index: 10;
}

.pin-jugador:hover {
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 20;
}

.pin-fondo {
    width: 55px;
    height: 55px;
    border-radius: 18px;
    padding: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.pin-fondo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.pin-punto {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
}

/* Colores de los pines según tu imagen */
.pin-rojo .pin-fondo { background-color: #EF5B5B; }
.pin-rojo .pin-punto { background-color: #EF5B5B; }

.pin-azul-oscuro .pin-fondo { background-color: #384A72; }
.pin-azul-oscuro .pin-punto { background-color: #384A72; }

.pin-violeta .pin-fondo { background-color: #8C78C9; }
.pin-violeta .pin-punto { background-color: #8C78C9; }

.pin-verde .pin-fondo { background-color: #69B086; }
.pin-verde .pin-punto { background-color: #69B086; }

.pin-naranja .pin-fondo { background-color: #F17D49; }
.pin-naranja .pin-punto { background-color: #F17D49; }

.pin-morado-fuerte .pin-fondo { background-color: #9200D6; }
.pin-morado-fuerte .pin-punto { background-color: #9200D6; }


/* ==========================================================================
   FOOTER DESKTOP (Código proporcionado, adaptado a las clases del HTML)
   ========================================================================== */
.footer1-desktop {
    background-color: #292E33;
    font-family: 'Montserrat', sans-serif;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 20px; /* Reducido para ocupar menos espacio vertical */
    gap: 6px; /* Reducido el espacio entre los iconos y el texto */
    z-index: 10;
}

.footer1-redes {
    display: flex;
    gap: 24px;
}

.red1-link img {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.red1-link img:hover {
    transform: scale(1.15);
}

.footer1-copyright {
    color: #FADBB3;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
}

.footer1-creditos {
    color: #FADBB3; 
    font-size: 11px;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    /* Ajuste para que no se rompa en pantallas pequeñas de PC */
    max-width: 800px;
    padding: 0 20px;
}

/* ==========================================================================
   RESPONSIVE (Mobile vs Desktop)
   ========================================================================== */
@media (max-width: 768px) {
    /* Comportamiento Mobile (Scroll libre) */
    .contenedor-mapa-interactivo {
        overflow: auto; /* Habilita el scroll */
    }
    
    .mapa-scroll {
        width: 200vw; /* Mapa más ancho que la pantalla celular */
        height: 150vh; /* Mapa más alto que la pantalla celular */
    }

    .contenedor-buscador-mapa {
        top: 20px; /* Ajuste porque no hay header desktop visible */
        position: fixed; /* Mantiene el buscador fijo mientras scrolleas el mapa */
    }

    .footer1-desktop {
        display: none !important; /* Oculta footer de PC en celular */
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none !important; /* Oculta footer de celular en PC */
    }
}

/* ==========================================================================
   CORRECCIONES: BUSCADOR, LISTA DE RESULTADOS Y FOOTER
   ========================================================================== */

/* Estilos para la lista desplegable de resultados */
.resultados-busqueda-mapa {
    background-color: #292E33;
    color: white;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: none; /* Oculto por defecto */
    overflow: hidden;
    position: absolute;
    top: 100%; /* Se coloca justo debajo del buscador */
    pointer-events: auto; /* Para poder hacer click en los resultados */
}

.resultados-busqueda-mapa li {
    padding: 12px 20px;
    border-bottom: 1px solid #444;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: background 0.2s;
}

.resultados-busqueda-mapa li:hover {
    background-color: #3e444b;
}

.resultados-busqueda-mapa li:last-child {
    border-bottom: none;
}

/* Arreglo Tipografía del Footer Desktop (Regular en vez de Bold/500) */
.footer1-copyright {
    color: #FADBB3;
    font-size: 13px;
    font-weight: 400; /* Cambiado a Regular */
    margin: 0;
}

.footer1-creditos {
    color: #FADBB3; 
    font-size: 11px;
    font-weight: 400; /* Cambiado a Regular */
    text-align: center;
    margin: 0;
    line-height: 1.4;
    max-width: 800px;
    padding: 0 20px;
}

/* Arreglo del Buscador superpuesto en Mobile */
@media (max-width: 768px) {
    .contenedor-buscador-mapa {
        /* Lo bajamos a 80px para que quede por debajo del header mobile */
        top: 80px; 
        position: fixed; 
        flex-direction: column; /* Para que la lista baje recta */
        align-items: center;
    }
}

/* ==========================================================================
   CORRECCIONES: HEADER MOBILE
   ========================================================================== */

/* Fondo oscuro para el header en versión Mobile */
@media (max-width: 768px) {
    .header-desktop {
        background-color: #24262b;
        position: relative; /* Para asegurar que tome el z-index */
        z-index: 200; /* Mantiene el header siempre por encima del mapa y los pines */
    }
    
    .contenedor-mapa-interactivo {
        /* En mobile el mapa puede ocupar todo el espacio restante hasta el footer flotante */
        height: calc(100vh - 80px - 60px); 
    }
}
/* ==========================================================================
   1. CONFIGURACIÓN BASE GLOBAL
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    background-color: #EBE8F4;
}

.game-viewport {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ==========================================================================
   2. DISEÑO DEL PERFIL (Estructura Borde a Borde)
   ========================================================================== */
.contenedor-perfil-full {
    display: flex;
    flex: 1 0 auto; 
    width: 100%;
}

.tarjeta-perfil-full {
    display: flex;
    flex-direction: column; 
    width: 100%;
    background-color: #EBE8F4;
}

/* --- COLUMNA MORADA --- */
.perfil-seccion-morada {
    background-color: #3B3C68;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}



/* Avatar reducido */
@keyframes flotarContenedor {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.perfil-avatar-circulo {
    width: 120px;
    height: 120px;
    background-color: #C3E2DC;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    border: 3px solid white;
    animation: flotarContenedor 3.5s ease-in-out infinite;
}

.perfil-avatar-circulo img {
    width: 70%; /* Tamaño reducido para no desbordar el marco */
    height: 70%;
    object-fit: contain;
}

.perfil-username { color: white; font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 600; margin: 0 0 15px 0; }
.btn-seguir-perfil { background-color: #E66F42; color: white; border: 2px solid #FFFFFF; padding: 8px 30px; border-radius: 8px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px; cursor: pointer; }

/* Control de Bio */
.perfil-bio { font-family: 'Montserrat', sans-serif; font-size: 14px; text-align: center; line-height: 1.5; }
.bio-desktop { display: none; }
.bio-mobile { color: #6C6D8A; margin: 20px 0; padding: 0 15px; }

/* --- COLUMNA CLARA --- */
.perfil-seccion-clara {
    flex: 1; 
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}

.perfil-contenido-interno {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.perfil-stats-container { display: flex; justify-content: space-between; gap: 10px; }
.stat-box { flex: 1; border: 1.5px solid #3B3C68; border-radius: 12px; padding: 15px 5px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.stat-valor { color: #3B3C68; font-size: 24px; font-weight: 700; font-family: 'Montserrat', sans-serif; display: flex; align-items: center; gap: 5px; }
.stat-icon { width: 20px; height: 20px; }
.stat-label { color: #3B3C68; font-size: 9px; font-weight: 600; font-family: 'Montserrat', sans-serif; margin-top: 5px; text-transform: uppercase; }

.duelos-seccion { margin-top: 10px; }
.titulo-duelos { color: #3B3C68; font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700; margin: 0 0 15px 0; text-transform: uppercase; }
.contenedor-duelos { display: flex; flex-direction: column; gap: 12px; }
.duelo-fila { display: flex; justify-content: space-between; align-items: center; border: 1.5px solid #3B3C68; border-radius: 15px; padding: 10px 15px; }
.duelo-avatares { display: flex; align-items: center; gap: 10px; }
.duelo-avatares img { width: 35px; height: 35px; border-radius: 50%; background-color: #C3E2DC; border: 2px solid white; }
.vs-text { color: #3B3C68; font-weight: 700; font-size: 14px; font-family: 'Montserrat', sans-serif; }
.duelo-resultado { font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 700; color: #3B3C68; }


/* ==========================================================================
   3. RESPONSIVE: COMPORTAMIENTO ESPECÍFICO DE SCROLL Y FOOTERS
   ========================================================================== */

/* --- VERSIÓN MOBILE --- */
@media (max-width: 768px) {
    html, body {
        height: 100vh;
        overflow: hidden !important; /* Asegura que la pantalla móvil no tenga scroll */
    }
    
    .game-viewport {
        height: 100vh;
        overflow: hidden !important; /* Bloquea deslizamientos accidentales en mobile */
        padding-bottom: 60px; /* Deja el espacio exacto para el footer inferior */
    }
    
    .bottom-nav {
        position: fixed !important;
        bottom: 0 !important; 
        left: 0 !important;
        margin: 0 !important;
        width: 100%;
        background-color: #292E33;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 60px;
        z-index: 9999; 
    }
    
    .footer1-desktop {
        display: none !important; /* Lo oculta para que no ocupe espacio invisible abajo */
    }
}

/* --- VERSIÓN DESKTOP --- */
@media (min-width: 769px) {
    html, body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto !important; /* Activa el scroll ÚNICAMENTE en la computadora */
    }

    .game-viewport {
        height: auto !important; 
        min-height: 100vh;
        overflow-y: visible !important;
    }

    .tarjeta-perfil-full {
        flex-direction: row; 
    }

    .perfil-seccion-morada { width: 35%; padding: 60px 40px; }
    .perfil-avatar-circulo { width: 160px; height: 160px; margin-bottom: 25px; }
    .bio-mobile { display: none; }
    .bio-desktop { display: block; color: #EBE8F4; margin-top: 30px; font-size: 15px; }

    .perfil-seccion-clara { width: 65%; align-items: center; padding: 60px 40px; }

    .perfil-stats-container { margin-bottom: 40px; width: 100%; }
    .stat-valor { font-size: 28px; }
    .duelo-fila { padding: 15px 25px; }
    .duelo-avatares img { width: 45px; height: 45px; }
    
    .bottom-nav {
        display: none !important; 
    }
    
}