:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0284c7;
  --warn: #fbbf24;
  --ok: #34d399;
}

* { box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
.container { max-width: 1120px; margin: 0 auto; padding: 2rem 1.25rem; }

header { text-align: center; margin-bottom: 2rem; }
.badge { display: inline-block; background: rgba(56, 189, 248, 0.15); color: var(--accent); padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
h1 { margin: 0.25rem 0; font-size: 2.25rem; }
header p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
h2 { margin-top: 0; font-size: 1.2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; }

.row { display: flex; gap: 1rem; align-items: flex-end; }
.row .field { flex: 1; }
.field { margin-bottom: 1rem; }
label { display: block; font-size: 0.88rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 600; }

select, input, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); padding: 0.65rem; border-radius: 8px; font-size: 0.95rem;
}
textarea { font-family: 'Consolas', 'Courier New', monospace; resize: vertical; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.btn-primary, .btn-secondary {
  width: 100%; padding: 0.75rem; border: none; border-radius: 8px;
  font-weight: 600; cursor: pointer; font-size: 0.95rem; transition: 0.2s;
}
.btn-primary { background: var(--accent); color: #0f172a; margin-top: 0.5rem; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary { background: #334155; color: var(--text); }
.btn-secondary:hover { background: #475569; }

.api-box { background: rgba(15, 23, 42, 0.6); border: 1px dashed var(--border); padding: 0.75rem; border-radius: 8px; margin-bottom: 1rem; }
.api-box summary { cursor: pointer; font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.hint-text { font-size: 0.8rem; color: var(--muted); margin: 0.5rem 0; }

.status-idle, .status-hybrid, .status-ai {
  display: inline-block; padding: 0.3rem 0.7rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; margin-bottom: 1rem;
}
.status-idle { background: #334155; color: var(--muted); }
.status-hybrid { background: rgba(251, 191, 36, 0.15); color: var(--warn); }
.status-ai { background: rgba(52, 211, 153, 0.15); color: var(--ok); }

.hint-card { background: var(--bg); border-left: 4px solid var(--accent); padding: 1rem; border-radius: 6px; margin-bottom: 0.9rem; }
.hint-card h3 { margin: 0 0 0.4rem 0; font-size: 1rem; color: var(--accent); }
.hint-card p { margin: 0.3rem 0; font-size: 0.92rem; }
.question { color: var(--warn); font-style: italic; margin-top: 0.5rem !important; }
.empty-state { color: var(--muted); font-size: 0.95rem; }