:root {
  --bg: #0b1020;
  --panel: #0f172a;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --code-bg: #0a0f1a;
  --table-stripe: #0c1426;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app-header {
  height: 64px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: #0c1430;
}
.brand-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}
.container {
  max-width: 1080px;
  margin: 28px auto;
  padding: 0 20px;
}
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}
.sidebar { height: 100%; }
.content { width: 100%; }
.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.history-item:hover { background: var(--table-stripe); }
.history-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.history-time { font-size: 12px; color: var(--muted); }
.block-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: flex-end;
}
.btn.small { padding: 6px 10px; font-size: 12px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
}
.panel-title {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.panel-body {
  padding: 16px;
}
.input-area {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  background: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.suggestions { margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  background: var(--panel);
}
.chip:hover { background: var(--table-stripe); }
.label { color: var(--muted); font-size: 12px; margin-right: 8px; }
.select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 120px;
}
.btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.results { display: block; }
.result-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  background: var(--panel);
}
.result-block h2 {
  margin: 0 0 12px 0;
  font-size: 16px;
}
.subsection-title {
  margin: 14px 0 8px 0;
  font-size: 13px;
  color: var(--muted);
}
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}
thead th {
  text-align: left;
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
  color: var(--muted);
}
tbody td {
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
}
tbody tr:nth-child(odd) { background: var(--table-stripe); }
