:root {
    --primary-color: #25D366;
    --secondary-color: #075E54;
    --accent-color: #128C7E;
    --dark-bg: #0B141A;
    --light-bg: #f0f2f5;
}

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

html {
    height: 100%;
    overflow-y: scroll; /* Garantir que a barra de rolagem esteja sempre presente */
}

body {
    background: linear-gradient(135deg, #2b1055, #7597de);
    min-height: 100vh;
    overflow-y: auto; /* Permitir scroll vertical */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 40px 0; /* Aumentei o padding para dar mais espaço */
}

.background {
    position: fixed; /* Fixado em vez de absolute para evitar problemas com scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden; /* Prevenir que os círculos causem scroll horizontal */
}

.circle {
    position: absolute;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    animation: float 6s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.login-container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    width: 90%;
    max-width: 450px;
    padding: 2rem;
    transition: transform 0.3s ease;
    margin: 2rem auto; /* Centralizado com auto */
    overflow-y: auto; /* Permitir rolagem dentro do container se necessário */
    max-height: 90vh; /* Evitar que o container ultrapasse a altura da viewport */
}

.login-container:hover {
    transform: translateY(-5px);
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

.brand-logo i {
    color: white;
    font-size: 2.5rem;
}

/* Corrigido o estilo dos inputs do formulário */
.input-group {
    margin-bottom: 1rem;
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.input-group-text {
    background-color: #f8f9fa;
    border: none;
    padding: 12px 15px;
    display: flex;
    align-items: center;
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.form-control {
    border: none;
    padding: 12px 15px;
    width: 100%;
    background-color: transparent;
}

.form-control:focus {
    outline: none;
    box-shadow: none;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.btn-whatsapp {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    cursor: pointer;
    border: none;
    margin-bottom: 1rem;
}

.btn-whatsapp:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-success {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline-success:hover {
    background: var(--primary-color);
    color: white;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #DCDCDC;
    border-radius: 50px;
    text-decoration: none;
    color: var(--dark-bg);
    transition: all 0.3s ease;
    margin-top: 10px; /* Espaço adicional */
}

.app-badge:hover {
    background: #CCCCCC;
    transform: translateY(-2px);
}

.app-download {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.error-alert {
    animation: shake 0.4s ease;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Separador com texto */
hr {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 0;
}

.text-muted {
    color: #6c757d;
}

.small {
    font-size: 0.875rem;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.fw-medium {
    font-weight: 500;
}

/* Media queries para diferentes tamanhos de tela */
@media (max-height: 700px) {
    body {
        align-items: flex-start;
        padding: 20px 0;
    }
    
    .login-container {
        margin: 0 auto 20px;
        max-height: calc(100vh - 40px);
    }
}

@media (max-width: 576px) {
    body {
        align-items: flex-start; /* Alinhar ao topo em telas pequenas */
        padding: 20px 0; /* Espaço no topo para telas pequenas */
    }
    
    .login-container {
        width: 95%;
        padding: 1.5rem;
        max-width: none;
        margin: 0 auto 20px;
        border-radius: 15px;
    }
    
    .brand-logo {
        width: 60px;
        height: 60px;
    }
    
    .brand-logo i {
        font-size: 2rem;
    }
    
    .app-download {
        margin-top: 1.5rem;
        padding-top: 1.2rem;
    }
    
    /* Ajuste para inputs em telas pequenas */
    .input-group-text, .form-control {
        padding: 10px;
    }
    
    .btn-whatsapp, .btn-outline-success {
        padding: 10px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .login-container {
        width: 85%;
        max-width: 400px;
        margin: 1rem auto;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .login-container {
        width: 70%;
        max-width: 450px;
    }
}

@media (min-width: 993px) {
    .login-container {
        width: 450px;
    }
    
    .login-container:hover {
        transform: translateY(-8px);
    }
}