/* This file was generated by AI and adjust by ViniciusPilan. */

:root {
  --bg: #0a0d13;
  --panel: #10141c;
  --panel-2: #0d1119;
  --border: #232a38;
  --text: #cfd6e2;
  --text-dim: #6c7688;
  --cyan: #6fd3f7;
  --green: #7ee08a;
  --amber: #f5b95f;
  --font: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  align-items: flex-start;
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(111, 211, 247, 0.05), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(126, 224, 138, 0.04), transparent 50%);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* Overall terminal window */
.terminal {
  width: 100%;
  max-width: 720px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
}

/* Title bar, mimicking a terminal window chrome */
#window-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}

#window-header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Generic screen padding, shared by every section */
.screen {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.screen:last-child {
  border-bottom: none;
}

/* Category chips (page-categories-field) */
#page-categories-section {
  display: flex;
  width: 100%;
}

#page-categories-field {
  display: flex;
  width: 100%;
}

#page-categories-field button {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
  flex: 1;
}

#page-categories-field button:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

#page-categories-field button.active {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* Filters bar (all-btn + filters-field) */
#filters-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--panel-2);
}

#filters-field {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #888 transparent;
}

#all-btn,
#filters-field button,
#filters-field .filter-group {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

#all-btn:hover,
#filters-field button:hover,
#filters-field .filter-group:hover {
  border-color: var(--cyan);
  color: var(--text);
}

#all-btn.active,
#filters-field button.active,
#filters-field .filter-group.active {
  border-color: #2f6b3a;
  background: rgba(126, 224, 138, 0.08);
  color: var(--text);
}

#all-btn:focus-visible,
#filters-field button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Category filter checkboxes — same pill treatment as #all-btn,
   with the label acting as the clickable chip wrapping the checkbox */
.category-filter-container {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.category-filter-label:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.category-filter {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin: 0;
  border: 1px solid var(--text-dim);
  border-radius: 3px;
  background: var(--panel-2);
  cursor: pointer;
  position: relative;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.category-filter:checked {
  background: var(--green);
  border-color: var(--green);
}

.category-filter:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.category-filter:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.category-filter-label:has(.category-filter:checked) {
  border-color: #2f6b3a;
  background: rgba(126, 224, 138, 0.08);
  color: var(--text);
}

/* Prompt line (~/ $ category) */
#ps-section {
  font-size: 13px;
  margin-bottom: 20px;
}

#ps-section p {
  margin: 0;
  white-space: normal;
  word-break: break-word;
}

#ps-text {
  color: var(--amber);
}

#sep {
  color: var(--text-dim);
}

#question-category {
  color: var(--text);
}

/* Question / answer panes */
#question-panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 16px;
  background: var(--panel-2);
}

#question-panel > p {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 10px;
}

#answer-panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 16px;
  background: var(--panel-2);
}

#answer-panel > span {
  display: inline-block; /* Permite definir largura e altura */
  width: 100%;
  height: 110px;          /* Define uma altura máxima */
  overflow: auto;        /* Adiciona a barra de rolagem quando necessário */
  scrollbar-width: thin;
  scrollbar-color: #888 transparent;
}


#answer-panel > p {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 10px;
}

#question-ask-field {
  font-size: 15.5px;
  line-height: 1.6;
  color: #eef2f8;
}

#question-answer-field {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
}

/* Answer hidden state (toggle this class via JS before reveal) */
.answer-hidden #question-answer-field {
  filter: blur(6px);
  user-select: none;
  color: transparent;
  background: linear-gradient(90deg, #3a4256, #2a3040, #3a4256);
  background-clip: text;
  -webkit-background-clip: text;
}

#reveal-question-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--green);
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

#reveal-question-btn:hover {
  background: #99e8a4;
}

#reveal-question-btn:active {
  transform: scale(0.97);
}

#reveal-question-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

#next-question-btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--cyan);
  border: none;
  border-radius: 6px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

#next-question-btn:hover {
  background: #8adef9;
}

#next-question-btn:active {
  transform: scale(0.97);
}

#next-question-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

#quantity-info {
  font-size: 13px;
  margin-top: 30px;
  margin-bottom: 30px;
}

@media (prefers-reduced-motion: reduce) {
  #next-question-btn,
  #reveal-question-btn,
  #filters-field .filter-group {
    transition: none;
  }
}

@media (max-width: 480px) {
  .screen { padding: 16px 18px; }
  #question-ask-field,
  #question-answer-field { font-size: 14.5px; }
  #filters-section { padding: 12px 14px; gap: 8px; }
}