* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url("IMG_7775.jpeg");
    background-size: cover;
    background-position: center;
    font-family: 'Montserrat', sans-serif;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    width: 820px;
    height: 520px;
    display: flex;
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

/* ===== FORMULARIOS ===== */
.container-form {
    width: 100%;
    overflow: hidden;
}

.container-form form {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    transition: transform 0.5s ease-in-out;
}

/* Logo dentro del form */
.form-logo {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.form-logo span {
    color: #FFD700;
}

.container-form h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.container-form span {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

/* Inputs */
.container-input {
    width: 300px;
    height: 44px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background-color: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.container-input:focus-within {
    border-color: #1a1a1a;
    background-color: #fff;
}

.container-input svg {
    color: #888;
    flex-shrink: 0;
}

.container-input input {
    border: none;
    outline: none;
    width: 100%;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
}

.container-input input::placeholder {
    color: #aaa;
}

/* Link olvidé contraseña */
.forgot-link {
    color: #555;
    font-size: 12px;
    margin-bottom: 16px;
    margin-top: 2px;
    text-decoration: none;
    align-self: flex-start;
    margin-left: calc(50% - 150px);
}

.forgot-link:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* Mensajes de error */
.form-error {
    width: 300px;
    font-size: 12px;
    color: #e00;
    background: #fff5f5;
    border: 1px solid #fcc;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 10px;
    text-align: center;
}

/* Botones */
.button {
    width: 200px;
    height: 44px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #1a1a1a;
    color: #fff;
    transition: background 0.2s;
    margin-top: 6px;
}

.button:hover {
    background-color: #333;
}

.button-outline {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.button-outline:hover {
    background-color: rgba(255,255,255,0.15);
}

/* ===== ANIMACIÓN SLIDING ===== */
.sign-up {
    transform: translateX(-100%);
}

.container.toggle .sign-in {
    transform: translateX(100%);
}

.container.toggle .sign-up {
    transform: translateX(0);
}

/* ===== PANEL WELCOME ===== */
.container-welcome {
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    transition: transform 0.5s ease-in-out;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
}

.container.toggle .container-welcome {
    transform: translateX(-100%);
    border-radius: 12px 0 0 12px;
}

.container-welcome .welcome {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 40px;
    color: #fff;
    text-align: center;
    transition: transform 0.5s ease-in-out;
}

.welcome-sign-in {
    transform: translateX(120%);
}

.container.toggle .welcome-sign-in {
    transform: translateX(0);
}

.container.toggle .welcome-sign-up {
    transform: translateX(-120%);
}

.container-welcome h3 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 2px;
}

.container-welcome p {
    font-size: 13px;
    color: #ccc;
    line-height: 1.6;
}

/* Detalle dorado en el panel */
.container-welcome::before {
    content: 'VECCHIA■SCUOLA';
    position: absolute;
    bottom: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #FFD700;
    opacity: 0.6;
}

/* ===== OVERLAY DE CARGA ===== */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#loading-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.shoe-loader {
    width: 80px;
    filter: invert(1);
    animation: bounce 0.6s infinite alternate ease-in-out;
}

@keyframes bounce {
    from { transform: translateY(0) rotate(-5deg); }
    to   { transform: translateY(-20px) rotate(5deg); }
}

#loading-overlay p {
    color: #FFD700;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .container {
        width: 95vw;
        height: auto;
        flex-direction: column;
    }

    .container-welcome {
        position: relative;
        width: 100%;
        height: 160px;
        border-radius: 0 0 12px 12px;
        right: auto;
    }

    .container.toggle .container-welcome {
        transform: none;
        border-radius: 0 0 12px 12px;
    }

    .container-form form {
        padding: 30px 20px;
    }

    .container-input,
    .button {
        width: 100%;
        max-width: 300px;
    }

    .sign-up,
    .container.toggle .sign-in {
        transform: none;
        display: none;
    }

    .container.toggle .sign-up {
        display: flex;
    }

    .sign-in {
        display: flex;
    }
}
