@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

input[type="password"]::-webkit-password-toggle-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
} 

:root {
    --bg-header: #f1f0ec; 
    --bg-main:#e5e2da; 
    --verde-vitta: #49582c; 
    --vermelho-vitta: #8d3229;
    --vermelho-hover:  #690c03;
    --primary-green: #8B9A5B;
    --light-vitta: #ffeccc; 
    --white: #FFFFFF;

    --font-title: 'Belleza', serif;
    --font-body: 'Questrial', sans-serif;

    --container-max-width: 1200px;
    --header-height: 80px;
}

body{
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
}

.back-button {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 1000;
}

.back-button a {
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    color: #5C8374;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px; 
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(92, 131, 116, 0.2);
}

.back-button a:hover {
    background-color: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 131, 116, 0.25);
}

.container{
    background-color: var(--bg-header);
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    width: 900px;
    max-width: 100%;
    min-height: 600px;
}

.container span{
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
    color: #666;
    line-height: 1.4;
}

.container a{
    color: var(--primary-green);
    font-size: 13px;
    text-decoration: none;
    margin: 20px 0 15px;
    transition: color 0.3s ease;
}

.container a:hover {
    color: var(--verde-vitta);
}

.container button{
    background-color: var(--primary-green);
    color: #fff;
    font-size: 13px;
    padding: 12px 50px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.container button:hover {
    background-color: var(--verde-vitta);
}

.container button.hidden{
    background-color: transparent;
    border: 2px solid #fff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.container button.hidden::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.container button.hidden:hover::before {
    left: 100%;
}

.container button.hidden:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.container form{
    background-color: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 60px 50px 40px;
    height: 100%;
}

.container form h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--verde-vitta);
    font-weight: 600;
}

.container input{
    background-color: #f8f8f8;
    border: 2px solid transparent;
    margin: 10px 0;
    padding: 14px 18px;
    font-size: 14px;
    border-radius: 12px;
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
}

.container input:focus {
    background-color: var(--bg-main);
    border-color: #5C8374;
    box-shadow: 0 0 0 3px rgba(92, 131, 116, 0.1);
}

.password-field {
    position: relative;
    width: 100%;
    margin: 10px 0;
}

.password-field input {
    margin: 0;
    padding-right: 50px; 
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    font-size: 16px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #5C8374;
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in{
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in{
    transform: translateX(100%);
}

.sign-up{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.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;
    }
}

.toggle-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    border-radius: 50px 0 0 50px;
    z-index: 10;
}

.container.active .toggle-container{
    transform: translateX(-100%);
    border-radius: 0 50px 50px 0;
}

.toggle{
    height: 100%;
    color: #fff;
    position: relative;
    left: -100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;

    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.5)), url('../images/fundo-conta.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.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;
}

.overlay-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.overlay-content p {
    font-size: 14px;
    line-height: 20px;
}

.toggle-left{
    transform: translateX(-200%);
}

.container.active .toggle-left{
    transform: translateX(0);
}

.toggle-right{
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right{
    transform: translateX(200%);
}

.mobile-toggle {
    display: none; 
}

@media (max-width: 768px) {
    body {
        padding: 0.5rem;
        background: linear-gradient(135deg, #f0ebe3 0%, #e8ddd4 100%);
    }

    .toggle-container {
        display: none; 
    }

    .container {
        width: 100%;
        max-width: 380px; 
        min-height: auto;
        margin: 0 auto;
        border-radius: 25px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        background: #fff;
        position: relative;
        overflow: visible; 
    }
    
    .form-container {
        width: 100%;
        position: relative;
        height: auto;
        padding: 0;
    }

    .container form {
        padding: 70px 30px 40px; 
        min-height: auto;
    }

    .container form h1 {
        font-size: 20px;
        margin-bottom: 8px;
        color: #2c3e50;
        font-weight: 700;
        text-align: center;
        line-height: 1.3;
    }

    .container span {
        font-size: 12px;
        margin-bottom: 30px;
        color: #7f8c8d;
        text-align: center;
        line-height: 1.4;
        padding: 0 10px;
    }

    .container input {
        background-color: #f8f9fa;
        border: 1.5px solid #e9ecef;
        padding: 15px 18px;
        font-size: 14px;
        margin: 8px 0;
        border-radius: 15px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    .container input:focus {
        background-color: #fff;
        border-color: #5C8374;
        box-shadow: 0 0 0 3px rgba(92, 131, 116, 0.08), 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-1px);
    }

    .password-field {
        margin: 8px 0;
    }

    .password-field input {
        padding-right: 50px;
    }

    .password-toggle {
        right: 18px;
        font-size: 15px;
        color: #95a5a6;
    }

    .password-toggle:hover {
        color: #5C8374;
    }

    .container button {
        background: linear-gradient(135deg, #5C8374 0%, #4a6b5d 100%);
        padding: 16px 40px;
        font-size: 13px;
        margin-top: 25px;
        border-radius: 15px;
        font-weight: 700;
        letter-spacing: 0.8px;
        box-shadow: 0 6px 20px rgba(92, 131, 116, 0.25);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 100%;
    }

    .container button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(92, 131, 116, 0.35);
    }

    .container button:active {
        transform: translateY(0);
    }

    .container.active .sign-in,
    .container.active .sign-up,
    .sign-in,
    .sign-up {
        transform: none;
        opacity: 1;
        z-index: 1;
        left: 0;
    }

    .sign-up {
        display: none;
    }

    .container.active .sign-up {
        display: flex;
    }
    
    .container.active .sign-in {
        display: none;
    }

    .mobile-toggle {
        display: block;
        margin-top: 20px;
        color: #5C8374;
        font-weight: 600;
        font-size: 13px;
        text-align: center;
        transition: color 0.3s ease;
    }

    .mobile-toggle:hover {
        color: #4a6b5d;
    }

    .back-button {
        position: absolute;
        top: 15px; 
        left: 15px;
        z-index: 1001;
    }

    .back-button a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        background: rgba(92, 131, 116, 0.1);
        border-radius: 10px;
        color: #5C8374;
        font-size: 14px;
        text-decoration: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid rgba(92, 131, 116, 0.2);
    }

    .back-button a:hover {
        background: #5C8374;
        color: white;
        transform: translateY(-1px) scale(1.05);
        box-shadow: 0 4px 12px rgba(92, 131, 116, 0.25);
    }

    .back-button a span {
        display: none;
    }
}