:root {
  --bg: #f4f7f1;
  --bg-accent: #d7f8d0;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --text: #16331f;
  --muted: #5a6d60;
  --line: rgba(22, 51, 31, 0.12);
  --primary: #12b95f;
  --primary-dark: #06914a;
  --secondary: #ffb64d;
  --danger: #d64d4d;
  --shadow: 0 22px 50px rgba(30, 64, 43, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(18, 185, 95, 0.2), transparent 35%),
    radial-gradient(circle at top right, rgba(255, 182, 77, 0.28), transparent 28%),
    linear-gradient(180deg, var(--bg-accent), var(--bg));
  min-height: 100vh;
}

.page-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding: 6px 0 0;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.beian-link:hover {
  color: var(--primary-dark);
  border-color: rgba(18, 185, 95, 0.28);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(30, 64, 43, 0.08);
  transform: translateY(-1px);
}

.beian-link:focus-visible {
  outline: none;
  border-color: rgba(18, 185, 95, 0.55);
  box-shadow: 0 0 0 4px rgba(18, 185, 95, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.hero-panel,
.panel {
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -48px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(18, 185, 95, 0.18), rgba(255, 182, 77, 0.18));
  transform: rotate(18deg);
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-dark);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.95;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 42rem;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-panel {
  padding: 24px;
  display: grid;
  gap: 14px;
}

.hero-stat {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-value {
  display: block;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
}

.dashboard {
  display: grid;
  gap: 22px;
}

.panel {
  padding: 24px;
}

.panel-input {
  position: relative;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 24px;
}

.field {
  display: grid;
  gap: 10px;
}

.field-label {
  color: var(--muted);
  font-size: 14px;
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(18, 185, 95, 0.65);
  box-shadow: 0 0 0 4px rgba(18, 185, 95, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.65;
}

.option-row,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 16px;
  align-items: center;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.checkbox input {
  accent-color: var(--primary);
}

.primary-button,
.ghost-button,
.link-button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-button:hover,
.ghost-button:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 16px 28px rgba(18, 185, 95, 0.25);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border: 1px solid var(--line);
}

.link-button {
  display: inline-flex;
  text-decoration: none;
  background: linear-gradient(135deg, var(--secondary), #ffce5f);
  color: #2c2108;
}

.status-bar {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(18, 185, 95, 0.08);
  color: var(--primary-dark);
  min-height: 52px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.summary-card,
.download-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
  margin-bottom: 16px;
}

.summary-card h3,
.download-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.summary-meta,
.download-meta {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.resource-picker {
  margin-bottom: 16px;
}

.json-view {
  margin: 12px 0 0;
  padding: 18px;
  min-height: 220px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(22, 51, 31, 0.1);
  background: #13221a;
  color: #dcf6e4;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
}

.json-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  padding: 14px 16px;
}

.json-section summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.json-section summary::-webkit-details-marker {
  display: none;
}

.json-section summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--primary-dark);
  transition: transform 0.18s ease;
}

.json-section[open] summary::before {
  transform: rotate(90deg);
}

.empty-state {
  color: var(--muted);
}

.hidden {
  display: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(18, 185, 95, 0.1);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.cover-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-top: 14px;
}

@media (max-width: 920px) {
  .hero,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 18px, 1180px);
    padding-top: 18px;
  }

  .site-footer {
    margin-top: 22px;
  }

  .beian-link {
    width: 100%;
    text-align: center;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    border-radius: 22px;
  }
}
