:root {
  --accent: #F05138;
  --accent-soft: #F0513820;
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --text: #1d1d1f;
  --text-dim: #6e6e73;
  --text-zh: #4a4a52;
  --border: #e5e5ea;
  --code-bg: #f5f5f7;
  --code-text: #1d1d1f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0f;
    --bg-alt: #15151a;
    --text: #f5f5f7;
    --text-dim: #9a9aa3;
    --text-zh: #b8b8c0;
    --border: #2a2a30;
    --code-bg: #16161b;
    --code-text: #e8e8ec;
    --accent-soft: #F0513833;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Hiragino Sans", "Noto Sans CJK TC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  border: 1px solid var(--border);
  margin: 16px 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.88em;
  line-height: 1.55;
  color: inherit;
}

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.8rem;
  margin-top: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4em;
}

h3 {
  font-size: 1.2rem;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

h2 .zh, h3 .zh {
  color: var(--text-zh);
  font-weight: 500;
  font-size: 0.7em;
  margin-left: 0.4em;
}

p.zh-p {
  color: var(--text-zh);
  margin-top: -0.4em;
}

.dim { color: var(--text-dim); font-weight: normal; }

.note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 12px 0;
}
.note.zh-p { margin-top: 4px; }

/* Hero */
.hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 60px 0 48px;
  text-align: center;
}

.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

.hero h1 {
  font-size: 2.6rem;
  margin: 18px 0 4px;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 1.15rem;
  margin: 8px 0 4px;
  font-weight: 500;
}

.tagline-zh {
  font-size: 1.05rem;
  color: var(--text-zh);
  margin: 0 0 8px;
}

.subtagline {
  color: var(--text-dim);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 20px 0 28px;
}
.badges img { vertical-align: middle; }

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover {
  background: var(--bg);
  text-decoration: none;
  border-color: var(--text-dim);
}
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.primary:hover {
  background: #d8442d;
  border-color: #d8442d;
}

/* Sections */
section {
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

/* Features grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.feature {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.feature h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--accent);
}
.feature p { margin: 6px 0; font-size: 0.93rem; }
.feature p.zh-p { font-size: 0.88rem; }

/* API grid */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.api-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.api-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--accent);
}
.api-card pre {
  margin: 0;
  font-size: 0.85em;
}

/* Compat table */
table.compat {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}
table.compat th,
table.compat td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
table.compat thead {
  background: var(--bg-alt);
}
table.compat th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* Footer */
footer {
  padding: 40px 0 32px;
  text-align: center;
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-bottom: 16px;
}
.footer-links a { font-size: 0.95rem; }
.footer-meta {
  margin: 0;
  font-size: 0.88rem;
}

/* What's new in 2.0 */
.whats-new {
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 70%);
  border-radius: 16px;
  padding: 36px 28px 44px;
  margin: 32px auto;
  border: 1px solid var(--border);
}

.whats-new-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.whats-new h2 {
  border-bottom: none;
  padding-bottom: 0;
  font-size: 2rem;
}

.lead {
  font-size: 1.05rem;
  margin: 12px 0;
  max-width: 760px;
}
.lead.zh-p { margin-top: 4px; }

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0 36px;
}

.highlight {
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.highlight h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: var(--text);
}
.highlight p {
  margin: 6px 0;
  font-size: 0.92rem;
}
.highlight p.zh-p {
  font-size: 0.87rem;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 24px;
}
.compare-col h4 {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.compare-old h4::before {
  content: "↩ ";
  color: var(--text-dim);
}
.compare-new h4 {
  color: var(--accent);
}
.compare-new h4::before {
  content: "→ ";
}
.compare-col pre {
  margin: 0;
  font-size: 0.82em;
  height: 100%;
}
.compare-new pre {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 8px;
}
.cta-note {
  color: var(--text-dim);
  font-size: 0.88rem;
  flex: 1;
  min-width: 220px;
}

@media (max-width: 720px) {
  .compare { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 600px) {
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 2rem; }
  .tagline { font-size: 1rem; }
  h2 { font-size: 1.5rem; }
  section { padding: 40px 0; }
  pre { padding: 12px 14px; font-size: 0.85em; }
  .whats-new { padding: 28px 20px 32px; margin: 20px 12px; }
  .whats-new h2 { font-size: 1.6rem; }
}
