:root {
    --primary: #F59E0B; /* Amarelo Calopsita */
    --primary-hover: #D97706;
    --bg: #F3F4F6;
    --text: #1F2937;
    --card-bg: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --modal-overlay: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] {
    --bg: #111827;
    --text: #F9FAFB;
    --card-bg: #1F2937;
    --border: #374151;
    --modal-overlay: rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }

body { 
    background-color: var(--bg); 
    color: var(--text); 
    transition: background 0.3s, color 0.3s; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-x: hidden; 
}

/* --- Header --- */
header {
    background: var(--card-bg); border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem; position: sticky; top: 0; z-index: 50;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.25rem; color: var(--primary); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.actions { display: flex; gap: 0.75rem; align-items: center; }

/* --- Botões --- */
button, .btn {
    cursor: pointer; border: none; outline: none; padding: 0.6rem 1.2rem; border-radius: 0.75rem;
    font-weight: 600; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-size: 0.95rem; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3); }
.btn-primary:hover { transform: translateY(-1px); background: var(--primary-hover); }

.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--text); }
.btn-outline:hover { background: var(--primary); color: white; transform: translateY(-1px); }

.btn-icon { background: transparent; color: var(--text); padding: 0.5rem; border-radius: 50%; }
.btn-icon:hover { background: rgba(128, 128, 128, 0.1); }

.btn-close { align-self: center; margin-top: 1rem; color: gray; background: transparent; font-size: 0.9rem; }
.btn-close:hover { color: var(--text); text-decoration: underline; }

/* --- Modal de Login --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-overlay); backdrop-filter: blur(8px);
    z-index: 100; display: flex; justify-content: center; align-items: center; padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}
.modal-content {
    background: var(--card-bg); width: 100%; max-width: 450px;
    padding: 2.5rem; border-radius: 1.5rem; border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex; flex-direction: column; gap: 1.5rem;
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header h2 { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--text); }
.modal-header p { color: gray; font-size: 1rem; }

/* Opções de Login (Layout) */
.login-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* AUMENTADO: Espaço maior entre os botões */
    margin-top: 0.5rem;
}

/* Cartão de Escolha (Cliente/Psicólogo) */
.role-card {
    display: flex; align-items: center; gap: 1.25rem; width: 100%;
    padding: 1.25rem; background: var(--bg); border: 2px solid transparent;
    border-radius: 1rem; text-align: left; transition: all 0.2s ease;
    cursor: pointer; position: relative; overflow: hidden;
}
.role-card:hover { 
    border-color: var(--primary); 
    background: var(--card-bg);
    transform: translateY(-2px); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.role-card strong { display: block; font-size: 1.1rem; color: var(--text); margin-bottom: 0.2rem; }
.role-card span { display: block; font-size: 0.85rem; color: gray; }
.icon-bg { 
    background: rgba(245, 158, 11, 0.15); color: var(--primary); 
    padding: 0.75rem; border-radius: 0.75rem; display: flex; 
    align-items: center; justify-content: center; 
}

/* --- Hero & Layout --- */
main { flex: 1; display: flex; flex-direction: column; padding: 3rem 1rem; text-align: center; max-width: 1200px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: 3rem; margin-bottom: 1.5rem; line-height: 1.1; letter-spacing: -0.05em; font-weight: 900; }
.hero span { color: var(--primary); background: linear-gradient(135deg, #F59E0B 0%, #FCD34D 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: gray; margin-bottom: 2.5rem; max-width: 600px; margin-inline: auto; line-height: 1.6; }

.features { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; margin-top: 5rem; width: 100%; 
}
.feature-item { 
    display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2rem; 
    background: var(--card-bg); border-radius: 1.5rem; border: 1px solid var(--border);
    font-weight: 600; text-align: center; transition: 0.3s;
}
.feature-item:hover { transform: translateY(-5px); border-color: var(--primary); }
.feature-item i { width: 48px; height: 48px; margin-bottom: 0.5rem; }

/* Botão PWA Flutuante (Opcional, se não usar no Hero) */
.install-banner { 
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); 
    background: var(--card-bg); padding: 12px 24px; border-radius: 50px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); border: 1px solid var(--primary); 
    z-index: 90; animation: slideUp 0.5s ease;
}

/* Utilitários e Animações */
.hidden { display: none !important; }
.fade-up { animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1); }

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* Mobile */
@media (max-width: 640px) {
    .hero h1 { font-size: 2.2rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .btn { width: 100%; padding: 1rem; }
    .features { grid-template-columns: 1fr; margin-top: 3rem; }
    .modal-content { padding: 1.5rem; }
}