/* =================================== */
/* ==== ESTILOS ORIGINALES (BASE) ==== */
/* =================================== */

.contenedor {
    width: 800px;
    height: 500px;
    display: flex;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    margin-left: 230px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.contenedor_form {
    width: 100%;
    overflow: hidden;
}

.contenedor_form form {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease-in;
}

.contenedor_form h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

.contenedor_form span {
    font-size: 12px;
    margin-bottom: 15px;
}

.contenedor_input {
    width: 300px;
    height: 40px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    background-color: #EEEEEE;
    border-radius: 5px; /* Añadido para consistencia */
}

.contenedor_input input {
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    background-color: inherit;
}

.contenedor_form a {
    color: black;
    font-size: 14px;
    margin-bottom: 20px;
    margin-top: 5px;
    text-decoration: none;
}

.boton {
    width: 170px;
    height: 45px;
    font-size: 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    background-color: #615EFC;
    color: white;
}

/*Animacion*/
.registro {
    transform: translateX(-100%);
}

.contenedor.toggle .inicio {
    transform: translateX(100%);
}

.contenedor.toggle .registro {
    transform: translateX(0);
}

.contenedor_bienvenida {
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    transform: translateX(100%);
    background-color: #141A45;
    transition: transform 0.5s ease-in-out, border-radius 0.5s ease-in-out;
    overflow: hidden;
    border-radius: 50% 0 0 50%;
}

.contenedor.toggle .contenedor_bienvenida {
    transform: translateX(0);
    border-radius: 0 50% 50% 0;
    background-color: #141A45;
}

.contenedor_bienvenida .welcome {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 50px;
    flex-direction: column;
    color: white;
    transition: transform 0.5s ease-in-out;
    width: 100%; /* Asegura que el contenido se centre bien */
}

.bienvenida_registro {
    transform: translateX(100%);
}

.contenedor_bienvenida h3 {
    font-size: 40px;
}

.contenedor_bienvenida p {
    font-size: 14px;
    text-align: center;
}

.contenedor_bienvenida button {
    border: 2px solid white;
    background-color: transparent;
}

.contenedor.toggle .bienvenida_registro {
    transform: translateX(0);
}

.contenedor.toggle .bienvenida_inicio {
    transform: translateX(-100%);
}

/* ============================================ */
/* ==== 📱 MEDIA QUERIES RESPONSIVAS 📱 ==== */
/* ============================================ */

/* --- Para Tablets y Celulares (hasta 850px) --- */
@media (max-width: 850px) {
    .contenedor {
        width: 90%;
        max-width: 450px; /* Ancho máximo para el formulario */
        height: auto; /* Altura flexible */
        margin: 30px auto; /* Centra el contenedor */
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        /* ✅ Se cambia a un solo formulario a la vez */
        display: block;
        padding: 20px 0;
    }
    
    /* ✅ OCULTA COMPLETAMENTE EL PANEL DE BIENVENIDA EN MÓVIL */
    .contenedor_bienvenida {
        display: none;
    }

    .contenedor_form {
        width: 100%;
    }
    
    /* ✅ Se ajusta para que solo se muestre un formulario */
    .inicio, .registro {
        transform: none !important; /* Desactiva animación de movimiento */
    }

    .registro {
        display: none; /* Oculto por defecto */
    }

    .contenedor.toggle .inicio {
        display: none;
    }

    .contenedor.toggle .registro {
        display: flex; /* Se muestra al activar el toggle */
    }
    
    .contenedor_input {
        width: 90%;
        max-width: 320px;
    }

    /* ✅ Ya no necesitamos un botón para cambiar, pero por si lo quieres añadir en otro lado */
    /* Este CSS es para un botón de texto simple que podrías poner debajo del formulario */
    .mobile-toggle-btn {
        display: block; /* Se muestra en móvil */
        text-align: center;
        margin-top: 15px;
        color: #141A45;
        font-weight: bold;
        cursor: pointer;
    }
}

/* --- Para Celulares Pequeños (hasta 480px) --- */
@media (max-width: 480px) {
    .contenedor_form h2 {
        font-size: 24px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
}

/* ✅ Ocultamos el botón de texto en escritorio */
.mobile-toggle-btn {
    display: none;
}