/* 妙笔 网站样式 */
:root {
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
::selection { background: #dbeafe; color: #1e40af; }

/* ===== 导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid #f1f2f4;
}
.nav-inner {
  max-width: 1152px; margin: 0 auto; padding: 0 32px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.btn-primary {
  display: inline-block; padding: 8px 16px; border-radius: 9999px;
  background: var(--accent); color: #fff !important; font-weight: 500;
  font-size: 14px; transition: background .2s;
}
.btn-primary:hover { background: #1d4ed8; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(239,246,255,.55), transparent);
}
.hero-inner {
  max-width: 896px; margin: 0 auto; padding: 112px 32px 144px; text-align: center; position: relative;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 9999px; background: var(--accent-light);
  color: var(--accent); font-size: 12px; font-weight: 500; margin-bottom: 32px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--accent); }
.hero h1 {
  font-size: 60px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 24px;
}
.hero h1 .accent { color: var(--accent); }
.lead { font-size: 20px; color: var(--muted); max-width: 672px; margin: 0 auto 40px; }
.lead br.hide-sm { display: none; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-dark {
  display: inline-block; padding: 14px 32px; border-radius: 9999px;
  background: #111827; color: #fff; font-weight: 500; transition: all .2s;
}
.btn-dark:hover { background: #1f2937; box-shadow: 0 10px 20px rgba(17,24,39,.2); }
.btn-ghost {
  display: inline-block; padding: 14px 32px; border-radius: 9999px;
  background: #fff; border: 1px solid var(--line); color: #374151; font-weight: 500; transition: all .2s;
}
.btn-ghost:hover { border-color: #d1d5db; background: #f9fafb; }

/* ===== 区块通用 ===== */
.section { max-width: 1152px; margin: 0 auto; padding: 96px 32px; }
.section-head { text-align: center; margin-bottom: 64px; }
.section-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
.section.alt { background: #f9fafb; max-width: none; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.card {
  padding: 32px; border-radius: 16px; border: 1px solid var(--line);
  transition: all .2s;
}
.card:hover { border-color: #bfdbfe; box-shadow: 0 10px 30px rgba(37,99,235,.06); }
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-light); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 20px; }
.card:hover .card-icon { transform: scale(1.1); transition: transform .2s; }
.card h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.card p { color: var(--muted); font-size: 14px; margin: 0; line-height: 1.7; }

.step-num {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 16px;
  background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: var(--accent); box-shadow: 0 4px 8px rgba(15,23,42,.06);
}

/* ===== CTA / Footer ===== */
.cta { max-width: 896px; margin: 0 auto; padding: 96px 32px; text-align: center; }
.cta h2 { font-size: 30px; font-weight: 700; margin: 0 0 16px; }
.cta p { color: var(--muted); font-size: 18px; margin: 0 0 32px; }
.footer { border-top: 1px solid var(--line); padding: 32px; text-align: center; font-size: 14px; color: #9ca3af; }

/* ===== Demo 页 ===== */
.main-demo { max-width: 896px; margin: 0 auto; padding: 48px 32px; }
.main-demo h1 { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 40px; }
.demo-box textarea {
  width: 100%; height: 208px; padding: 20px; border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px; line-height: 1.7; resize: vertical;
  transition: all .2s;
}
.demo-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
.demo-actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.strictness-select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
  background: #fff; cursor: pointer; transition: all .2s;
}
.strictness-select:focus { outline: none; border-color: var(--accent); }
.result-stats { padding: 12px 20px; background: #f9fafb; border-top: 1px solid var(--line); font-size: 14px; }
.stat-item { margin-right: 16px; color: var(--muted); }
.stat-item.typo { color: #991b1b; }
.stat-item.grammar { color: #9a3412; }
.stat-item.punctuation { color: #1e40af; }
.demo-actions .btn-dark:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; box-shadow:none; }
.btn-text { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 8px 0; }
.btn-text:hover { color: var(--ink); }
.result-box { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 32px; }
.result-head { padding: 12px 20px; background: #f9fafb; border-bottom: 1px solid var(--line); }
.result-head h2 { margin: 0; font-size: 14px; font-weight: 500; color: #374151; }
.result-list { margin: 0; }
.error-item { padding: 16px 20px; border-top: 1px solid #f4f5f7; display: flex; gap: 16px; }
.tag {
  flex-shrink: 0; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500;
  align-self: flex-start;
}
.tag-typo { background: #fee2e2; color: #991b1b; }
.tag-grammar { background: #fed7aa; color: #9a3412; }
.tag-punctuation { background: #dbeafe; color: #1e40af; }
.error-body { min-width: 0; flex: 1; }
.error-body .msg { font-size: 14px; font-weight: 500; margin: 0 0 4px; }
.error-body .orig { font-size: 14px; color: var(--muted); margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.error-body .sugg { font-size: 14px; color: #059669; margin: 0; }
.ok-box { padding: 32px; border: 1px solid #d1fae5; border-radius: 12px; background: #ecfdf5; text-align: center; margin-top: 32px; }
.ok-box p { margin: 0; color: #047857; font-weight: 500; }
.examples { margin-top: 48px; padding: 24px; border-radius: 12px; background: #f9fafb; }
.examples h3 { margin: 0 0 16px; font-size: 14px; font-weight: 500; color: var(--muted); }
.example-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.example-btn {
  text-align: left; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; cursor: pointer; transition: all .2s;
}
.example-btn:hover { border-color: #d1d5db; box-shadow: 0 2px 6px rgba(15,23,42,.05); }
.example-btn span { display: block; color: #9ca3af; font-size: 12px; margin-top: 4px; }

/* API 说明 */
.api-info { margin-top: 48px; padding: 24px; border-radius: 12px; background: #f9fafb; }
.api-info h3 { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: var(--muted); }
.api-info p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.api-info code { background: #fff; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.api-info pre { background: #1a1a2e; color: #e5e7eb; padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-x: auto; margin: 0; }

/* 输入高亮错误（demo 简单标注） */
.marked-error { border-bottom: 3px wavy #ef4444; cursor: pointer; }
.alert-box { padding: 16px 20px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; margin-top: 32px; font-size: 14px; }

@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .example-grid { grid-template-columns: 1fr; }
  .hero-inner { padding-top: 72px; padding-bottom: 96px; }
  .lead br.hide-sm { display: inline; }
}