:root {
  font-family: "Plus Jakarta Sans", Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e8eef8;
  background: #0a0f1c;
  font-synthesis: none;
  color-scheme: dark;
  --ink: #f1f5f9;
  --body: #aab8cc;
  --muted: #8594ab;
  --line: rgba(148, 163, 184, .17);
  --primary: #818cf8;
  --cyan: #38bdf8;
  --surface: rgba(17, 26, 46, .78);
}

* { box-sizing: border-box; }
html, body, #root { min-height: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(900px 580px at 7% -18%, rgba(14, 165, 233, .15), transparent 72%),
    radial-gradient(900px 600px at 98% -14%, rgba(99, 102, 241, .17), transparent 72%),
    linear-gradient(180deg, #0a0f1c 0%, #080d18 100%);
}
body.platform-home:has(#root)::before,
body.platform-home:has(#root)::after {
  content: "";
  position: fixed;
  z-index: 0;
  top: 88px;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  opacity: .48;
  background-image:
    radial-gradient(ellipse 15px 20px at center, rgba(121, 235, 255, .95), rgba(50, 171, 255, .25) 28%, transparent 70%),
    radial-gradient(ellipse 14px 20px at center, rgba(172, 147, 255, .95), rgba(102, 79, 255, .24) 28%, transparent 70%),
    linear-gradient(180deg, transparent, rgba(70, 210, 255, .7) 60%, transparent),
    linear-gradient(180deg, transparent, rgba(145, 124, 255, .65) 60%, transparent),
    linear-gradient(180deg, transparent, rgba(56, 189, 248, .45) 60%, transparent),
    linear-gradient(180deg, transparent, rgba(89, 225, 255, .55) 55%, transparent),
    linear-gradient(180deg, transparent, rgba(151, 126, 255, .52) 55%, transparent),
    linear-gradient(180deg, transparent, rgba(68, 195, 255, .42) 55%, transparent),
    linear-gradient(180deg, transparent, rgba(135, 177, 255, .5) 55%, transparent),
    linear-gradient(180deg, transparent, rgba(109, 230, 255, .38) 55%, transparent),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(86, 150, 255, .11) 40px, transparent 41px 80px),
    radial-gradient(ellipse at 50% 50%, rgba(23, 93, 171, .16), transparent 70%);
  background-size: 30px 220px, 28px 300px, 2px 220px, 2px 300px, 1px 170px, 1px 210px, 2px 280px, 1px 240px, 2px 190px, 1px 260px, 100% 100%, 100% 100%;
  background-position: 26% 0, 68% -80px, 26% 0, 68% -80px, 88% -120px, 8% -70px, 16% -140px, 39% -20px, 54% -90px, 77% -180px, 0 0, 0 0;
  background-repeat: repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, repeat-y, no-repeat, no-repeat;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 87%, transparent);
  animation: data-fall 10s linear infinite;
}
body.platform-home:has(#root)::after { transform: scaleX(-1); animation-delay: -4s; opacity: .38; }
body.platform-home > .topbar,
body.platform-home > #root { position: relative; z-index: 1; }
@keyframes data-fall {
  to { background-position: 26% 660px, 68% 820px, 26% 660px, 68% 820px, 88% 560px, 8% 560px, 16% 700px, 39% 700px, 54% 480px, 77% 600px, 0 0, 0 0; }
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(56, 189, 248, .68); outline-offset: 4px; }

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1080px) / 2));
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  background: rgba(8, 13, 24, .72);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-name { display: grid; gap: 5px; line-height: 1.1; }
.brand-name small { color: #aab8cc; font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 5px 16px rgba(56, 189, 248, .16));
}
.brand strong { color: #edf3fc; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.top-links { display: flex; align-items: center; gap: 6px; }
.account-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 8px;
  color: #aab8cc;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.account-link:hover { background: rgba(129, 140, 248, .1); color: #c7d2fe; }
.account-link .user-avatar { --avatar-size: 24px; }

main.home-main { position: relative; isolation: isolate; width: min(1080px, calc(100% - 48px)); min-height: calc(100svh - 88px); margin: 0 auto; padding: clamp(28px, 5vh, 48px) 0; display: flex; flex-direction: column; justify-content: center; }
main.home-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 50%;
  width: min(88vw, 840px);
  aspect-ratio: 470 / 420;
  left: 54%;
  transform: translate(-50%, -50%);
  background: url("/assets/china-map.svg?v=20261124-3") center / contain no-repeat;
  opacity: .27;
  filter: saturate(.9);
}
.home-intro { margin: 0 0 22px; text-align: center; }
.home-intro h1 { margin: 0; color: var(--ink); font-size: 32px; font-weight: 750; line-height: 1.18; letter-spacing: -.03em; }
.home-intro p { margin: 8px 0 0; color: var(--body); font-size: 14px; letter-spacing: .04em; }
.home-values { margin: 22px 0 0; color: var(--body); font-size: 14px; text-align: center; letter-spacing: .04em; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(20, 31, 52, .88), var(--surface));
  box-shadow: 0 18px 50px -40px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .035);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.product-visual {
  grid-column: 1 / -1;
  position: relative;
  display: block;
  height: clamp(170px, 22vw, 270px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 63%, var(--glow), transparent 70%), #0b1325;
}
.product-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#93bcff12 1px, transparent 1px), linear-gradient(90deg, #93bcff12 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse, #000, transparent 78%);
}
.product-visual i { position: absolute; display: block; }
.lab { --glow: #0f709a55; }
.lab i {
  top: 50%;
  left: 50%;
  width: 65%;
  height: 46%;
  border: 1px solid #71dbff99;
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-22deg);
  box-shadow: 0 0 20px #38bdf826, inset 0 0 17px #38bdf820;
}
.lab i:nth-child(2) { transform: translate(-50%, -50%) rotate(22deg); }
.lab i:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg) scale(.74); border-color: #818cf899; }
.lab i:nth-child(4) {
  width: 33px; height: 33px; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 32%, #edfdff, #47c8ff 40%, #2762d6 84%);
  box-shadow: 0 0 38px #38bdf8a0;
}
.lab i:nth-child(5) { width: 7px; height: 7px; left: 72%; top: 29%; background: #b4ecff; }
.graph { --glow: #4136a567; }
.graph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 25deg at 50% 50%, #9296fd8c 0 1deg, transparent 1deg 87deg, #9296fd8c 87deg 88deg, transparent 88deg 184deg, #9296fd8c 184deg 185deg, transparent 185deg 276deg, #9296fd8c 276deg 277deg, transparent 277deg);
  mask-image: radial-gradient(ellipse, #000 15%, transparent 70%);
}
.graph i, .lab i:nth-child(5) { border-radius: 50%; box-shadow: 0 0 19px #7c9dffbb; }
.graph i { z-index: 1; width: 12px; height: 12px; background: #abaeff; }
.graph i:nth-child(1) { left: calc(50% - 11px); top: calc(50% - 11px); width: 22px; height: 22px; background: #e2e5ff; }
.graph i:nth-child(2) { left: 57%; top: 18%; }
.graph i:nth-child(3) { left: 76%; top: 69%; background: #77dcff; }
.graph i:nth-child(4) { left: 41%; top: 76%; }
.graph i:nth-child(5) { left: 28%; top: 26%; background: #77dcff; }
.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, .42);
  background: linear-gradient(145deg, rgba(25, 38, 64, .96), rgba(15, 24, 42, .92));
  box-shadow: 0 20px 55px -38px rgba(56, 189, 248, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.product-copy { display: grid; gap: 7px; padding: 22px; }
h2 { margin: 0; color: #eef3fb; font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
.product-description { color: var(--body); font-size: 13px; line-height: 1.6; }
.product-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(129, 140, 248, .2);
  border-radius: 9px;
  background: rgba(99, 102, 241, .12);
  color: #a5b4fc;
  font-size: 15px;
  margin-right: 22px;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.product-card:hover .product-arrow {
  transform: translate(2px, -2px);
  background: rgba(56, 189, 248, .15);
  color: #7dd3fc;
}
@keyframes home-enter {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes home-glow {
  0%, 100% { opacity: .75; }
  50% { opacity: 1; }
}
.home-intro { animation: home-enter .55s ease-out both; }
.product-card { animation: home-enter .6s ease-out .08s both; }
.product-card:nth-child(2) { animation-delay: .16s; }
.home-values { animation: home-enter .6s ease-out .24s both; }
.product-visual::before { animation: home-glow 5s ease-in-out infinite; }
.auth-main { align-items: center; }
.auth-card {
  width: min(470px, 100%);
  padding: clamp(25px, 5vw, 38px);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(18, 28, 48, .94), rgba(11, 18, 32, .94));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .035);
  backdrop-filter: blur(18px);
}
.auth-kicker { color: #7dd3fc; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.auth-heading h1 { margin: 12px 0 7px; color: var(--ink); font-size: 29px; font-weight: 750; letter-spacing: -.035em; }
.auth-heading p { margin: 0; color: var(--body); font-size: 14px; line-height: 1.7; }
.auth-form { display: grid; gap: 17px; margin-top: 26px; }
.auth-field { display: grid; gap: 8px; color: #c7d2e2; font-size: 13px; font-weight: 650; }
.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 12px;
  outline: none;
  background: rgba(5, 11, 22, .62);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-field input:focus { border-color: rgba(56, 189, 248, .7); box-shadow: 0 0 0 3px rgba(56, 189, 248, .12); }
.auth-submit {
  min-height: 49px;
  margin-top: 2px;
  border: 1px solid rgba(125, 211, 252, .42);
  border-radius: 12px;
  background: linear-gradient(120deg, #8de0ee, #9aaeff);
  color: #0b1424;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.06); }
.auth-switch { margin: 21px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-switch a { color: #79d4f2; font-weight: 700; }
.auth-flash { margin: 0 0 18px; padding: 11px 13px; border: 1px solid rgba(248, 113, 113, .25); border-radius: 11px; background: rgba(127, 29, 29, .16); color: #fecaca; font-size: 13px; }
.auth-flash.success { border-color: rgba(52, 211, 153, .25); background: rgba(6, 78, 59, .18); color: #a7f3d0; }
.login-gate-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, .72);
  backdrop-filter: blur(12px);
}
.login-gate-dialog {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid rgba(129, 140, 248, .25);
  border-radius: 22px;
  background: linear-gradient(150deg, #14213a, #0c1425 78%);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .045);
}
.login-gate-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 13px;
  background: rgba(56, 189, 248, .1);
  color: #7dd3fc;
  font-size: 22px;
}
.login-gate-dialog h2 { font-size: 21px; }
.login-gate-dialog p { margin: 9px 0 24px; color: var(--body); font-size: 13px; line-height: 1.7; }
.login-gate-actions { display: flex; justify-content: flex-end; gap: 10px; }
.login-gate-actions button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.login-gate-dismiss { border: 1px solid var(--line); background: rgba(255, 255, 255, .035); color: var(--body); }
.login-gate-submit { border: 1px solid rgba(125, 211, 252, .4); background: linear-gradient(125deg, #46c8f2, #8da4ff); color: #091322; }
@media (max-width: 640px) {
  body.platform-home:has(#root)::before, body.platform-home:has(#root)::after { top: 76px; opacity: .3; }
  .topbar { height: 76px; padding: 0 17px; }
  .brand { gap: 10px; }
  .brand-logo { width: 46px; height: 46px; }
  .brand-name { gap: 4px; }
  .brand-name small { font-size: 9px; }
  .brand strong { font-size: 19px; }
  .top-links { gap: 0; }
  .account-link { padding-inline: 7px; }
  main.home-main { width: min(100% - 34px, 480px); min-height: calc(100svh - 76px); padding: 24px 0; }
  main.home-main::before { width: 105vw; left: 50%; transform: translate(-50%, -50%); opacity: .17; }
  .home-intro { margin-bottom: 16px; }
  .home-intro h1 { font-size: 27px; }
  .products { grid-template-columns: 1fr; gap: 11px; }
  .product-visual { height: 150px; }
  .product-copy { padding: 18px; }
}
@media (max-width: 360px) {
  .topbar { height: auto; min-height: 76px; padding: 10px 12px; flex-wrap: wrap; gap: 4px 8px; }
  .brand { gap: 8px; }
  .brand-logo { width: 42px; height: 42px; }
  .brand-name small { font-size: 8px; }
  .brand strong { font-size: 17px; }
  .top-links { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation: none !important; }
}

/* ===== mobile-opt shell-chrome — pass 2 ===== */
@media (max-width: 480px) {
  .login-gate-actions button { min-height: 44px; }
}

/* Mode switch: learning / development */
.mode-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto 22px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  background: rgba(15, 23, 42, .6);
  backdrop-filter: blur(12px);
}
.mode-switch-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--body);
  font-size: 14px;
  font-weight: 650;
  transition: background .18s ease, color .18s ease;
}
.mode-switch-option:hover { color: var(--ink); background: rgba(148, 163, 184, .1); }
.mode-switch-option.is-active {
  color: #0b1220;
  background: linear-gradient(125deg, #7dd3fc, #a5b4fc);
  box-shadow: 0 6px 18px rgba(56, 189, 248, .18);
}
@media (max-width: 640px) {
  .mode-switch { margin-bottom: 16px; }
  .mode-switch-option { min-height: 44px; padding: 0 16px; font-size: 13px; }
}
