:root {
  /* 品牌蓝渐变（深 → 浅科技蓝） */
  --brand-blue-dark: #1D4ED8;
  --brand-blue-light: #3B82F6;
  /* 绿色 CTA */
  --cta: #16a34a;
  --cta-hover: #15803d;
  /* 背景与文字 */
  --bg: #f4f6f9;
  --panel: #ffffff;
  --border: #e2e8f0;
  --text: #111827;
  --text-strong: #000000;
  --muted: #4b5563;
  /* 状态色 */
  --pass: #16a34a;
  --warning: #d97706;
  --fail: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* 顶部区域：从深到浅的科技蓝大面积渐变 */
.header {
  margin: 0 -1.25rem 0;
  padding: 3rem 1.25rem 2.75rem;
  background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue-light) 100%);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.25);
}

.header h1 {
  margin: 0 0 0.6rem;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.subtitle {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 0.98rem;
}

.subtitle strong {
  color: #ffffff;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1.25rem;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.config {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* 主行动按钮：亮绿色 CTA */
#submitBtn {
  margin-top: 1rem;
  background: var(--cta);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.75rem;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
  transition: background 0.15s ease, transform 0.05s ease;
}

#submitBtn:hover {
  background: var(--cta-hover);
}

#submitBtn:active {
  transform: translateY(1px);
}

#submitBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.status {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* 导入测试案例栏 */
.demo-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.9rem;
  background: rgba(59, 130, 246, 0.06);
  border: 1px dashed var(--brand-blue-light);
  border-radius: 8px;
}

.demo-bar .demo-label {
  flex-direction: row;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-blue-dark);
}

.demo-bar select {
  flex: 1 1 240px;
  min-width: 200px;
}

/* 次要按钮：导入 */
button.secondary {
  background: #fff;
  color: var(--brand-blue-dark);
  border: 1px solid var(--brand-blue-light);
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

button.secondary:hover {
  background: rgba(59, 130, 246, 0.1);
}

.hidden {
  display: none !important;
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.metric .label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.metric .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-strong);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.pass {
  background: rgba(22, 163, 74, 0.12);
  color: var(--pass);
}

.badge.warning {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

.badge.fail {
  background: rgba(220, 38, 38, 0.12);
  color: var(--fail);
}

.summary-text {
  color: var(--muted);
  line-height: 1.6;
}

h2,
h3 {
  color: var(--text-strong);
}

.issue-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
  background: #f9fafb;
}

.issue-card .head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.severity {
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.severity.high {
  background: rgba(220, 38, 38, 0.15);
  color: var(--fail);
}

.severity.medium {
  background: rgba(217, 119, 6, 0.15);
  color: var(--warning);
}

.severity.low {
  background: rgba(75, 85, 99, 0.12);
  color: var(--muted);
}

.issue-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.raw-json pre {
  background: #f3f4f6;
  color: var(--text);
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
  font-size: 0.8rem;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2rem;
}
