:root {
  --bg: #0b0e17;
  --surface: #121625;
  --surface-2: #171c2e;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --emerald: #1f9d55;
  --emerald-bright: #27c168;
  --yellow: #f4fb9a;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.orb-a { width: 480px; height: 480px; background: rgba(31, 157, 85, 0.35); top: -160px; left: -120px; }
.orb-b { width: 420px; height: 420px; background: rgba(244, 251, 154, 0.12); bottom: -140px; right: -100px; }

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 14, 23, 0.8);
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--emerald);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.brand-name { font-weight: 700; font-size: 16px; }
.brand-tag {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

.header-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--yellow);
  text-decoration: none;
  border: 1px solid rgba(244, 251, 154, 0.35);
  border-radius: 999px;
  padding: 7px 16px;
  transition: background 0.15s ease;
}
.header-cta:hover { background: rgba(244, 251, 154, 0.08); }

.container {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px 40px;
}

.hero { text-align: center; margin-bottom: 44px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-bright);
  border: 1px solid rgba(31, 157, 85, 0.4);
  border-radius: 999px;
  padding: 5px 14px;
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 16px;
}
.lead {
  max-width: 620px;
  margin: 0 auto 12px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}
.privacy-note { font-size: 13px; color: var(--emerald-bright); margin: 0; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}
.panel h2 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
}
.panel-note { color: var(--text-muted); font-size: 14px; margin-top: -8px; }

.field { display: block; margin-bottom: 16px; flex: 1; }
.field span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.field em { color: var(--emerald-bright); font-style: normal; }
.field textarea, .field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}
.field textarea:focus, .field input:focus { border-color: var(--emerald); }
.field textarea::placeholder, .field input::placeholder { color: #5b657a; }

.field-row { display: flex; gap: 16px; }
@media (max-width: 640px) { .field-row { flex-direction: column; gap: 0; } }

.actions { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }

.btn-primary {
  background: var(--emerald);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover:not(:disabled) { background: var(--emerald-bright); }
.btn-primary:active:not(:disabled) { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.btn-secondary:hover { border-color: var(--emerald); }

.btn-large { font-size: 15px; padding: 14px 28px; }

.model-status { margin-top: 20px; }
.status-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.progress-track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--yellow));
  border-radius: 999px;
  transition: width 0.2s ease;
}
.status-hint { font-size: 12px; color: #5b657a; margin-top: 8px; }

.fallback {
  margin-top: 20px;
  border: 1px solid rgba(244, 251, 154, 0.3);
  border-radius: 10px;
  padding: 18px;
  background: rgba(244, 251, 154, 0.04);
}
.fallback h3 { margin: 0 0 8px; font-size: 15px; color: var(--yellow); }
.fallback p { font-size: 13px; color: var(--text-muted); margin: 0 0 12px; }

.prompt-view {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 380px;
  overflow-y: auto;
  margin: 0 0 14px;
}

.stream-raw { display: none; }

.sections { display: flex; flex-direction: column; gap: 16px; }
.section-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.section-card h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--emerald-bright);
}
.section-card .section-body { font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.section-card .section-body strong { color: var(--yellow); font-weight: 600; }
.section-card.generating { border-color: rgba(31, 157, 85, 0.4); }
.section-card.generating h3::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 14px;
  margin-left: 8px;
  background: var(--emerald-bright);
  vertical-align: middle;
  animation: blink 0.9s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.output-actions { display: flex; gap: 12px; margin-top: 18px; }

.cta-panel {
  text-align: center;
  border: 1px solid rgba(31, 157, 85, 0.35);
  background: linear-gradient(160deg, rgba(31, 157, 85, 0.12), rgba(244, 251, 154, 0.04));
  border-radius: var(--radius);
  padding: 40px 28px;
  margin-bottom: 24px;
}
.cta-panel h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 12px; }
.cta-panel p { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; max-width: 560px; margin: 0 auto 22px; }
.cta-sub { font-size: 12.5px; color: var(--text-muted); margin: 14px 0 0 !important; }

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: #5b657a;
}
.site-footer a { color: var(--text-muted); }

.hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .orb { display: none; }
  .section-card.generating h3::after { animation: none; }
}
