:root {
  --bg: #0b0f0a;
  --bg-soft: #0f1510;
  --fg: #d4ffd6;
  --fg-muted: #9be3a0;
  --accent: #33ff66;
  --accent-2: #00d17a;
  --warning: #ffeb3b;
  --line: rgba(51, 255, 102, 0.2);
  --shadow: 0 0 0 1px rgba(51, 255, 102, 0.15), 0 10px 30px rgba(0, 0, 0, 0.5);
}

:root.light {
  --bg: #f3fff5;
  --bg-soft: #eaffee;
  --fg: #113014;
  --fg-muted: #2a6c35;
  --accent: #0a8f3e;
  --accent-2: #0d6a2f;
  --warning: #8a6d1d;
  --line: rgba(10, 143, 62, 0.2);
  --shadow: 0 0 0 1px rgba(10, 143, 62, 0.12), 0 6px 22px rgba(0, 0, 0, 0.08);
}

/* ─── Reset e base ─────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", monospace;
  line-height: 1.55;
}

/* CORREÇÃO: form elements herdam fonte do body */
input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* CORREÇÃO: placeholder com cor temática */
::placeholder {
  color: var(--fg-muted);
  opacity: 0.6;
}

/* ─── Efeito CRT/scanlines ─────────────────────────────── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.06) 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.35;
  z-index: 1;
}

/* ─── Topbar ───────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--bg-soft), transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.window-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.window-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  /* CORREÇÃO: sombra sutil adequada para bolinhas pequenas */
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.window-dots .red    { background: #ff5f56; }
.window-dots .yellow { background: #ffbd2e; }
.window-dots .green  { background: #27c93f; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}
.brand .penguin    { font-size: 18px; }
.brand .brand-text { color: var(--fg); font-weight: 600; }

.actions .btn.ghost {
  border: 1px solid var(--line);
  color: var(--fg);
  background: transparent;
}

/* ─── Container principal ──────────────────────────────── */
.container {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

/* ─── Hero / terminal prompt ───────────────────────────── */
.hero.terminal {
  border: 1px solid var(--line);
  background: radial-gradient(
      1200px 500px at 10% -10%,
      rgba(51, 255, 102, 0.08),
      transparent 50%
    ),
    var(--bg-soft);
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
}

.prompt-line {
  color: var(--fg);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt-line .user { color: var(--accent-2); }
.prompt-line .host { color: var(--accent); }
.prompt-line .cmd  { color: var(--fg); }

.prompt-line .cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1.1s step-end infinite;
  vertical-align: -3px;
}

@keyframes blink {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.subtitle {
  margin: 6px 0 0;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ─── Toolbar ──────────────────────────────────────────── */
.toolbar {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-soft);
}
.search label {
  color: var(--accent);
  font-weight: 600;
}
.search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  min-width: 260px;
}

/* CORREÇÃO: grupo de botões de ação com layout flex */
.toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── Botões ───────────────────────────────────────────── */
.btn {
  background: linear-gradient(
    180deg,
    rgba(51, 255, 102, 0.12),
    rgba(51, 255, 102, 0.02)
  );
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.15s ease all;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.btn.ghost {
  background: transparent;
}

/* ─── Acordeões ────────────────────────────────────────── */
.accordions {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.accordion {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0)),
    var(--bg-soft);
  box-shadow: var(--shadow);
}

.accordion-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  background: rgba(51, 255, 102, 0.06);
  border-bottom: 1px solid var(--line);
}

.accordion-toggle {
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--fg);
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.accordion-toggle .folder {
  color: var(--accent);
  font-weight: 600;
}
.accordion-toggle .chevron {
  color: var(--fg-muted);
  font-size: 14px;
  margin-left: 14px;
  transition: transform 0.3s ease;
}

/* CORREÇÃO: transição suave com max-height + opacity (sem display:none abrupto) */
.accordion-content {
  padding: 10px 14px 4px 14px;
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* ─── Itens de pergunta ────────────────────────────────── */
.question-list {
  margin: 0;
  padding-left: 20px;
}

.question-item {
  position: relative;
  padding: 8px 0;
  color: var(--fg);
  border-left: 2px solid transparent;
}
.question-item:hover {
  border-left: 2px solid var(--accent);
  background: rgba(51, 255, 102, 0.04);
}

.q-prefix {
  color: var(--accent-2);
  font-weight: 600;
  margin-right: 6px;
}
.q-text {
  color: var(--fg);
}

/* ─── Footer ───────────────────────────────────────────── */
.footer {
  margin-top: 30px;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(51, 255, 102, 0.05));
}
.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

/* ─── Estado colapsado ─────────────────────────────────── */
.accordion[data-collapsed="true"] .accordion-content {
  max-height: 0;
  opacity: 0;
}
.accordion[data-collapsed="true"] .accordion-toggle .chevron {
  transform: rotate(-90deg);
}

/* ─── Acessibilidade (focus) ───────────────────────────── */
.accordion-toggle:focus-visible,
.btn:focus-visible,
input:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}

/* ─── Estado de carregamento / erro ───────────────────────
   Adicionar ao final do style.css existente             */

.loading-state {
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

code {
  background: rgba(51, 255, 102, 0.1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 0.9em;
  color: var(--accent);
}