/* ── AMBIENT ── */
.fsg-ambient {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.fsg-ambient::before {
  content: '';
  position: absolute; top: -20%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,197,94,0.07) 0%, transparent 70%);
  border-radius: 50%;
  animation: fsgDrift1 20s ease-in-out infinite alternate;
}
.fsg-ambient::after {
  content: '';
  position: absolute; bottom: -20%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(234,179,8,0.05) 0%, transparent 70%);
  border-radius: 50%;
  animation: fsgDrift2 25s ease-in-out infinite alternate;
}
@keyframes fsgDrift1 { from { transform: translate(0,0); } to { transform: translate(60px,80px); } }
@keyframes fsgDrift2 { from { transform: translate(0,0); } to { transform: translate(-80px,-60px); } }

/* ── LAYOUT ── */
.fsg-wrap {
  position: relative; z-index: 1;
  max-width: 820px; margin: 0 auto;
  padding: 120px 1.5rem 5rem;
}

/* ── HERO ── */
.fsg-hero { margin-bottom: 2.5rem; text-align: center; }

.fsg-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 900; text-transform: uppercase;
  letter-spacing: -0.02em; line-height: 1;
  color: var(--on-surface); margin-bottom: 1rem;
}
.fsg-gradient {
  background: linear-gradient(90deg, #22c55e, #eab308);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(34,197,94,0.35));
}
.fsg-desc {
  font-size: 0.92rem; line-height: 1.65;
  color: var(--on-surface-variant);
  max-width: 560px; margin: 0 auto;
}

/* ── CARD ── */
.fsg-card {
  background: rgba(28,28,35,0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 0 40px rgba(34,197,94,0.06), inset 0 0 30px rgba(34,197,94,0.02);
  margin-bottom: 1.5rem;
}

/* ── TABS ── */
.fsg-tabs {
  display: flex; gap: 0.5rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(248,245,253,0.07);
}
.fsg-tab {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--on-surface-variant);
  background: none; border: none;
  padding: 0.5rem 1.25rem 0.75rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.fsg-tab:hover { color: #22c55e; }
.fsg-tab.active { color: #22c55e; border-bottom-color: #22c55e; }

/* ── PANELS ── */
.fsg-panel { animation: fsgFadeIn 0.2s ease; }
@keyframes fsgFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ── QA LIST ── */
.fsg-qa-list {
  display: flex; flex-direction: column; gap: 0.9rem;
}
.fsg-qa-row {
  background: rgba(14,14,19,0.55);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: 0.7rem;
  padding: 0.85rem 0.9rem;
  position: relative;
}
.fsg-qa-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #22c55e; opacity: 0.8;
  display: block; margin-bottom: 0.5rem;
}
.fsg-qa-remove {
  position: absolute; top: 0.5rem; right: 0.5rem;
  background: none; border: none;
  color: var(--on-surface-variant);
  cursor: pointer; padding: 0.2rem;
  border-radius: 0.3rem;
  transition: color 0.2s, background 0.2s;
}
.fsg-qa-remove:hover { color: #f87171; background: rgba(248,113,113,0.1); }
.fsg-qa-remove .material-symbols-outlined { font-size: 1rem; }
.fsg-qa-q, .fsg-qa-a {
  width: 100%;
  background: rgba(14,14,19,0.7);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem; font-weight: 500;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  line-height: 1.5;
}
.fsg-qa-q { margin-bottom: 0.5rem; }
.fsg-qa-a { resize: vertical; min-height: 70px; }
.fsg-qa-q:focus, .fsg-qa-a:focus {
  border-color: rgba(34,197,94,0.7);
  box-shadow: 0 0 12px rgba(34,197,94,0.12);
}
.fsg-qa-q::placeholder, .fsg-qa-a::placeholder { color: rgba(172,170,177,0.45); }

.fsg-add-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: 100%; margin-top: 0.9rem;
  padding: 0.65rem 1rem;
  background: rgba(34,197,94,0.08);
  border: 1px dashed rgba(34,197,94,0.4);
  border-radius: 0.5rem;
  color: #22c55e;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.fsg-add-btn:hover { background: rgba(34,197,94,0.16); border-color: rgba(34,197,94,0.7); }
.fsg-add-btn .material-symbols-outlined { font-size: 1rem; }

/* ── TOPIC INPUT ── */
.fsg-topic-input {
  width: 100%;
  background: rgba(14,14,19,0.7);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 0.625rem;
  padding: 0.75rem 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem; font-weight: 500;
  color: var(--on-surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.fsg-topic-input::placeholder { color: rgba(172,170,177,0.45); }
.fsg-topic-input:focus {
  border-color: rgba(34,197,94,0.7);
  box-shadow: 0 0 16px rgba(34,197,94,0.12);
}

/* ── GENERATE BUTTON ── */
.fsg-generate-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #22c55e, #eab308);
  color: #0a0a0f;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  border: none; border-radius: 0.625rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 20px rgba(34,197,94,0.25);
}
.fsg-generate-btn:hover:not(:disabled) {
  opacity: 0.92; transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(34,197,94,0.4);
}
.fsg-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.fsg-generate-btn .material-symbols-outlined { font-size: 1rem; }

/* ── STATUS ── */
.fsg-status {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  color: var(--on-surface-variant);
  margin: 0.75rem 0 0; min-height: 1.2em;
  text-align: center;
}
.fsg-status.error { color: #f87171; }

/* ── OUTPUT ── */
.fsg-output-card {
  background: rgba(28,28,35,0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 1.25rem;
  overflow: hidden;
  animation: fsgFadeIn 0.35s ease;
}
.fsg-output-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(248,245,253,0.06);
  flex-wrap: wrap; gap: 0.75rem;
}
.fsg-output-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #22c55e; margin: 0;
}
.fsg-output-actions { display: flex; gap: 0.5rem; }

.fsg-action-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 0.4rem 0.9rem;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 0.4rem;
  color: #22c55e;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.fsg-action-btn:hover { background: rgba(34,197,94,0.18); border-color: rgba(34,197,94,0.5); }
.fsg-action-btn .material-symbols-outlined { font-size: 0.9rem; }
.fsg-action-btn.copied { color: #86efac; border-color: rgba(134,239,172,0.4); }

.fsg-pre {
  margin: 0;
  padding: 1.5rem 1.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.78rem; line-height: 1.65;
  color: rgba(248,245,253,0.82);
  white-space: pre-wrap; word-break: break-word;
  overflow-x: auto;
}

/* ── EXPLAINER ── */
.fsg-explainer {
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 0.875rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: flex; gap: 1rem; align-items: flex-start;
}
.fsg-explainer .material-symbols-outlined {
  font-size: 1.4rem; color: #22c55e; flex-shrink: 0; margin-top: 0.1rem;
}
.fsg-explainer-text { font-size: 0.83rem; line-height: 1.65; color: var(--on-surface-variant); }
.fsg-explainer-text strong { color: var(--on-surface); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .fsg-wrap { padding: 100px 1rem 4rem; }
  .fsg-card { padding: 1.25rem; }
  .fsg-output-header { flex-direction: column; align-items: flex-start; }
}
