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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', Arial, sans-serif;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(120deg, #a685f5 0%, #a259f7 100%);
    position: relative;
    overflow: hidden;
}

/* Blobs decorativos sutiles */
body::before,
body::after {
    content: '';    
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    z-index: 0;
}
body::before {
    background: radial-gradient(circle at 30% 30%, rgba(58,12,163,0.9), rgba(162,89,247,0.4));
    top: -160px;
    left: -160px;
}
body::after {
    background: radial-gradient(circle at 70% 70%, rgba(162,89,247,0.9), rgba(58,12,163,0.4));
    bottom: -180px;
    right: -180px;
}

.container {
    width: 800px;
    height: 500px;
    display: flex;
    flex-direction: row;
    position: relative;
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    z-index: 1;
}

.container-form {
    width: 100%;
    overflow: hidden;
}

.container-form form {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s ease-in;
    padding: 0 12px;
}

.container-form h2 {
    font-size: 30px;
    margin-bottom: 10px;
    color: #3a0ca3;
    font-weight: 900;
}

.container-form span {
    font-size: 12px;
    margin-bottom: 18px;
    color: #6b6b6b;
}

.container-input {
    width: 300px;
    height: 44px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 14px;
    background-color: #EEE;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.container-input:focus-within {
    background-color: #F3EEFF;
    border-color: #a259f7;
    box-shadow: 0 0 0 4px rgba(162,89,247,0.18);
}

.container-input i {
    color: #a259f7;
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}

.container-input:focus-within i {
    transform: scale(1.06);
}

.container-input input {
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    background-color: transparent;
    font-size: 1rem;
    color: #231942;
}

.container-input input::placeholder {
    color: #8c86a3;
}

/* Botón mostrar/ocultar contraseña */
.toggle-password {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 28px;
    border: none;
    background: transparent;
    color: #7b61d1;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.toggle-password:hover { background: rgba(162,89,247,0.12); }
.toggle-password:active { transform: scale(0.96); }

.button {
    width: 190px;
    height: 46px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 12px;
    background: linear-gradient(90deg, #a259f7 60%, #3a0ca3 100%);
    color: white;
    font-weight: 800;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 22px rgba(162,89,247,0.28);
    transition: background 0.2s, transform 0.18s, box-shadow 0.2s ease, filter 0.2s;
}

.button:hover {
    background: linear-gradient(90deg, #3a0ca3 60%, #a259f7 100%);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 12px 30px rgba(162,89,247,0.35);
}

.button:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

.button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    filter: saturate(0.7);
}

/* Animaciones */
.sign-up { transform: translateX(-100%); }
.container.toggle .sign-in { transform: translateX(100%); }
.container.toggle .sign-up { transform: translateX(0); }

/* Pequeño shake al invalidar */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.form-invalid { animation: shake 0.35s ease; }

/* Contenedor de bienvenida */
.conatiner-welcome {
    position: absolute;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #3a0ca3 60%, #a259f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    overflow: hidden;
    border-radius: 50% 0 0 50%;
    transition: border-radius 0.6s ease-in-out, transform 0.6s;
}

.container.toggle .conatiner-welcome {
    transform: translateX(0);
    border-radius: 0 50% 50% 0;
    background: linear-gradient(135deg, #a259f7 60%, #3a0ca3 100%);
}

.conatiner-welcome .welcome {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 48px;
    color: white;
    text-align: center;
}

.welcome-sign-in { transform: translateX(100%); }

.conatiner-welcome h3 {
    font-size: 38px;
    font-weight: 900;
    text-shadow: 0 4px 18px rgba(0,0,0,0.15);
}

.conatiner-welcome p { font-size: 14px; opacity: 0.95; }

.conatiner-welcome .button {
    border: 2px solid white;
    background-color: transparent;
    box-shadow: none;
}

.container.toggle .welcome-sign-in { transform: translateX(0); }
.container.toggle .welcome-sign-up { transform: translateX(-100%); }

/* Accesibilidad de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Media queries para responsividad */
@media (max-width: 900px) {
    .container { width: 98vw; min-width: unset; height: auto; }
    .container-input { width: 90vw; max-width: 360px; }
}

@media (max-width: 600px) {
    .container {
        flex-direction: column;
        min-height: 100vh;
    }
    .conatiner-welcome { display: none; }
    .container-form { width: 100vw; }
} 