.auth-modal-container {
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
    margin: 0 auto;
}

.auth-modal-container p {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.auth-modal-container span {
    font-size: 12px;
}

.auth-modal-container a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.auth-modal-container button {
    background-color: #512da8;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.auth-modal-container button.hidden {
    background-color: transparent;
    border-color: #fff;
}

.auth-modal-container form {
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    height: 100%;
}

.auth-modal-container input {
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.form-container {
    position: absolute;
    top: 0px;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in {
    left: 0;
    width: 50%;
    z-index: 2;
}

.auth-modal-container.active .sign-in {
    transform: translateX(100%);
}

.sign-up {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.auth-modal-container.active .sign-up {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move {

    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.social-icons {
    margin: 20px 0;
}

.social-icons a {
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
}

.toggle-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 150px 0 0 100px;
    z-index: 1000;
}

.auth-modal-container.active .toggle-container {
    transform: translateX(-100%);
    border-radius: 0 150px 100px 0;
}

.toggle {
    background-color: #512da8;
    height: 100%;
    background: linear-gradient(to right, #5c6bc0, #512da8);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.auth-modal-container.active .toggle {
    transform: translateX(50%);
}

.toggle-panel {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.toggle-left {
    transform: translateX(-200%);
}

.auth-modal-container.active .toggle-left {
    transform: translateX(0);
}

.toggle-right {
    right: 0;
    transform: translateX(0);
}

.auth-modal-container.active .toggle-right {
    transform: translateX(200%);
}

/* Títulos blancos sobre fondo azul/gradiente */
.toggle-panel h1 {
    color: #ffffff !important;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 768px) {
    .auth-modal-container {
        width: 100%;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .form-container {
        position: relative;
        width: 100% !important;
        height: auto !important;
        padding: 40px 20px;
        opacity: 1 !important;
        z-index: 5 !important;
        transform: none !important;
        display: none;
    }

    /* En móvil ocultamos el panel lateral azul y mostramos un botón alternativo si fuera necesario, 
       pero por ahora simplemente alternamos visibilidad de formularios */
    .toggle-container {
        display: none;
    }

    .auth-modal-container:not(.active) .sign-in {
        display: flex;
    }

    .auth-modal-container.active .sign-up {
        display: flex;
    }

    .auth-modal-container form {
        padding: 0 10px;
    }

    .mobile-toggle-link {
        display: block !important;
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 480px) {
    .auth-modal-container h1 {
        font-size: 22px;
    }

    .auth-modal-container p {
        font-size: 13px;
        margin: 10px 0;
    }

    .auth-modal-container button {
        padding: 10px 30px;
        width: 100%;
    }
}

/* ==========================================
   MODAL DE NOTIFICACIÓN PERSONALIZADO
   (reemplaza al alert() nativo del navegador)
   ========================================== */
#customAlertOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    animation: fadeInOverlay 0.2s ease;
}

#customAlertOverlay.show {
    display: flex;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#customAlertBox {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(81, 45, 168, 0.3);
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    animation: slideUpAlert 0.25s ease;
}

@keyframes slideUpAlert {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

#customAlertBox .alert-header {
    background: linear-gradient(135deg, #5c6bc0, #512da8);
    padding: 18px 24px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#customAlertBox .alert-header .alert-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
}

#customAlertBox .alert-header .alert-site {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    letter-spacing: 0.3px;
}

#customAlertBox .alert-body {
    padding: 22px 24px 10px;
}

#customAlertBox .alert-body p {
    color: #444;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

#customAlertBox .alert-footer {
    padding: 14px 24px 22px;
    display: flex;
    justify-content: flex-end;
}

#customAlertBox .alert-footer button {
    background: linear-gradient(135deg, #5c6bc0, #512da8);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 32px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 0;
}

#customAlertBox .alert-footer button:hover {
    opacity: 0.88;
}