:root {
  /* Paleta Light - Tons profundos off-white, sem branco absoluto */
  --bg-color: #fcfbf9;
  --text-color: #1a1918;
  --surface: rgba(243, 239, 233, 0.65);
  --surface-border: rgba(26, 25, 24, 0.12);
  --primary: #c95c10;
  --primary-hover: #a84b0b;
  --shadow-color: rgba(26, 25, 24, 0.08);
  --radius-card: 10px;
  --radius-btn: 8px;
  --glass-blur: blur(16px);
  --font-base: system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  /* Paleta Dark - Tons profundos espresso/carvão, sem preto absoluto */
  --bg-color: #0c0b0a;
  --text-color: #f2efe9;
  --surface: rgba(31, 28, 25, 0.7);
  --surface-border: rgba(242, 239, 233, 0.1);
  --primary: #e67525;
  --primary-hover: #f08d46;
  --shadow-color: rgba(0, 0, 0, 0.6);
}

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

body {
  font-family: var(--font-base);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* Superfícies Translúcidas / Glassmorphism */
.glass-header, .glass-modal, .glass-footer, .card {
  background: var(--surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--surface-border);
}

/* Header */
.glass-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 5%; box-shadow: 0 4px 20px var(--shadow-color);
}
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.controls button { background: transparent; border: 1px solid var(--surface-border); font-size: 1.2rem; padding: 0.5rem; color: var(--text-color); }

/* Hero Section */
.hero { padding: 5rem 5%; text-align: center; max-width: 900px; margin: 0 auto; }
.kicker { display: inline-block; color: var(--primary); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.08em; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.2rem; line-height: 1.1; letter-spacing: -0.03em; }
.hero p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 2rem; }

.metrics { display: flex; gap: 1rem; justify-content: center; margin-bottom: 2.5rem; flex-wrap: wrap; }
.badge-metric { font-size: 0.85rem; padding: 0.4rem 0.8rem; border-radius: 20px; background: var(--surface-border); font-weight: 600; }

/* Controles de Busca e Botões */
.search-bar { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.search-bar input { flex: 1; max-width: 450px; padding: 0.85rem 1.5rem; border-radius: var(--radius-btn); border: 1px solid var(--surface-border); background: transparent; color: var(--text-color); font-size: 1rem; }
.search-bar input:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

button { padding: 0.85rem 1.5rem; border-radius: var(--radius-btn); border: none; background: var(--primary); color: #fff; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: background-color 0.2s, transform 0.1s; }
button:hover { background: var(--primary-hover); }
button:active { transform: scale(0.98); }
#clear-search, #google-search { background: var(--surface); color: var(--text-color); border: 1px solid var(--surface-border); }
#clear-search:hover, #google-search:hover { background: var(--surface-border); }

/* Bento Menu */
.bento-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.8rem; padding: 0 5%; max-width: 900px; margin: 0 auto 3rem auto; }
.bento-menu button { background: var(--surface); color: var(--text-color); border: 1px solid var(--surface-border); border-radius: var(--radius-btn); padding: 1rem; text-align: center; font-weight: 500; }
.bento-menu button[aria-pressed="true"], .bento-menu button.active { border-color: var(--primary); background: rgba(201, 92, 16, 0.1); color: var(--text-color); }

/* Editorial & Grid */
.editorial { padding: 2rem 5%; text-align: center; max-width: 800px; margin: 0 auto 2rem auto; opacity: 0.9; border-top: 1px solid var(--surface-border); border-bottom: 1px solid var(--surface-border); }
.editorial h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }

.dynamic-area { padding: 0 5% 4rem 5%; max-width: 1200px; margin: 0 auto; }
#status-results { margin-bottom: 1.5rem; font-weight: 500; opacity: 0.8; font-size: 0.9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

/* Cards */
.card { padding: 1.5rem; border-radius: var(--radius-card); cursor: pointer; transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s; box-shadow: 0 4px 12px var(--shadow-color); outline: none; }
.card:hover, .card:focus-visible { transform: translateY(-6px); box-shadow: 0 12px 24px var(--shadow-color); border-color: var(--primary); }
.card-header { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.card-title { font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.emoji { font-size: 1.5rem; }
.card p { font-size: 0.95rem; opacity: 0.85; margin-bottom: 1.5rem; }

/* Badges dinâmicas */
.tags-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dynamic-badge { font-size: 0.75rem; padding: 0.3rem 0.6rem; border-radius: 4px; font-weight: 600; }

/* Modal */
.glass-modal { margin: auto; padding: 0; border-radius: var(--radius-card); max-width: 550px; width: 92%; color: var(--text-color); box-shadow: 0 25px 50px var(--shadow-color); }
.glass-modal::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.modal-content { padding: 2.5rem; position: relative; }
#close-modal { position: absolute; top: 1rem; right: 1rem; font-size: 1.2rem; border: none; background: transparent; color: var(--text-color); cursor: pointer; padding: 0.5rem; border-radius: 50%; }
#close-modal:hover { background: var(--surface-border); }
#modal-title { font-size: 1.8rem; margin-bottom: 1rem; }
.modal-description { font-size: 1.05rem; margin-bottom: 1.5rem; line-height: 1.7; opacity: 0.9; }
.modal-pain-box { background: var(--surface-border); padding: 1rem; border-radius: var(--radius-btn); margin-bottom: 2rem; font-size: 0.95rem; }

.modal-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.modal-actions a { flex: 1; background: var(--primary); color: #fff; padding: 0.85rem; text-decoration: none; border-radius: var(--radius-btn); font-weight: 600; text-align: center; min-width: 200px; transition: background-color 0.2s; }
.modal-actions a:hover { background: var(--primary-hover); }
#share-btn { flex: 1; min-width: 200px; }

/* Footer */
.glass-footer { padding: 4rem 5% 2rem 5%; text-align: center; border-top: 1px solid var(--surface-border); }
.footer-info p { opacity: 0.8; margin-bottom: 1rem; font-size: 0.95rem; }
.footer-nav { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 3rem; }
.footer-nav a { color: var(--text-color); text-decoration: none; font-weight: 500; font-size: 0.9rem; opacity: 0.7; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

.partners-wrapper h3 { font-size: 1rem; margin-bottom: 1rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.05em; }
.partners { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.partner-item a { color: var(--text-color); text-decoration: none; font-weight: 600; opacity: 0.7; transition: opacity 0.2s; }
.partner-item a:hover { opacity: 1; color: var(--primary); }

@media (max-width: 600px) {
  .hero { padding: 3rem 5%; }
  .modal-actions { flex-direction: column; }
}