:root {
  --bg: #0b0b10;
  --bg-raised: #15151d;
  --bg-card: #1b1b25;
  --line: #2a2a38;
  --text: #ecebf3;
  --text-dim: #a4a3b5;
  --accent-a: #9945ff;
  --accent-b: #14f195;
  --accent: #b98cff;
  --radius: 18px;
  --gutter: 20px;
  --max: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: #d7beff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Language switching: both languages are in the page; the root's data-lang picks one. */
[data-lang="en"] [lang="zh"], [data-lang="zh"] [lang="en"] { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #0b0b10;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.nav a:hover { color: var(--text); }
.lang-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
@media (max-width: 640px) { .nav a.optional { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 15px; border: 1px solid var(--line); color: var(--text);
}
.btn.primary { background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); color: #0b0b10; border: none; }
.btn.primary:hover { color: #0b0b10; filter: brightness(1.08); }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70vw; height: 70vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(circle, rgba(153, 69, 255, 0.25), transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; position: relative; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin-bottom: 18px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-b); }
h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; }
h1 .grad { background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--text-dim); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(100%, 340px); height: auto; filter: drop-shadow(0 30px 60px rgba(153, 69, 255, 0.25)); }

/* Sections */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
.eyebrow { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-b); margin: 0 0 10px; }
h2 { font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 18px; letter-spacing: -0.01em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--text-dim); font-size: 15px; }
.card .icon { font-size: 22px; margin-bottom: 10px; display: block; }

/* Skins gallery */
.skins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 860px) { .skins { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .skins { grid-template-columns: repeat(2, 1fr); } }
.skin { background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.skin svg { display: block; width: 100%; height: auto; }
.skin span { display: block; padding: 8px 12px; font-size: 14px; color: var(--text-dim); }

.note { color: var(--text-dim); font-size: 15px; }
.callout { background: var(--bg-raised); border: 1px solid var(--line); border-left: 3px solid var(--accent-b); border-radius: 12px; padding: 18px 20px; }

/* Legal pages */
.doc { padding: 48px 0 64px; max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc .meta { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; }
.doc p, .doc li { color: #d6d5e2; }
.doc ul { padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--text-dim); font-weight: 600; width: 30%; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--text-dim); font-size: 14px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 12px; }
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--text); }
.fineprint { font-size: 13px; color: #7e7d90; max-width: 60em; }
