@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,600;0,700;1,400;1,500&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ============================================================
   VARIÁVEIS DE COR E ESTILO
   ============================================================ */
:root {
  --forest: #0F172A;
  --forest-mid: #1E293B;
  --forest-light: #475569;
  --gold: #2563EB;
  --gold-light: #3B82F6;
  --gold-pale: #EFF6FF;
  --cream: #FFFFFF;
  --warm-white: #FFFFFF;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --bg-alt: #F8FAFC;

  --shadow-float: 0 20px 40px rgba(26, 58, 46, 0.08); 
  --shadow-sm: 0 4px 12px rgba(26, 58, 46, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.4);
  --glass-blur: blur(16px);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background-color: var(--bg-alt);
  line-height: 1.7;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.font-serif { font-family: 'Lora', serif; }
h1, h2, h3, h4, h5, h6 { font-family: 'Lora', serif; font-weight: 700; line-height: 1.2; }
.title-display { font-size: clamp(26px, 4vw, 42px); color: var(--forest); margin-bottom: 12px; }
.text-muted { color: var(--muted); font-size: 16px; }

/* GSAP */
.gsap-reveal { autoAlpha: 0; }

/* BOTOES */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: #fff; padding: 14px 28px;
  border-radius: 0; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  transition: var(--transition-smooth); border: none; cursor: pointer; gap: 8px;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(184, 134, 11, 0.3); }
.btn-gold:disabled { opacity: 0.5; pointer-events: none; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--forest); padding: 14px 28px;
  border-radius: 0; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  transition: var(--transition-smooth); border: 1.5px solid var(--forest); cursor: pointer; gap: 8px;
}
.btn-outline:hover { background: var(--forest); color: #fff; transform: translateY(-2px); }

/* NAVEGAÇÃO */
.top-nav {
  position: fixed; top: 0; width: 100%; padding: 20px 0; z-index: 100;
  background: linear-gradient(to bottom, rgba(245, 241, 232, 0.95), rgba(245, 241, 232, 0));
  backdrop-filter: blur(10px);
}
.top-nav .inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: 'Lora', serif; font-size: 19px; font-weight: 700; color: var(--forest); display: flex; align-items: center; gap: 10px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 15px; font-weight: 600; color: var(--muted); transition: var(--transition-smooth); position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--gold); transition: var(--transition-smooth); }
.nav-links a:hover, .nav-links a.active { color: var(--forest); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.bottom-nav {
  display: none; position: fixed; bottom: 55px; left: 0;
  background: var(--forest); padding: 12px 24px; border-radius: 0; box-shadow: 0 -4px 16px rgba(26, 58, 46, 0.2); border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1002; width: 100%; max-width: 100%;
}
.bottom-nav .inner-nav { display: flex; justify-content: space-around; align-items: center; width: 100%; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; color: rgba(255, 255, 255, 0.6); font-size: 11px; font-weight: 600; gap: 4px; transition: var(--transition-smooth); }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--gold-pale); transform: translateY(-2px); }
.bottom-nav i { font-size: 20px; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .bottom-nav { display: block; }
  .top-nav { padding: 16px 0; background: var(--bg-alt); }
}

/* COMPONENTES DO JAVASCRIPT (UI) */
.emotion-card {
  background: var(--warm-white); border: 1px solid var(--border); padding: 12px;
  border-radius: 0; text-align: center; cursor: pointer; transition: var(--transition-smooth);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-bottom: 3px solid transparent;
}
.emotion-card.selected { border-color: var(--forest); background: var(--gold-pale); transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.emotion-card i { font-size: 20px; color: var(--gold); }
.emotion-card span { font-weight: 700; color: var(--forest); font-size: 13px; }

.toast-container { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 12px; }
.toast { background: var(--forest); color: #fff; padding: 16px 24px; border-radius: 0; box-shadow: var(--shadow-float); display: flex; align-items: center; gap: 12px; animation: slideIn 0.3s ease-out; border-left: 4px solid var(--gold); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0;} to { transform: translateX(0); opacity: 1;} }
.toast-exit { animation: slideOut 0.3s forwards; }
@keyframes slideOut { to { transform: translateX(100%); opacity: 0; } }

.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { visibility: hidden; opacity: 0; pointer-events: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); transition: 0.3s; }
.modal-content { position: relative; background: var(--cream); padding: 32px; border-radius: 0; width: 90%; max-width: 500px; z-index: 1001; box-shadow: var(--shadow-float); border: 1px solid var(--border); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; }

.history-item, .favorite-item { display: flex; flex-direction: column; background: var(--warm-white); border: 1px solid var(--border); border-radius: 0; padding: 16px 20px; gap: 8px; transition: var(--transition-smooth); margin-bottom: 16px; cursor: pointer; border-left: 4px solid var(--gold); }
.history-item:hover, .favorite-item:hover { border-color: var(--forest-light); transform: translateX(4px); box-shadow: var(--shadow-sm); }
.history-item-header, .favorite-item-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); font-weight: 700; }
.history-item-text, .favorite-item-text { font-family: 'Lora', serif; font-size: 16px; color: var(--forest); line-height: 1.5; margin: 4px 0; }
.history-item-actions, .favorite-item-actions { display: flex; gap: 12px; margin-top: 12px; }
.btn-icon { background: transparent; border: none; font-size: 18px; color: var(--muted); cursor: pointer; transition: var(--transition-smooth); }
.btn-icon:hover { color: var(--forest); }
.btn-icon.active { color: var(--gold); }

/* FAQ */
.faq-item { margin-bottom: 16px; background: var(--warm-white); border: 1px solid var(--border); border-radius: 0; overflow: hidden; border-left: 3px solid var(--forest); }
.faq-question { width: 100%; text-align: left; padding: 20px; background: none; border: none; font-size: 16px; font-weight: 700; color: var(--forest); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 0 20px 20px 20px; color: var(--muted); font-size: 15px; }
.faq-answer[hidden] { display: none; }

/* AdMob Black Bar Placeholder */
.black-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55px;
  background-color: #000000;
  z-index: 1001;
}
