:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #1B5B8F;
  --accent-2: #2f7fc0;
  --accent-soft: #E9F6FD;
  --card: #ffffff;
  --border: rgba(0, 0, 0, .08);
  --nav-bg: rgba(255, 255, 255, .72);
  --code-bg: #1d1d1f;
  --code-text: #f5f5f7;
  --shadow: 0 4px 24px rgba(0, 0, 0, .06);
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #0b0b0e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #6db3e8;
    --accent-2: #8fc7f2;
    --accent-soft: #10232f;
    --card: #131316;
    --border: rgba(255, 255, 255, .1);
    --nav-bg: rgba(10, 10, 12, .68);
    --code-bg: #101014;
    --code-text: #e8e8ed;
    --shadow: 0 4px 24px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #0b0b0e;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --accent: #6db3e8;
  --accent-2: #8fc7f2;
  --accent-soft: #10232f;
  --card: #131316;
  --border: rgba(255, 255, 255, .1);
  --nav-bg: rgba(10, 10, 12, .68);
  --code-bg: #101014;
  --code-text: #e8e8ed;
  --shadow: 0 4px 24px rgba(0, 0, 0, .5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
code, pre { font-family: var(--mono); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.container.narrow { max-width: 760px; }

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.12; font-weight: 700; }
h1 { font-size: clamp(40px, 7vw, 76px); }
h2 { font-size: clamp(28px, 4.6vw, 48px); }
h3 { font-size: 19px; }

.lead { color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); max-width: 640px; margin: 14px auto 0; }
.hint { color: var(--muted); font-size: 15px; margin-top: 28px; text-align: center; }

.section { padding: clamp(72px, 10vw, 128px) 0; text-align: center; }
.section.alt { background: var(--bg-alt); }
.section h2 + .lead { margin-bottom: clamp(40px, 6vw, 64px); }

.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(27, 91, 143, .25); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 18px; font-size: 14px; line-height: 1.2; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; vertical-align: middle;
}

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 16px rgba(0, 0, 0, .05); }
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 22px;
  height: 58px; display: flex; align-items: center; gap: 16px;
}
.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 46px; width: auto; }
.nav-links { display: flex; gap: 3px; margin-left: auto; min-width: 0; }
.nav-links a {
  padding: 7px 11px; border-radius: 999px; font-size: 13.5px; line-height: 1.2; color: var(--muted);
  white-space: nowrap; transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--bg-alt); }
.nav-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.nav-links + .nav-tools { margin-left: 14px; }

.lang-switch { display: flex; align-items: stretch; height: 34px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 600; line-height: 1; padding: 0 11px;
  transition: background .2s ease, color .2s ease;
}
.lang-btn.active { background: var(--accent); color: #fff; }
.lang-btn:not(.active):hover { color: var(--text); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  transition: border-color .2s ease, transform .2s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .ic { width: 18px; height: 18px; }
.burger { display: none; }

:root[data-theme="dark"] #theme-toggle .ic use { }
#theme-toggle .ic { transition: transform .4s ease; }
#theme-toggle:hover .ic { transform: rotate(-20deg); }

.hero { padding: clamp(120px, 16vh, 170px) 0 clamp(40px, 6vw, 70px); text-align: center; position: relative; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(460px, 78vw); height: auto; margin-bottom: 34px; filter: drop-shadow(0 18px 44px rgba(27, 91, 143, .18)); }
.hero .badge { margin-bottom: 22px; }
.hero h1 { max-width: 820px; }
.hero-sub { color: var(--muted); font-size: clamp(18px, 2.6vw, 23px); max-width: 640px; margin: 20px auto 0; }
.hero-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; justify-content: center; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: clamp(60px, 9vw, 96px);
}
.stat {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 28px 18px; text-align: center;
}
.stat b { display: block; font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -.02em; color: var(--accent); }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: left; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }

.feat-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 16px;
}
.feat h3, .app h3, .dev h3 { margin-bottom: 8px; }
.feat p, .app p, .dev p { color: var(--muted); font-size: 15px; }

.app-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 16px; margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(145deg, hsl(var(--hue, 205) 70% 52%), hsl(calc(var(--hue, 205) + 30) 72% 40%));
  box-shadow: 0 8px 18px hsl(var(--hue, 205) 70% 40% / .35);
}
.app-ic .ic { width: 26px; height: 26px; stroke-width: 1.7; }
.app:nth-child(1) .app-ic { --hue: 205; }
.app:nth-child(2) .app-ic { --hue: 150; }
.app:nth-child(3) .app-ic { --hue: 260; }
.app:nth-child(4) .app-ic { --hue: 20; }
.app:nth-child(5) .app-ic { --hue: 330; }
.app:nth-child(6) .app-ic { --hue: 190; }
.app:nth-child(7) .app-ic { --hue: 230; }
.app:nth-child(8) .app-ic { --hue: 45; }
.app:nth-child(9) .app-ic { --hue: 100; }

.design-wrap { display: grid; grid-template-columns: 340px 1fr; gap: clamp(40px, 7vw, 90px); align-items: center; text-align: left; }
.phone-col { display: flex; justify-content: center; }
.phone {
  width: 272px; aspect-ratio: 9 / 18.5;
  border-radius: 42px; padding: 10px;
  background: linear-gradient(160deg, #2b2b30, #0c0c0e);
  box-shadow: 0 30px 70px rgba(11, 50, 81, .35), inset 0 0 2px rgba(255, 255, 255, .4);
  position: relative;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 20px; border-radius: 999px; background: #0c0c0e; z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 33px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(109, 179, 232, .55), transparent 60%),
    radial-gradient(100% 70% at 85% 30%, rgba(27, 91, 143, .65), transparent 55%),
    radial-gradient(120% 90% at 50% 100%, rgba(11, 50, 81, .9), transparent 60%),
    linear-gradient(180deg, #dff1fb, #9cc9e8 45%, #1B5B8F 100%);
  display: flex; flex-direction: column; padding: 40px 16px 14px;
}
.phone-time { text-align: center; color: rgba(255, 255, 255, .92); font-weight: 600; font-size: 15px; text-shadow: 0 1px 6px rgba(11, 50, 81, .5); margin-bottom: 22px; }
.phone-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-content: start; }
.phone-grid span, .phone-dock span {
  aspect-ratio: 1; border-radius: 30%;
  background: hsl(var(--h) 65% 55% / .82);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .55), 0 3px 8px rgba(11, 50, 81, .25);
}
.phone-dock {
  margin-top: 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: rgba(255, 255, 255, .22); border-radius: 24px; padding: 10px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.design-text h2 { text-align: left; }
.design-text .lead { margin-left: 0; text-align: left; }
.feat-list { margin-top: 34px; display: flex; flex-direction: column; gap: 26px; }
.feat-row { display: flex; gap: 18px; align-items: flex-start; text-align: left; }
.feat-row .feat-ic { margin-bottom: 0; flex-shrink: 0; }
.feat-row h3 { margin-bottom: 5px; }
.feat-row p { color: var(--muted); font-size: 15px; }

.dev-meta { color: var(--muted); font-size: 14.5px; }
.dev-meta code { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 13px; }
.dev-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 12px; }

.install-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 72px); text-align: left; align-items: start; }
.install-wrap h2, .install-wrap .lead { text-align: left; }
.install-wrap .lead { margin-left: 0; }
.steps { list-style: none; counter-reset: st; margin-top: 34px; display: flex; flex-direction: column; gap: 22px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.steps li::before {
  content: counter(st);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 18px;
}
.steps h3 { grid-column: 2; margin-bottom: 4px; }
.steps p { grid-column: 2; color: var(--muted); font-size: 15px; }

.code-col { position: sticky; top: 90px; }
.code-card { border-radius: 18px; overflow: hidden; background: var(--code-bg); box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.code-head span[class^="dot-"] { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.code-title { margin-left: 8px; color: rgba(255, 255, 255, .55); font-size: 13px; }
.copy-btn {
  margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 0;
  background: transparent; color: rgba(255, 255, 255, .55);
  transition: color .2s ease, background .2s ease;
}
.copy-btn:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.copy-btn .ic { width: 15px; height: 15px; }
.code-card pre { padding: 18px 16px; overflow-x: auto; color: var(--code-text); font-size: 13.5px; line-height: 1.75; }
.warn {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 18px; padding: 14px 16px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 500; text-align: left;
}
.warn .ic { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

.soon {
  max-width: 560px; margin: 0 auto; padding: clamp(40px, 6vw, 60px) 32px;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 28px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.soon-ic {
  width: 74px; height: 74px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.soon-ic .ic { width: 32px; height: 32px; }
.soon h3 { font-size: 24px; }
.soon p { color: var(--muted); font-size: 16px; max-width: 420px; }

.builds { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 0 auto; text-align: left; }
.build { display: flex; align-items: center; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.build-main { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.build-main .feat-ic { margin-bottom: 0; }
.sha { margin-top: 8px; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.sha code { cursor: pointer; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.sha code:hover { border-color: var(--accent); color: var(--accent); }

.faq { text-align: left; margin-top: 36px; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 0 22px; overflow: hidden;
  transition: border-color .2s ease;
}
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 19px 34px 19px 0; font-weight: 600; font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -3px; }
.faq details p { padding: 0 0 20px; color: var(--muted); font-size: 15.5px; }

.footer { border-top: 1px solid var(--border); padding: 52px 0; background: var(--bg-alt); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; text-align: left; align-items: start; }
.wordmark { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.footer p, .footer a { color: var(--muted); font-size: 14px; }
.footer-brand p { margin-top: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--accent); }
.footer-meta p { margin-bottom: 6px; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .6, .2, 1), transform .7s cubic-bezier(.2, .6, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .design-wrap { grid-template-columns: 1fr; justify-items: center; }
  .design-text { max-width: 560px; }
  .design-text h2, .design-text .lead { text-align: center; }
  .design-text .lead { margin: 14px auto 0; }
  .feat-row { text-align: left; }
  .install-wrap { grid-template-columns: 1fr; }
  .code-col { position: static; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 1040px) {
  .nav-links {
    display: none; position: absolute; top: 58px; left: 12px; right: 12px;
    flex-direction: column; gap: 2px; padding: 10px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 16px; font-size: 16px; }
  .burger { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-tools { margin-left: auto; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-logo img { height: 40px; }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-cta { flex-direction: column; width: 100%; max-width: 320px; }
  .hero-cta .btn { justify-content: center; }
  .build { flex-direction: column; align-items: stretch; }
  .build .btn { justify-content: center; }
  .phone { width: 232px; }
  .lang-btn { padding: 6px 8px; font-size: 12px; }
}
