.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("/static/img/background-hero.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 20px;
    position: relative;
    z-index: 1;
    margin-top: 0;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: -1;
}

/* Estilo da lua com banana */
.auth-page::after {
    content: '';
    position: fixed;
    top: 20px;
    left: 20px;
    width: 200px;
    height: 200px;
    background-image: url("/static/img/banana-lua.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
    z-index: 0;
    opacity: 0.95;
    animation: cintilacao 3s ease-in-out infinite;
    mix-blend-mode: screen;
    filter: 
        drop-shadow(0 0 10px rgba(255, 255, 200, 0.8))
        drop-shadow(0 0 20px rgba(255, 240, 150, 0.6))
        drop-shadow(0 0 30px rgba(255, 230, 100, 0.4))
        brightness(1.2) saturate(1.2);
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 0 15px rgba(255, 255, 200, 0.7)) 
                drop-shadow(0 0 30px rgba(255, 240, 150, 0.5))
                brightness(1.1) contrast(1.1);
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 220, 0.8)) 
                drop-shadow(0 0 40px rgba(255, 245, 170, 0.6))
                brightness(1.2) contrast(1.2);
    }
}

.auth-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--cor-principal-turquesa), var(--cor-secundaria-amarelo));
    border-radius: 15px 15px 0 0;
    z-index: 2;
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    height: 80px;
    margin-bottom: 10px;
}

.auth-logo h1 {
    color: var(--cor-principal-turquesa);
    margin: 10px 0 5px;
    font-size: 2.2rem;
    font-family: 'Fredoka', sans-serif;
}

.tm-symbol {
    font-size: 0.35em;
    color: #000;
    font-weight: normal;
    vertical-align: super;
    margin-left: 1px;
    opacity: 0.7;
    font-family: Arial, sans-serif;
}

.auth-container h2 {
    color: var(--cor-texto-cinza);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-family: 'Fredoka', sans-serif;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--cor-texto-cinza);
    font-size: 0.95rem;
    line-height: 1.2;
    height: auto;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input {
    width: 100%;
    padding: 0 45px 0 40px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fafafa;
    box-sizing: border-box;
    height: 46px;
    line-height: 1.2;
    margin: 0;
}

.form-group input:focus {
    border-color: var(--cor-principal-turquesa);
    box-shadow: 0 0 0 4px rgba(64, 224, 208, 0.15), 0 4px 12px rgba(64, 224, 208, 0.1);
    outline: none;
    background-color: white;
    transform: translateY(-1px);
}

.form-group input:hover {
    border-color: #b8e6e1;
    background-color: #fff;
}

/* 1. Resetar o seletor genérico para não afetar o ícone do olho erroneamente */
.form-group > i {
    position: absolute;
    left: 15px;
    /* Usa top para garantir alinhamento mesmo quando há texto abaixo do input */
    /* Cálculo: label margin-bottom (12px) + label altura (~19px) + metade do input (23px) = 54px */
    top: 54px;
    transform: translateY(-50%); /* Centraliza em relação ao próprio eixo */
    color: #666;
    transition: color 0.3s ease;
    width: 20px; /* Padronizei com o tamanho do olho para simetria */
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box;
}

/* 2. Ajustar o container do olho - usa top para funcionar mesmo com texto abaixo */
.toggle-password {
    position: absolute;
    right: 15px;
    /* Usa top em vez de bottom para garantir alinhamento mesmo com texto abaixo */
    /* Cálculo: label margin-bottom (12px) + label altura (~19px) + metade do input (23px) = 54px */
    top: 54px;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 2;
    transition: color 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box;
}

/* 3. Limpar o ícone interno do olho */
.toggle-password i {
    position: static !important;
    transform: none !important;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.toggle-password:hover {
    color: var(--cor-principal-turquesa);
}

.auth-button {
    background: var(--cor-principal-turquesa);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    position: relative;
}

.auth-button:disabled,
.auth-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.auth-button.loading i.fa-spinner {
    margin-right: 8px;
}

.auth-button.loading i.fa-spinner,
.auth-button i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-button i {
    margin-left: 10px;
    font-size: 1.1rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-button:hover {
    background: #20c9b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(64, 224, 208, 0.25);
}

.auth-button:hover i {
    transform: translateX(2px);
}

/* Ícone específico do botão "Criar Conta" - movimento menor */
.auth-button:hover .fa-user-plus {
    transform: translateX(1.5px);
}

/* Ícone do Google - movimento menor */
.auth-button:hover .fa-google {
    transform: translateX(1.5px);
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(64, 224, 208, 0.2);
}

.switch-auth {
    margin-top: 25px;
    text-align: center;
    font-size: 0.95rem;
    color: #666;
}

.switch-auth a {
    color: var(--cor-principal-turquesa);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    margin-bottom: 28px;
}

.switch-auth a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--cor-principal-turquesa);
    transition: width 0.3s ease;
}

.switch-auth a:hover::after {
    width: 100%;
}

.error-message {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid #d32f2f;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-right: 10px;
    font-size: 1.1rem;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cintilacao {
    0% { 
        transform: scale(1) rotate(0deg);
        filter: 
            drop-shadow(0 0 10px rgba(255, 255, 200, 0.8))
            drop-shadow(0 0 20px rgba(255, 240, 150, 0.6))
            drop-shadow(0 0 30px rgba(255, 230, 100, 0.4))
            brightness(1.2) saturate(1.2);
    }
    50% { 
        transform: scale(1.05) rotate(1deg);
        filter: 
            drop-shadow(0 0 15px rgba(255, 255, 200, 0.9))
            drop-shadow(0 0 25px rgba(255, 240, 150, 0.7))
            drop-shadow(0 0 35px rgba(255, 230, 100, 0.5))
            brightness(1.3) saturate(1.3);
    }
    100% { 
        transform: scale(1) rotate(0deg);
        filter: 
            drop-shadow(0 0 10px rgba(255, 255, 200, 0.8))
            drop-shadow(0 0 20px rgba(255, 240, 150, 0.6))
            drop-shadow(0 0 30px rgba(255, 230, 100, 0.4))
            brightness(1.2) saturate(1.2);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 25px;
    }

    .auth-logo img {
        height: 70px;
    }

    .auth-logo h1 {
        font-size: 2rem;
    }

    .auth-container h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 15px;
    }

    .auth-container {
        padding: 25px 20px;
    }

    .auth-logo img {
        height: 60px;
    }

    .auth-logo h1 {
        font-size: 1.8rem;
    }

    .auth-container h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 14px 15px 14px 45px;
        font-size: 16px;
        min-height: 48px;
    }

    .form-group i {
        bottom: 15px;
    }
    
    .auth-button {
        min-height: 48px;
        padding: 16px 25px;
    }
}