/* =========================
   AUTH (LOGIN / REGISTRO)
========================= */

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex: 1;
}

.auth-box {
    width: 100%;
    max-width: 420px;
    background: var(--fondo-sitio);
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 20px 50px -25px rgb(249 249 249 / 60%);
}

.auth-box h1 {
    font-size: 26px;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    margin-bottom: 25px;
}

/* FORM */
.auth-form input {
    max-width: -webkit-fill-available;
	width: -moz-available;
    width: 100%;
    padding: 14px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--fondo-sitio);
    color: var(--texto-general);
    font-size: 14px;
}

.auth-form input:focus {
    outline: none;
    border-color: #ff0055;
}

/* BOTÓN */
.btn-auth {
    width: 100%;
    padding: 14px;
    border-radius: 999px;
    border: none;
    background: var(--boton-principal-fondo);
    color: var(--boton-principal-texto);
    font-weight: 700;
    cursor: pointer;
    transition: all .25s ease;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 30px -13px var(--boton-principal-fondo);
}

/* GOOGLE */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--texto-general);
    text-decoration: none;
    transition: all .25s ease;
}

.btn-google img {
    width: 20px;
}

.btn-google:hover {
    background: rgba(255,255,255,0.05);
}

/* DIVIDER */
.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider span {
    padding: 0 10px;
    color: var(--texto-general);
}

.auth-divider::before {
    content: "";
    height: 1px;
    background: rgba(255,255,255,0.1);
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    z-index: -1;
}

/* ERRORES */
.auth-errors {
    background: rgba(255,0,0,0.1);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.auth-errors p {
    color: #ff7777;
    font-size: 13px;
}

/* FOOTER */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.auth-footer a {
    color: var(--boton-principal-fondo);
    text-decoration: none;
}

/* ==============================
   LOGIN MODAL ANIMADO
============================== */

.login-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0;
    z-index: 9999;
    pointer-events: none;
}

.login-modal:not(.active) {
    visibility: hidden;
}

/* Overlay animado */
.login-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.0);
    backdrop-filter: blur(0px);
    transition: all .4s ease;
}

/* Caja */
.login-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin-top: -100px;
    opacity: 0;
    transform: translateY(-80px) scale(.95);
    transition: all .6s cubic-bezier(.34,1.56,.64,1);
    z-index: 2;
}

/* ===== ACTIVO ===== */

.login-modal.active {
    pointer-events: auto;
    overflow: auto;
    backdrop-filter: blur(5px);
}

.login-modal.active .login-overlay {

}

.login-modal.active .login-box {
    margin-top: 120px;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==============================
   ANIMACIÓN INTERNA ESCALONADA
============================== */

.login-box > * {
    opacity: 0;
    transform: translateY(15px);
    transition: all .4s ease;
}

.login-modal.active .login-box > * {
    opacity: 1;
    transform: translateY(0);
}

/* Delay progresivo */
.login-modal.active .login-box > *:nth-child(1){ transition-delay: .15s; }
.login-modal.active .login-box > *:nth-child(2){ transition-delay: .25s; }
.login-modal.active .login-box > *:nth-child(3){ transition-delay: .35s; }
.login-modal.active .login-box > *:nth-child(4){ transition-delay: .45s; }
.login-modal.active .login-box > *:nth-child(5){ transition-delay: .55s; }
.login-modal.active .login-box > *:nth-child(6){ transition-delay: .65s; }
.login-modal.active .login-box > *:nth-child(7){ transition-delay: .75s; }


.login-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    z-index: 2;
}

.login-error {
    margin-top: 10px;
    color: #ff7777;
    font-size: 13px;
}

/* MOBILE */
@media (max-width: 480px) {
    .auth-box {
        padding: 25px;
    }
}
