/* --- 1. Importar a Fonte --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

/* --- 2. Paleta de Cores (Acolhimento Natural) --- */
:root {
    --fonte-principal: 'Nunito', sans-serif;
    
    /* Cores da Marca */
    --verde-salvia: #B2C2A0;      
    --bege-areia: #F5F1E8;        
    --terracota-suave: #D98C64;   
    --texto-escuro: #4F4A45;      
    --branco: #FFFFFF;
    --cinza-claro: #E0E0E0; 
    --cinza-texto: #666666; 
}

/* --- 3. Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- 4. Corpo (Geral) --- */
body {
    font-family: var(--fonte-principal);
    background-color: var(--bege-areia); 
    color: var(--texto-escuro);
    line-height: 1.6;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100vh;
}

/* Ajuste para a página do Chat (Remove centralização e padding) */
body.chat-page {
    display: block; 
    padding: 0;     
    overflow: hidden; 
}

/* --- 5. Estilos de Login (Mantidos iguais) --- */
.auth-container {
    width: 90%; max-width: 400px; padding: 40px 30px; 
    background-color: var(--branco); border-radius: 12px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.05); text-align: center; 
}
.logo {
    display: block; width: 180px; height: 180px; 
    border-radius: 50%; object-fit: cover; margin: 0 auto 20px auto;
}
.auth-container h1 { font-size: 24px; margin-bottom: 8px; color: var(--texto-escuro); }
.auth-container .slogan { font-size: 15px; color: var(--cinza-texto); margin-bottom: 30px; }
.auth-container input {
    width: 100%; padding: 14px; margin-bottom: 15px;
    border: 1px solid var(--cinza-claro); border-radius: 8px; 
    font-family: var(--fonte-principal); font-size: 16px; outline: none;
}
.auth-container input:focus { border-color: var(--terracota-suave); }
.auth-container button {
    width: 100%; padding: 14px; border: none; border-radius: 8px;
    background-color: #5A8A8A; color: var(--branco); font-size: 17px; font-weight: 600; 
    cursor: pointer; margin-top: 10px; 
}
#botao-google { background-color: var(--verde-salvia); margin-bottom: 25px; }
.separator { display: flex; align-items: center; color: var(--cinza-texto); margin: 30px 0; font-size: 14px; }
.separator::before, .separator::after { content: ''; flex: 1; border-bottom: 1px solid var(--cinza-claro); margin: 0 10px; }
.link-secundario { display: block; margin-top: 25px; color: var(--terracota-suave); text-decoration: none; font-weight: 600; }

/* --- 7. ESTILOS DO CHAT (Visual Gemini Claro) --- */

.chat-container {
    display: flex;
    flex-direction: column; 
    height: 100vh; 
    width: 100%;
    background-color: var(--bege-areia); /* Fundo geral claro */
}

/* Cabeçalho Minimalista */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px; 
    background-color: var(--bege-areia); /* Mesmo fundo do corpo, estilo limpo */
    /* Sem borda ou com borda muito sutil */
}
.chat-header h2 {
    color: var(--terracota-suave); 
    font-size: 22px; 
    font-weight: 800;
}
.header-right { display: flex; align-items: center; gap: 10px; }

/* Botões "Pílula" do Header */
.chat-header button {
    background-color: rgba(255,255,255,0.6); 
    border: 1px solid transparent;
    color: var(--texto-escuro); 
    padding: 8px 16px; 
    border-radius: 20px; /* Pílula */
    font-family: var(--fonte-principal);
    font-weight: 600; font-size: 13px;
    cursor: pointer; transition: all 0.2s;
}
.chat-header button:hover { background-color: var(--branco); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

#selo-premium {
    background-color: var(--terracota-suave); color: var(--branco);
    padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
    margin-right: 10px;
}

#botao-upgrade {
    background-color: var(--verde-salvia); color: var(--branco);
}
#botao-upgrade:hover { background-color: #9eb08b; }

/* Área de Mensagens */
#historico-chat {
    flex-grow: 1; 
    padding: 20px 15%; /* Margem lateral grande para centralizar o texto como no Gemini */
    overflow-y: auto; 
    display: flex; flex-direction: column; gap: 20px;
}
/* Em telas pequenas, diminui a margem lateral */
@media (max-width: 768px) {
    #historico-chat { padding: 20px 5%; }
}

/* Barra de rolagem discreta */
#historico-chat::-webkit-scrollbar { width: 6px; }
#historico-chat::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.1); border-radius: 10px; }

/* Balões */
.msg-bubble {
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 85%;
    line-height: 1.6;
    font-size: 16px;
}
.msg-bubble.usuario {
    background-color: #E8E0D5; /* Um bege um pouco mais escuro/quente */
    color: var(--texto-escuro);
    align-self: flex-end; 
    border-bottom-right-radius: 4px;
}
.msg-bubble.ia {
    background-color: var(--branco); 
    color: var(--texto-escuro);
    align-self: flex-start; 
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

/* --- Área de Input (A CÁPSULA FLUTUANTE) --- */
#form-mensagem {
    background-color: var(--bege-areia); /* Fundo transparente/igual ao corpo */
    padding: 20px 15%; /* Mesma margem do chat */
    padding-bottom: 30px;
}
@media (max-width: 768px) {
    #form-mensagem { padding: 20px 5%; padding-bottom: 20px; }
}

/* O Container "Cápsula" */
.input-wrapper {
    background-color: var(--branco);
    border-radius: 30px; /* Bem arredondado */
    padding: 8px 15px 8px 25px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Sombra suave para flutuar */
    border: 1px solid transparent;
    transition: border 0.3s, box-shadow 0.3s;
}
.input-wrapper:focus-within {
    border-color: var(--verde-salvia);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* O Textarea Invisível dentro da cápsula */
#form-mensagem textarea {
    flex-grow: 1; border: none; background: transparent;
    resize: none; height: 24px; /* Altura de uma linha */
    max-height: 150px; /* Cresce até aqui */
    font-family: var(--fonte-principal); font-size: 16px; color: var(--texto-escuro);
    outline: none; padding: 0; margin: 10px 0;
}
#form-mensagem textarea::placeholder { color: #aaa; }

/* Botão Enviar (Ícone) */
#botao-enviar, #botao-parar {
    background: var(--terracota-suave); 
    color: var(--branco);
    width: 40px; height: 40px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
    font-size: 16px; transition: transform 0.2s;
}
#botao-enviar:hover { transform: scale(1.05); background-color: #c97b5a; }
#botao-enviar:disabled { background-color: #ccc; cursor: default; transform: none; }

/* Modal (Substitua esta seção inteira no seu style.css) */
.modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.5); 
    display: flex; /* Você controla isso via JS, está correto */
    justify-content: center; align-items: center; 
    z-index: 2000; 
    
    /* Animação suave de entrada */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content { 
    background: var(--branco); 
    padding: 30px; 
    border-radius: 15px; /* Cantos arredondados do projeto */
    width: 90%; max-width: 400px; 
    text-align: center; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    
    /* Animação de "zoom" leve */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* Regras para quando o JS exibir o modal (display: flex) */
.modal-overlay[style*="display: flex"] {
    opacity: 1;
    visibility: visible;
}
.modal-overlay[style*="display: flex"] .modal-content {
    transform: scale(1);
}

/* --- ESTILOS DO CONTEÚDO DO MODAL (NOVO) --- */
.modal-content h3 {
    font-size: 22px;
    color: var(--texto-escuro);
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 16px;
    color: var(--cinza-texto);
    line-height: 1.6;
    margin-bottom: 25px; /* Mais espaço antes dos botões */
}

.modal-actions { 
    display: flex; 
    justify-content: center; 
    gap: 15px; /* Espaço entre os botões */
    margin-top: 20px; 
}

/* --- ESTILOS DOS BOTÕES DO MODAL (NOVO) --- */

/* Estilo base para AMBOS os botões */
.modal-actions button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px; /* Formato pílula, como outros botões */
    font-family: var(--fonte-principal);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Estilo do botão Confirmar (Primário) */
#modal-confirmar {
    background-color: var(--terracota-suave); /* Cor principal de ação */
    color: var(--branco);
}

#modal-confirmar:hover {
    background-color: #c97b5a; /* Cor mais escura (hover do seu CTA) */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(217, 140, 100, 0.2);
}

/* Estilo do botão Cancelar (Secundário) */
.botao-secundario {
    background-color: var(--cinza-claro); /* Cor neutra da paleta */
    color: var(--texto-escuro);
}

.botao-secundario:hover {
    background-color: #d1d1d1; /* Cinza um pouco mais escuro */
}

/* --- 10. ESTILOS DA LANDING PAGE (index.html) --- */

/* Reset específico para a landing page (diferente do body.chat-page) */
body.landing-page {
    display: block; /* Tira o flex de centralização */
    padding: 0; 
    overflow-y: auto; /* Permite rolar a página */
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: center; /* Centraliza o conteúdo da navbar */
    align-items: center;
    padding: 20px 40px;
    width: 100%;
    background-color: var(--bege-areia);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky; /* Fica fixa no topo ao rolar */
    top: 0;
    z-index: 500;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Limita a largura do conteúdo */
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 22px;
    color: var(--terracota-suave);
    text-decoration: none;
}
.logo-pequeno {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.btn-nav {
    text-decoration: none;
    color: var(--texto-escuro);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 22px;
    border-radius: 20px;
    background-color: var(--branco);
    border: 1px solid var(--cinza-claro-borda);
    transition: all 0.3s;
}
.btn-nav:hover {
    background-color: var(--branco);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* --- HERO SECTION (Conteúdo Principal) --- */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 20px 120px 20px; /* Espaçamento grande */
    background-color: var(--bege-areia);
}
.hero-content {
    max-width: 750px; /* Limita a largura do texto */
    animation: fadeIn 1s ease-out; 
}
.headline {
    font-size: 52px;
    line-height: 1.2;
    color: var(--texto-escuro);
    margin-bottom: 20px;
    font-weight: 700; /* Mais peso no título */
}
.headline .destaque {
    color: var(--terracota-suave);
}
.subheadline {
    font-size: 20px;
    color: var(--cinza-texto-secundario);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.btn-cta.principal {
    background-color: var(--terracota-suave);
    color: var(--branco);
    text-decoration: none;
    padding: 18px 40px;
    border-radius: 50px; /* Botão bem redondo */
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 140, 100, 0.3); /* Sombra colorida */
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-cta.principal:hover {
    transform: translateY(-3px); 
    box-shadow: 0 6px 20px rgba(217, 140, 100, 0.4);
    background-color: #c97b5a;
}
.cta-subtext {
    font-size: 14px;
    color: var(--cinza-texto-secundario);
}

/* --- FEATURES SECTION --- */
.features-section {
    padding: 80px 20px;
    background-color: var(--branco); /* Fundo branco para destacar */
    text-align: center;
}
.features-section h2 {
    font-size: 36px;
    color: var(--texto-escuro);
    margin-bottom: 60px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colunas */
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    background-color: var(--branco);
    padding: 30px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid var(--cinza-claro-borda);
}
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
}
.feature-card h3 {
    font-size: 22px;
    color: var(--texto-escuro);
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 16px;
    color: var(--cinza-texto-secundario);
    line-height: 1.6;
}

/* --- CTA (CALL TO ACTION) FINAL --- */
.cta-bottom-section {
    padding: 100px 20px;
    background-color: var(--bege-areia);
    text-align: center;
}
.logo-grande-cta {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}
.cta-bottom-section h2 {
    font-size: 36px;
    color: var(--texto-escuro);
    margin-bottom: 15px;
}
.cta-bottom-section p {
    font-size: 18px;
    color: var(--cinza-texto-secundario);
    margin-bottom: 30px;
}

/* --- FOOTER --- */
.footer {
    padding: 30px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--cinza-texto-secundario);
    background-color: var(--branco);
    border-top: 1px solid var(--cinza-claro-borda);
}
.footer p {
    margin-bottom: 5px;
}

/* Animação simples */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- AJUSTES PARA CELULAR --- */
@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .nav-logo span { display: none; } /* Esconde o nome no celular, deixa só o logo */

    .headline { font-size: 36px; }
    .subheadline { font-size: 18px; }

    .features-grid {
        grid-template-columns: 1fr; /* 1 coluna no celular */
        gap: 20px;
    }
}

/* --- 12. ESTILOS DA PÁGINA DE TERMOS (termos.html) --- */

.text-content-section {
    max-width: 800px;
    margin: 40px auto; /* Centraliza o conteúdo de texto */
    padding: 40px 50px;
    background-color: var(--branco);
    border-radius: 12px;
    margin-top: 40px; /* Espaço do topo */
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid var(--cinza-claro-borda);
}

.text-content-section h2 {
    font-size: 32px;
    color: var(--texto-escuro);
    margin-bottom: 10px;
}
.text-content-section .subtext {
    font-size: 14px;
    color: var(--cinza-texto-secundario);
    margin-bottom: 40px;
    border-bottom: 1px solid var(--cinza-claro-borda);
    padding-bottom: 20px;
}

.text-content-section h3 {
    font-size: 22px;
    color: var(--terracota-suave);
    margin-top: 30px;
    margin-bottom: 15px;
}

.text-content-section p,
.text-content-section li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--texto-escuro);
    margin-bottom: 20px;
}

.text-content-section ul {
    padding-left: 40px; /* Mais espaço para os marcadores */
}

.text-content-section li {
    margin-bottom: 10px;
}

/* --- 13. ESTILO DO BOTÃO DE UPGRADE NO PAYWALL (NOVO) --- */

.botao-paywall {
    background-color: var(--verde-salvia); /* Cor da paleta */
    color: var(--branco);
    border: none;
    border-radius: 20px; /* Pílula */
    padding: 10px 20px;
    font-family: var(--fonte-principal);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin-top: 15px; /* Espaço do texto acima */
    transition: all 0.2s;
}

.botao-paywall:hover {
    background-color: #9eb08b; /* Mesmo hover do botão de upgrade do header */
    transform: scale(1.03);
}