/* ============================================
   BOOMINUM ⚡ - styles.css (FINAL COMPLETO)
   NÃO REMOVER PARTES
============================================ */

/* =========================
   VARIÁVEIS
========================= */
:root {
  --bg: #f6f8fb;
  --bg-2: #eef2f7;
  --card: #ffffff;
  --text: #0f1724;
  --muted: #6b7280;
  --muted-2: #9aa3b2;
  --accent: #0466ff;
  --accent-2: #2aa6ff;
  --danger: #ef4444;
  --overlay: rgba(0,0,0,0.45);
  --shadow-1: 0 8px 24px rgba(16,24,40,0.08);
  --shadow-2: 0 18px 60px rgba(11,14,17,0.12);
  --radius: 14px;
  --max-width: 1100px;
}

/* =========================
   DARK MODE
========================= */
body.dark {
  --bg: #0b0d0f;
  --bg-2: #0f1113;
  --card: #121417;
  --text: #e6eef8;
  --muted: #9ca3af;
}

/* =========================
   RESET
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  color: var(--text);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* =========================
   HEADER
========================= */
header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: fixed;
  inset: 0 0 auto 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-1);
  z-index: 1000;
}

body.dark header {
  background: rgba(15,17,19,0.7);
}

.logo {
  font-weight: 900;
  font-size: 20px;
  color: var(--accent);
}

.logo span {
  color: #ffd500;
}

.nav-menu {
  display: flex;
  gap: 18px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}

/* =========================
   CONTAINER / CARD
========================= */
.container {
  max-width: var(--max-width);
  margin: 120px auto 60px;
  padding: 0 20px;
}

.card {
  background: var(--card);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 24px;
}

/* =========================
   CONTROLS
========================= */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted-2);
}

textarea,
select,
input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 14px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* =========================
   BUTTONS
========================= */
.actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.generate-btn {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 900;
  border: none;
  border-radius: 12px;
  padding: 14px 30px;
  cursor: pointer;
  transition: 0.2s;
}

.generate-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.secondary-btn {
  background: #eef2f7;
  border: 1px solid rgba(0,0,0,0.1);
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-btn.full,
.generate-btn.full {
  width: 100%;
}

/* =========================
   OUTPUT
========================= */
.result-header {
  margin-top: 30px;
}

.output {
  margin-top: 10px;
  background: #f8fbff;
  padding: 18px;
  border-radius: 12px;
  min-height: 200px;
  white-space: pre-wrap;
  line-height: 1.6;
  border: 1px solid rgba(0,0,0,0.06);
}

/* =========================
   MODAIS
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 4000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: 16px;
  padding: 32px;
  width: 520px;
  max-width: 95%;
  box-shadow: var(--shadow-2);
  position: relative;
  animation: modalIn 0.25s ease;
}

.modal-content.small {
  width: 420px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
}

/* =========================
   AUTH / LOGIN
========================= */
#content-auth {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #4285f4;
  color: white;
  font-weight: 700;
  padding: 14px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.google-btn img {
  width: 20px;
  height: 20px;
  background: white;
  padding: 3px;
  border-radius: 50%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.15);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .controls-grid {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
  }

  .hamburger {
    display: block;
  }
}

/* ================= CONFIG MODAL ================= */

.config-modal {
  max-width: 520px;
}

.modal-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.modal-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 22px;
}

.config-section {
  background: var(--bg-2);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.config-section h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field small {
  font-size: 12px;
  color: var(--muted);
}

.field.disabled {
  opacity: 0.6;
}

.config-section.muted {
  background: transparent;
  font-size: 14px;
  color: var(--muted);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

/* =========================
   MENU MOBILE (HAMBURGER)
   ========================= */

@media (max-width: 768px) {

  .hamburger {
    display: block;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    z-index: 5001;
  }

  .nav-menu {
    display: none;
  }

  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; /* abaixo do header */
    left: 0;
    right: 0;
    background: var(--card);
    padding: 20px;
    gap: 16px;
    box-shadow: var(--shadow-1);
    z-index: 5000;
  }

  .nav-menu.active a {
    font-size: 16px;
    font-weight: 800;
  }
}

.modal-header {
  text-align: center;
  margin-bottom: 22px;
}

.modal-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--muted);
}

/* =========================
   SIDEBAR OVERLAY (HISTÓRICO)
========================= */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 3000;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 300px;
  background: var(--card);
  box-shadow: var(--shadow-2);
  transform: translateX(-100%);
  transition: 0.3s ease;
  z-index: 3100;
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  transform: translateX(0);
}

/* HEADER */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* BODY */
.sidebar-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
}

.sidebar-empty {
  text-align: center;
  color: var(--muted);
}

.sidebar-empty p {
  font-weight: 700;
  margin-bottom: 4px;
}

/* FOOTER */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* =========================
   SIDEBAR OVERLAY (HISTÓRICO) — FINAL CORRETO
========================= */

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 3000;
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 300px;
  background: var(--card);
  box-shadow: var(--shadow-2);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 3100;
  display: flex;
  flex-direction: column;
}

.sidebar.active {
  transform: translateX(0);
}

/* HEADER */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.sidebar-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* BODY */
.sidebar-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
}

.sidebar-empty {
  text-align: center;
  color: var(--muted);
}

.sidebar-empty p {
  font-weight: 700;
  margin-bottom: 4px;
}

/* FOOTER */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}
