@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&display=swap');

body {
    background: #0f0c13;
    display: flex; justify-content: center; align-items: center;
    height: 100vh; margin: 0; font-family: 'Montserrat', sans-serif;
}

.container {
    background: #1a0b2e;
    border-radius: 20px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.6), 0 10px 10px rgba(0,0,0,0.6);
    position: relative; overflow: hidden;
    width: 900px; max-width: 95%; min-height: 550px;
    display: flex; border: 1px solid #4a2c66;
}

.form-container {
    position: absolute; top: 0; height: 100%; transition: all 0.6s ease-in-out;
    width: 50%; display: flex; align-items: center; justify-content: center;
}

form {
    background: #1a0b2e;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 0 50px; height: 100%; width: 100%; text-align: center;
}

/* Animações Desktop */
.sign-in-container { left: 0; z-index: 2; }
.sign-up-container { left: 0; opacity: 0; z-index: 1; }
.container.right-panel-active .sign-in-container { transform: translateX(100%); }
.container.right-panel-active .sign-up-container { 
    transform: translateX(100%); opacity: 1; z-index: 5; animation: show 0.6s;
}
@keyframes show { 0%, 49.99% { opacity: 0; z-index: 1; } 50%, 100% { opacity: 1; z-index: 5; } }

/* Painel Lateral Desktop */
.overlay-container {
    position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
    overflow: hidden; transition: transform 0.6s ease-in-out; z-index: 100;
}
.container.right-panel-active .overlay-container { transform: translateX(-100%); }

.overlay {
    background: linear-gradient(to right, #240b36, #000000);
    color: #ffffff; position: relative; left: -100%; height: 100%; width: 200%;
    transform: translateX(0); transition: transform 0.6s ease-in-out;
}
.container.right-panel-active .overlay { transform: translateX(50%); }

.overlay-panel {
    position: absolute; display: flex; align-items: center; justify-content: center;
    flex-direction: column; text-align: center; top: 0; height: 100%; width: 50%;
    transform: translateX(0); transition: transform 0.6s ease-in-out; padding: 0 40px;
}
.overlay-left { transform: translateX(-20%); }
.container.right-panel-active .overlay-left { transform: translateX(0); }
.overlay-right { right: 0; transform: translateX(0); }
.container.right-panel-active .overlay-right { transform: translateX(20%); }

/* Estilos Gerais */
h1 { font-weight: bold; margin: 0 0 15px; color: #ffffff !important; }
p { font-size: 14px; margin: 20px 0 30px; color: #e0e0e0; }
span { font-size: 12px; color: #bbb; margin-bottom: 10px; display: inline-block; }
a { color: #fff; text-decoration: none; margin: 15px 0; border-bottom: 1px dotted #fff; font-size: 13px; }

input {
    background-color: #150a21; border: 1px solid #4a2c66;
    padding: 12px 15px; margin: 8px 0; width: 100%; border-radius: 8px; outline: none; color: #fff;
    box-sizing: border-box;
}
input:focus { border-color: #9b59b6; box-shadow: 0 0 5px rgba(155, 89, 182, 0.5); }

button {
    border-radius: 25px; border: 1px solid #9b59b6;
    background-color: #6a0572; color: #ffffff;
    font-size: 12px; font-weight: bold; padding: 12px 45px;
    letter-spacing: 1px; text-transform: uppercase; transition: transform 80ms ease-in;
    cursor: pointer; margin-top: 15px;
}
button:active { transform: scale(0.95); }
button.ghost { background-color: transparent; border-color: #ffffff; }
.social-container a { border-color: #fff; color: #fff; }

/* Link de troca MOBILE (Escondido no PC) */
.mobile-toggle { display: none; margin-top: 25px; font-size: 14px; color: #bbb; }
.mobile-toggle a { color: #9b59b6; font-weight: bold; border-bottom: none; cursor: pointer; }

/* =========================================
   📱 MODO CELULAR (RESPONSIVO)
   ========================================= */
@media (max-width: 768px) {
    /* Remove bordas e ocupa tela toda */
    .container {
        width: 100%; height: 100vh; min-height: 100%;
        border-radius: 0; border: none; box-shadow: none;
    }

    /* Esconde o painel lateral deslizante */
    .overlay-container { display: none; }

    /* Formulários ocupam 100% da largura */
    .form-container { width: 100%; height: 100%; position: absolute; padding: 0; }
    
    /* Ajuste de inputs para toque */
    form { padding: 0 30px; }
    input { padding: 18px 15px; font-size: 16px; } /* Inputs maiores */
    button { padding: 15px 45px; font-size: 14px; width: 100%; } /* Botão grande */

    /* Mostra o link de troca de tela (Já que o painel sumiu) */
    .mobile-toggle { display: block; }

    /* Ajuste de visibilidade */
    .sign-up-container { opacity: 0; pointer-events: none; z-index: 1; }
    .sign-in-container { opacity: 1; pointer-events: all; z-index: 2; }

    /* Quando clicar em cadastrar, inverte visibilidade manualmente */
    .container.right-panel-active .sign-in-container { opacity: 0; pointer-events: none; }
    .container.right-panel-active .sign-up-container { 
        opacity: 1; pointer-events: all; transform: none; animation: none; 
    }
}