* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #000a12;
}

.contenedor-principal {
    position: relative;
    width: 100%;
    max-width: 1500px;
    height: 700px;
    overflow: hidden;
}

/* ENCABEZADO LOGO */
.encabezado-logo {
    position: absolute;
    top: 30px;
    left: 50px;
    z-index: 100;
}

.caja-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.texto-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: #ffffff;
    font-size: 1.2rem;
    letter-spacing: 2px;
}


.contenedor-principal .caja-formulario {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.caja-formulario.iniciar-sesion {
    left: 0;
    padding: 0 50px;
}

.caja-formulario.iniciar-sesion .animacion {
    transform: translateX(0%);
    transition: .7s;
    opacity: 1;
    transition-delay: calc(.1s * var(--S));
}

.contenedor-principal.active .caja-formulario.iniciar-sesion .animacion {
    transform: translateX(-200%);
    opacity: 0;
    transition-delay: calc(.1s * var(--D));
}

.caja-formulario.registro {
    right: 0;
    padding: 0 60px;
}

.caja-formulario.registro .animacion {
    transform: translateX(200%);
    transition: .7s ease;
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(.1s * var(--S));
}

.contenedor-principal.active .caja-formulario.registro .animacion {
    transform: translateX(0%);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(.1s * var(--D));
}

.caja-formulario h2 {
    font-size: 36px;
    text-align: center;
}

.caja-formulario .caja-input {
    position: relative;
    width: 100%;
    max-width: 330px;
    height: 40px;
    margin: 30px auto 0;
}

.caja-input input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #000;
    padding-right: 32px;
    transition: .5s;
}

.caja-input input:focus,
.caja-input input:valid {
    border-bottom: 2px solid #cfb53c;
}

.caja-input label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 16px;
    letter-spacing: 1px;
    transition: .5s;
}

.caja-input input:focus~label,
.caja-input input:valid~label {
    top: -5px;
    color: #cfb53c;
}

.caja-input i {
    position: absolute;
    top: 50%;
    right: 0;
    font-size: 18px;
    transform: translateY(-50%);
    transition: .5s;
}

.caja-input .ver-contrasena {
    right: 0;
    cursor: pointer;
}

.caja-input input:focus~i,
.caja-input input:valid~i {
    color: #cfb53c;
}

.boton {
    position: relative;
    width: 100%;
    height: 40px;
    background: transparent;
    border-radius: 40px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1d;
    border: 2px solid #cfb53c;
    letter-spacing: 1px;
    overflow: hidden;
    z-index: 1;
}

.caja-formulario.registro .boton,
.caja-formulario.iniciar-sesion .boton {
    width: 240px;
    display: block;
    margin: 0 auto;
}

.boton::before {
    content: '';
    position: absolute;
    height: 300%;
    width: 100%;
    background: linear-gradient(#cfb53c, #f3d989, #cfb53c, #f3d989);
    top: -100%;
    left: 0;
    z-index: -1;
    transition: .5s;
}

.boton:hover::before {
    top: 0;
}

.boton:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: #e0e0e0;
    border-color: #999;
}

.boton:disabled::before {
    display: none;
}

.link-registro {
    font-size: 14px;
    text-align: center;
    margin: 20px 0 10px;
}

/* CUADRO BLANCO */
.cuadro-blanco {
    background: #fff8dc;
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
}

.caja-formulario.iniciar-sesion .cuadro-blanco {
    margin: 0 auto 0 50px;
}

.caja-formulario.registro .cuadro-blanco {
    margin: 0 20px 0 auto;
}

.cuadro-blanco h2 {
    color: #1d1d1d;
    margin-bottom: 30px;
}

.cuadro-blanco .caja-input {
    margin: 35px auto 0;
}

.cuadro-blanco .caja-input input {
    border-bottom: 2px solid #d1d1d1;
    color: #1d1d1d;
}

.cuadro-blanco .caja-input label {
    color: #666;
}

.cuadro-blanco .caja-input i {
    color: #1d1d1d;
}

.cuadro-blanco .caja-input input:focus~label,
.cuadro-blanco .caja-input input:valid~label {
    color: var(--matte-gold, #cfb53c);
}

.cuadro-blanco .caja-input input:focus,
.cuadro-blanco .caja-input input:valid {
    border-bottom: 2px solid var(--matte-gold, #cfb53c);
}

.cuadro-blanco .link-registro p {
    color: #666;
}

.cuadro-blanco .link-registro a {
    color: #1d1d1d;
}

.cuadro-blanco .boton {
    margin-top: 30px;
}

.link-registro a {
    text-decoration: none;
    font-weight: 600;
}

.link-registro a:hover {
    text-decoration: underline;
}

.contenido-info {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.contenido-info.iniciar-sesion {
    right: 0;
    text-align: center;
    padding: 0 100px 60px 300px;
}

.contenido-info.iniciar-sesion .animacion {
    transform: translateX(0);
    transition: .7s ease;
    transition-delay: calc(.1s * var(--S));
    opacity: 1;
    filter: blur(0);
}

.contenedor-principal.active .contenido-info.iniciar-sesion .animacion {
    transform: translateX(120%);
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(.1s * var(--D));
}

.contenido-info.registro {
    left: 0;
    text-align: center;
    padding: 0 180px 60px 30px;
    pointer-events: none;
}

.contenido-info.registro .animacion {
    transform: translateX(-120%);
    transition: .7s ease;
    opacity: 0;
    filter: blur(10px);
    transition-delay: calc(.1s * var(--S));
}

.contenedor-principal.active .contenido-info.registro .animacion {
    transform: translateX(0%);
    opacity: 1;
    filter: blur(0);
    transition-delay: calc(.1s * var(--D));
}

.contenido-info h2 {
    text-transform: uppercase;
    font-size: 36px;
    line-height: 1.3;
    text-align: center;
}

.contenedor-principal .forma-curva {
    position: absolute;
    right: 0;
    top: -5px;
    height: 1200px;
    width: 2000px;
    background: #001524;
    transform: rotate(10deg) skewY(40deg);
    transform-origin: bottom right;
    transition: 1.5s ease;
    transition-delay: 1.6s;
}

.contenedor-principal.active .forma-curva {
    transform: rotate(0deg) skewY(0deg);
    transition-delay: .5s;
}

.contenedor-principal .forma-curva2 {
    position: absolute;
    left: 650px;
    top: 100%;
    height: 1500px;
    width: 2000px;
    background: #000a12;
    border-top: 3px solid #001524;
    transform-origin: bottom left;
    transition: 1.5s ease;
    transition-delay: .5s;
}

.contenedor-principal.active .forma-curva2 {
    transform: rotate(-11deg) skewY(-41deg);
    transition-delay: 1.2s;
}

/* MODAL RECUPERAR CONTRASEÑA */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    animation: fade .3s;
    z-index: 10000;
}

@keyframes fade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.contenedor-modal {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(243, 217, 137, 0.95));
    backdrop-filter: blur(10px);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    text-align: center;
    position: relative;
    z-index: 9999;
    border: 1px solid rgba(207, 181, 60, 0.3);
    animation: slideIn .4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.contenedor-modal h2 {
    color: #1d1d1d;
    margin-bottom: 20px;
}

#cerrar,
#cerrarCambio,
#cerrarTerminos {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    color: #1d1d1d;
    font-size: 18px;
    cursor: pointer;
    transition: .3s;
    z-index: 100;
}

#cerrar:hover,
#cerrarCambio:hover,
#cerrarTerminos:hover {
    transform: scale(1.1);
    color: #ff0000;
}

.logo i {
    font-size: 70px;
    color: #cfb53c;
    margin-bottom: 10px;
}

.grupo-input {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
    margin: 20px 0;
    padding: 5px;
}

.grupo-input i {
    margin-right: 10px;
}

.grupo-input input {
    background: transparent !important;
    border: none;
    outline: none;
    width: 100%;
    padding: 10px;
    color: #1d1d1d;
    font-weight: 500;
}

/* Forzar fondo transparente para autocompletado de navegadores */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fff8dc inset !important;
    -webkit-text-fill-color: #1d1d1d !important;
    transition: background-color 5000s ease-in-out 0s;
}

.contenedor-modal .boton {
    width: 60%;
    max-width: 240px;
    margin: 20px auto 0;
}

.recuperar {
    margin-top: 15px;
}

#mensaje {
    margin-top: 15px;
    font-size: 14px;
    font-weight: bold;
}

/* EFECTO BOLSA DE MONEDAS */
.contenedor-animacion-monedas {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bolsa-dinero {
    font-size: 6rem;
    color: #cfb53c;
    z-index: 2;
    animation: vibrar-bolsa 3s infinite ease-in-out;
}

.moneda {
    position: absolute;
    font-size: 1.5rem;
    color: #cfb53c;
    opacity: 0;
    z-index: 1;
    bottom: 60px;
    animation: lanzar-moneda 2.5s infinite ease-out;
}

.moneda-1 {
    left: 40%;
    animation-delay: 0s;
}

.moneda-2 {
    left: 45%;
    animation-delay: 0.5s;
}

.moneda-3 {
    left: 50%;
    animation-delay: 1s;
}

.moneda-4 {
    left: 55%;
    animation-delay: 1.5s;
}

.moneda-5 {
    left: 60%;
    animation-delay: 2s;
}

@keyframes lanzar-moneda {
    0% {
        transform: translateY(0) scale(0.5) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(-150px) translateX(var(--x-coord, 20px)) scale(1.2) rotate(360deg);
        opacity: 0;
    }
}

@keyframes vibrar-bolsa {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    25% {
        transform: translateY(-5px) rotate(-2deg);
    }

    75% {
        transform: translateY(-5px) rotate(2deg);
    }
}

.moneda-1 {
    --x-coord: -40px;
}

.moneda-2 {
    --x-coord: -20px;
}

.moneda-3 {
    --x-coord: 0px;
}

.moneda-4 {
    --x-coord: 20px;
}

.moneda-5 {
    --x-coord: 40px;
}

/* MODAL CAMBIAR CONTRASEÑA (ESTILOS ESPECÍFICOS) */

.contenedor-modal.cambio-contrasena {
    background: #fff8dc;
}

.logo-cambio {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

.logo-cambio i {
    font-size: 80px;
    color: #cfb53c;
    margin-bottom: 10px;
}


.cambio-contrasena h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 30px;
    color: #000;
}

.cambio-contrasena .grupo-input {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #000;
    margin: 20px 0;
    padding: 5px;
}

.cambio-contrasena .grupo-input i {
    color: #1d1d1d;
    font-size: 1.1rem;
    margin-right: 10px;
}

.cambio-contrasena input::placeholder {
    color: #333;
    font-weight: 500;
}

.cambio-contrasena .boton {
    background: #ffcc00;
    border: 2px solid #b38b00;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

#mensajeCambio {
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
}

/* TOOLTIP CONTRASEÑA Y USUARIO */
.tooltip-password {
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%) translateX(-10px);
    background: #1d1d1d;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    width: max-content;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tooltip-usuario {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%) translateX(10px);
    background: #1d1d1d;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.4;
    width: max-content;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.tooltip-password::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #1d1d1d;
}

.tooltip-usuario::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-style: solid;
    border-color: transparent #1d1d1d transparent transparent;
}

.caja-input:hover .tooltip-password,
.grupo-input:hover .tooltip-password {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-25px);
}

.caja-input:hover .tooltip-usuario {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(25px);
}

/* INDICADOR DE FORTALEZA */
.indicador-fortaleza {
    width: 100%;
    max-width: 330px;
    margin: 10px auto 15px;
    transition: .5s;
}

.indicador-fortaleza span {
    color: #666;
    font-size: 13px;
    font-weight: 600;
}

#textoFortaleza {
    margin-left: 5px;
    transition: color 0.3s;
}

.barra-fortaleza {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#progresoFortaleza,
#progresoFortalezaCambio {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

/* ESTADOS DE FORTALEZA */
.baja { color: #ff4b2b !important; }
.media { color: #ff9f43 !important; }
.alta { color: #2ecc71 !important; }

.bg-baja { background-color: #ff4b2b !important; }
.bg-media { background-color: #ff9f43 !important; }
.bg-alta { background-color: #2ecc71 !important; }

/* AJUSTE PARA EL INPUT CUANDO CAMBIA EL COLOR */
.input-baja { border-bottom-color: #ff4b2b !important; }
.input-media { border-bottom-color: #ff9f43 !important; }
.input-alta { border-bottom-color: #2ecc71 !important; }

.icon-baja { color: #ff4b2b !important; }
.icon-media { color: #ff9f43 !important; }
.icon-alta { color: #2ecc71 !important; }

/* ERROR CONFIRMACIÓN CONTRASEÑA */
.error-confirmacion {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 11px;
    color: #ff4b2b;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s ease;
}

.error-confirmacion.visible {
    opacity: 1;
}

.input-match-error {
    border-bottom-color: #ff4b2b !important;
}

/* ===================================================
   MEDIA QUERIES — DISEÑO COMPLETAMENTE RESPONSIVO
   Breakpoints: 1400px · 1200px · 992px · 768px · 480px · 360px
   =================================================== */

/* ── Pantallas grandes (hasta 1400px) ── */
@media (max-width: 1400px) {
    .contenedor-principal {
        max-width: 100%;
        width: 100%;
    }
}

/* ── Tablets grandes / laptops pequeñas (hasta 1200px) ── */
@media (max-width: 1200px) {
    .contenedor-principal {
        width: 100%;
        height: 680px;
    }

    .contenido-info.iniciar-sesion {
        padding: 0 40px 60px 200px;
    }

    .contenido-info.registro {
        padding: 0 120px 60px 30px;
    }

    .caja-formulario.iniciar-sesion {
        padding: 0 30px;
    }

    .caja-formulario.registro {
        padding: 0 40px;
    }

    .cuadro-blanco {
        max-width: 380px;
    }
}

/* ── Tablets (hasta 992px) ── */
@media (max-width: 992px) {
    .contenedor-principal {
        height: 620px;
    }

    .caja-formulario h2,
    .contenido-info h2 {
        font-size: 26px;
    }

    .contenido-info h2 {
        font-size: 22px;
    }

    .cuadro-blanco {
        padding: 18px 16px;
        max-width: 340px;
    }

    .caja-formulario.iniciar-sesion,
    .caja-formulario.registro {
        padding: 0 20px;
    }

    .caja-formulario.iniciar-sesion .cuadro-blanco {
        margin: 0 auto 0 20px;
    }

    .caja-formulario.registro .cuadro-blanco {
        margin: 0 10px 0 auto;
    }

    .contenido-info.iniciar-sesion {
        padding: 0 20px 40px 160px;
    }

    .contenido-info.registro {
        padding: 0 100px 40px 20px;
    }

    .contenedor-animacion-monedas {
        width: 150px;
        height: 150px;
    }

    .bolsa-dinero {
        font-size: 4.5rem;
    }

    /* Modales en tablets */
    .contenedor-modal {
        padding: 30px 25px;
        max-width: 360px;
    }
}

/* ── Móviles grandes / tablets pequeñas (hasta 768px) ── */
@media (max-width: 768px) {
    /* Cuerpo desplazable en móvil */
    body {
        align-items: flex-start;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Contenedor principal pasa a flujo vertical */
    .contenedor-principal {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100svh;
        max-width: 100%;
        overflow-x: hidden;
        overflow-y: visible;
        display: flex;
        flex-direction: column;
        padding-bottom: 32px;
    }

    /* Logo centrado en la parte superior */
    .encabezado-logo {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        padding: 18px 16px 10px;
        display: flex;
        justify-content: center;
        z-index: 100;
        margin-bottom: 0;
    }

    /* Ocultar formas decorativas de escritorio */
    .forma-curva,
    .forma-curva2 {
        display: none !important;
    }

    /* ─── Reset completo de animaciones y posicionamiento ─── */
    .contenedor-principal .caja-formulario,
    .contenido-info {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        padding: 12px 16px !important;
        display: flex;
        flex-direction: column;
    }

    /* Quitar transforms/blur de TODAS las .animacion en móvil */
    .caja-formulario .animacion,
    .contenido-info .animacion,
    .contenedor-principal .animacion {
        transform: none !important;
        filter: none !important;
        opacity: 1 !important;
        transition: none !important;
        transition-delay: 0s !important;
    }

    /* ─── Visibilidad: sólo mostrar el panel activo ─── */
    /* Estado por defecto: login visible, registro oculto */
    .caja-formulario.registro,
    .contenido-info.registro {
        display: none !important;
    }

    .caja-formulario.iniciar-sesion,
    .contenido-info.iniciar-sesion {
        display: flex !important;
    }

    /* Estado activo (clase .active en contenedor): registro visible, login oculto */
    .contenedor-principal.active .caja-formulario.iniciar-sesion,
    .contenedor-principal.active .contenido-info.iniciar-sesion {
        display: none !important;
    }

    .contenedor-principal.active .caja-formulario.registro,
    .contenedor-principal.active .contenido-info.registro {
        display: flex !important;
        animation: mobileFadeIn 0.45s ease forwards;
    }

    /* Animación de entrada en móvil para el panel activo */
    .contenedor-principal:not(.active) .caja-formulario.iniciar-sesion,
    .contenedor-principal:not(.active) .contenido-info.iniciar-sesion {
        animation: mobileFadeIn 0.45s ease forwards;
    }

    /* ─── Info panel (texto + monedas) va ARRIBA del formulario ─── */
    .contenido-info {
        order: -1;
        padding: 16px !important;
        pointer-events: auto !important;
    }

    .contenido-info.iniciar-sesion,
    .contenido-info.registro {
        padding: 16px !important;
        text-align: center;
    }

    .contenido-info h2 {
        font-size: 1.25rem;
        line-height: 1.4;
    }

    .contenido-info p {
        font-size: 0.9rem;
        margin-top: 6px;
    }

    /* ─── Cuadro blanco (tarjeta del formulario) ─── */
    .cuadro-blanco {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 20px 16px !important;
        border-radius: 16px;
    }

    .caja-formulario h2 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }

    /* ─── Inputs ─── */
    .caja-formulario .caja-input {
        max-width: 100% !important;
        margin: 22px auto 0 !important;
    }

    .caja-input input {
        font-size: 15px;
    }

    /* ─── Botones ─── */
    .boton {
        width: 100% !important;
        max-width: 280px !important;
        height: 46px;
        font-size: 15px;
        border-radius: 40px;
        display: block;
        margin: 16px auto 0 !important;
    }

    .caja-formulario.registro .boton,
    .caja-formulario.iniciar-sesion .boton {
        width: 100% !important;
        max-width: 280px !important;
    }

    /* ─── Links de navegación ─── */
    .link-registro {
        font-size: 13px;
        margin: 14px 0 6px;
    }

    /* ─── Animación de monedas más pequeña ─── */
    .contenedor-animacion-monedas {
        width: 110px;
        height: 110px;
    }

    .bolsa-dinero {
        font-size: 3rem;
    }

    .moneda {
        font-size: 0.9rem;
    }

    /* ─── Modales ─── */
    .modal {
        align-items: flex-end;
        padding: 0;
    }

    .contenedor-modal {
        padding: 28px 20px 24px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
    }

    .contenedor-modal h2 {
        font-size: 1.15rem;
    }

    .logo i,
    .logo-cambio i {
        font-size: 48px;
    }

    .contenedor-modal .boton {
        width: 100% !important;
        max-width: 240px !important;
    }

    /* Botón de Google centrado */
    #googleBtnDiv,
    #googleBtnDivLogin {
        display: flex !important;
        justify-content: center !important;
        margin-top: 8px;
    }
}

/* ── Móviles medianos (hasta 480px) ── */
@media (max-width: 480px) {
    .caja-formulario h2 {
        font-size: 1.3rem;
    }

    .texto-logo {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }

    .encabezado-logo i {
        font-size: 1.6rem !important;
    }

    .boton {
        font-size: 14px;
        height: 44px;
        max-width: 260px !important;
    }

    .caja-formulario.iniciar-sesion,
    .caja-formulario.registro {
        padding: 0 8px !important;
    }

    .cuadro-blanco {
        padding: 18px 12px !important;
        border-radius: 14px;
    }

    .contenedor-modal h2 {
        font-size: 1.05rem;
    }

    .grupo-input input {
        font-size: 14px;
    }

    .contenido-info h2 {
        font-size: 1.1rem;
    }

    .contenido-info p {
        font-size: 0.85rem;
    }

    .contenedor-animacion-monedas {
        width: 90px;
        height: 90px;
    }

    .bolsa-dinero {
        font-size: 2.5rem;
    }

    .moneda {
        font-size: 0.8rem;
    }
}

/* ── Móviles pequeños (hasta 360px) ── */
@media (max-width: 360px) {
    .caja-formulario h2 {
        font-size: 1.15rem;
    }

    .texto-logo {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .boton {
        font-size: 13px;
        height: 42px;
        max-width: 220px !important;
    }

    .cuadro-blanco {
        padding: 14px 10px !important;
    }

    .caja-input input,
    .caja-input label {
        font-size: 13px;
    }

    .contenedor-modal {
        padding: 22px 14px 20px;
    }

    .contenedor-modal h2 {
        font-size: 0.95rem;
    }

    .logo i,
    .logo-cambio i {
        font-size: 36px;
    }

    .contenido-info h2 {
        font-size: 1rem;
    }

    .bolsa-dinero {
        font-size: 2rem;
    }
}

/* ── Animación de fade-in para cambio de panel en móvil ── */
@keyframes mobileFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* NOTIFICACIONES TOAST */
.notificacion-toast {
    position: fixed;
    top: 40px;
    right: 40px;
    background: #1d1d1d;
    color: #fff;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(150%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999999;
    border-left: 6px solid #cfb53c;
    min-width: fit-content;
    white-space: nowrap;
    pointer-events: none;
}

.notificacion-toast.visible {
    transform: translateX(0);
    pointer-events: auto;
}

.notificacion-toast.success {
    border-left-color: #2ecc71;
}

.notificacion-toast.error {
    border-left-color: #ff4b2b;
}

.notificacion-toast i {
    font-size: 1.4rem;
}

.notificacion-toast.success i {
    color: #2ecc71;
}

.notificacion-toast.error i {
    color: #ff4b2b;
}

.notificacion-toast .mensaje-toast {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}