:root {
  --accent: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-dim: rgba(139, 92, 246, 0.16);
  --teal: #14b8a6;
  --bg: #151c2e;
  --surface: #1b2438;
  --surface2: #243049;
  --text: #f8fafc;
  --text-secondary: #b4c0d4;
  --text-tertiary: #8494ad;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --max-width: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.lang-en .lang-zh {
  display: none !important;
}

html.lang-zh .lang-en {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(21, 28, 46, 0.88);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.9rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 20px 48px;
  text-align: center;
}

.hero-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  margin: 0 auto 24px;
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.35);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
}

.hero .tagline {
  margin: 0 0 8px;
  font-size: 1.25rem;
  background: linear-gradient(120deg, var(--accent-light), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

.hero .lead {
  max-width: 540px;
  margin: 16px auto 28px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.4);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 20px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.84rem;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 10px !important;
}

.site-footer-links a {
  color: var(--text-secondary);
}

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.legal-lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.legal-lang-switch button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.legal-lang-switch button.is-active,
.legal-lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

.legal-page h1 {
  margin-top: 0;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}

.legal-page h2 {
  margin-top: 2em;
  font-size: 1.2rem;
}

.legal-h3 {
  margin-top: 1.25em;
  font-size: 1.02rem;
  color: var(--text);
}

.legal-meta {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.legal-callout {
  background: var(--accent-dim);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 20px 0 28px;
}

.legal-callout p {
  margin: 0;
  color: var(--text-secondary);
}

.legal-page ul {
  padding-left: 1.2em;
  color: var(--text-secondary);
}

.legal-page p,
.legal-page li {
  color: var(--text-secondary);
}

.legal-page code {
  font-size: 0.88em;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--accent-light);
}

html.lang-en article.lang-zh,
html.lang-zh article.lang-en {
  display: none;
}
