:root {
  --bg: #f4efe7;
  --paper: #fffdf8;
  --ink: #182025;
  --muted: #58616a;
  --line: #d9cfc0;
  --accent: #165d59;
  --accent-2: #c66b3d;
  --danger: #9f2f2f;
  --shadow: 0 18px 40px rgba(24, 32, 37, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(198, 107, 61, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(22, 93, 89, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f4ec 0%, var(--bg) 100%);
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
  background: rgba(24, 32, 37, 0.08);
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.hero {
  padding: 28px 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.panel {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 1.2rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.job-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.job-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.job-form label:first-child {
  grid-column: 1 / -1;
}

.job-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
}

button,
.result-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

button:hover,
.result-links a:hover {
  transform: translateY(-1px);
}

#submit-button {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--accent) 0%, #1f7b76 100%);
  color: white;
  font-weight: 700;
}

.ghost {
  background: rgba(24, 32, 37, 0.06);
  color: var(--ink);
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.status-card {
  padding: 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(24, 32, 37, 0.08);
}

.status-card .label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.status-card strong {
  font-size: 1rem;
  word-break: break-all;
}

.error {
  margin: 16px 0 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(159, 47, 47, 0.08);
  color: var(--danger);
  white-space: pre-wrap;
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.result-links a {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.result-links a.disabled {
  opacity: 0.45;
  pointer-events: none;
}

#html-link {
  background: linear-gradient(135deg, var(--accent-2) 0%, #d38d51 100%);
  color: white;
  border: none;
}

#html-preview {
  width: 100%;
  min-height: 720px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.hidden {
  display: none;
}

@media (max-width: 780px) {
  .page {
    width: min(100%, calc(100% - 20px));
    padding: 20px 0 40px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .job-form,
  .status-grid {
    grid-template-columns: 1fr;
  }

  #html-preview {
    min-height: 480px;
  }
}
