:root {
  --header-h: 76px;
  --max: 1180px;
  --hero-h: 82vh;
  --ink: #0f172a;
  --ink-soft: #5b6478;
  --line: #dbe3f5;
  --accent: #4f7cff;
  --accent-2: #22d3ee;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: rgba(7, 11, 24, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 11, 24, 0.88);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

.header-inner {
  width: 100%;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  flex-shrink: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-badge {
  position: absolute;
  top: 1px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff4d67;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(7, 11, 24, 0.6);
}

.nav-badge[hidden] {
  display: none;
}

.nav-icon {
  width: 22px;
  height: 22px;
  opacity: 0.95;
}

button.nav-link {
  border: 0;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

button.nav-link:hover,
button.nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

#home {
  background: url("../assets/bg.webp") center no-repeat #070b18;
  background-size: auto 100%;
}
/* ---------- 首屏大背景图 ---------- */
.hero {
  position: relative;
  min-height: var(--hero-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 40px) 24px 72px;
  color: #fff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* background: linear-gradient(
    180deg,
    rgba(4, 8, 20, 0.55) 0%,
    rgba(4, 8, 20, 0.18) 42%,
    rgba(4, 8, 20, 0.72) 100%
  ); */
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 820px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  font-weight: 800;
  text-shadow: 0 8px 40px rgba(2, 6, 23, 0.5);
}

.hero-sub {
  max-width: 600px;
  margin: 22px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.95rem, 1.6vw, 1.125rem);
  line-height: 1.75;
  text-wrap: balance;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 34px;
  padding: 15px 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 38px rgba(79, 124, 255, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 46px rgba(79, 124, 255, 0.48);
}

.hero-cta:active {
  transform: translateY(0);
}

/* ---------- 下载区 ---------- */
.download {
  padding: 78px 24px 90px;
  /* background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 62%); */
  /* background: url(../assets/bg_b.png) center repeat; */
  margin-top: -34vh;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  letter-spacing: 0.01em;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.dl-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 270px;
  max-width: 320px;
  min-height: 76px;
  padding: 16px 24px;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dl-btn:hover,
.dl-btn:focus-visible {
  transform: translateY(-3px);
}

.dl-btn:active {
  transform: translateY(0);
}

.dl-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 32px rgba(79, 124, 255, 0.3);
}

.dl-primary:hover,
.dl-primary:focus-visible {
  box-shadow: 0 20px 42px rgba(79, 124, 255, 0.4);
}

.dl-secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.dl-secondary:hover,
.dl-secondary:focus-visible {
  border-color: #b9c8ec;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.dl-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
}

.dl-icon svg {
  width: 24px;
  height: 24px;
}

.dl-primary .dl-icon {
  background: rgba(255, 255, 255, 0.18);
}

.dl-secondary .dl-icon {
  background: #eef3ff;
  color: #3f63db;
}

.dl-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.dl-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.dl-meta {
  font-size: 12.5px;
  line-height: 1.3;
  opacity: 0.75;
}

/* ---------- 公告弹框 ---------- */
html.is-locked,
html.is-locked body {
  overflow: hidden;
}

.notice-dialog {
  width: min(720px, calc(100vw - 40px));
  max-width: none;
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(2, 6, 23, 0.5);
}

.notice-dialog[open] {
  animation: notice-pop 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.notice-dialog::backdrop {
  background: rgba(4, 8, 20, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.notice-scroll {
  max-height: min(88vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notice-media {
  margin: 0;
  background: #0b1430;
}

.notice-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.notice-body {
  padding: 30px 36px 36px;
}

.notice-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.notice-title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.notice-text {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.notice-date {
  margin: 20px 0 0;
  color: #8a93a8;
  font-size: 13px;
}

.notice-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 11, 24, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.notice-close:hover {
  background: rgba(7, 11, 24, 0.82);
  transform: scale(1.06);
}

.notice-close:focus-visible {
  outline-color: #fff;
}

@keyframes notice-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  padding: 26px 24px;
  background: #070b18;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

/* ---------- 键盘可访问性 ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #8fb3ff;
  outline-offset: 3px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 20px;
    background: rgba(7, 11, 24, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 40px rgba(2, 6, 23, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-link {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 16px;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 68px;
    --hero-h: 76vh;
  }

  .header-inner {
    padding: 0 16px;
    gap: 12px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-name {
    font-size: 13px;
  }

  .hero {
    min-height: max(var(--hero-h), 520px);
    padding: calc(var(--header-h) + 32px) 20px 56px;
  }

  .hero-sub {
    margin-top: 18px;
  }

  .hero-cta {
    margin-top: 28px;
    padding: 14px 38px;
  }

  .download {
    padding: 58px 20px 68px;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .download-actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 420px;
    gap: 12px;
  }

  .dl-btn {
    max-width: none;
    flex: 0 0 auto;
    width: 100%;
  }

  .notice-dialog {
    width: calc(100vw - 28px);
    border-radius: 18px;
    max-height: 88vh;
  }

  .notice-scroll {
    max-height: 88vh;
  }

  .notice-body {
    padding: 22px 22px 26px;
  }

  .notice-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 21px;
  }

  .chat-panel {
    inset: 0;
    width: auto;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .chat-header {
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  #chatInput {
    font-size: 16px;
  }
}

/* ---------- 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* ---------- 在线客服 ---------- */
.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  width: 380px;
  height: min(640px, calc(100vh - 48px));
  height: min(640px, calc(100dvh - 48px));
  background: #f4f7fd;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(4, 8, 20, 0.35);
  overflow: hidden;
  animation: chat-panel-in 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, #0d1730 0%, #16295a 55%, #114a5c 100%);
}

.chat-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-head-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.chat-head-avatar img {
  width: 20px;
  height: 20px;
}

.chat-head-text {
  min-width: 0;
}

.chat-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  line-height: 1.2;
}

.chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
}

.chat-status[data-state="online"] .chat-dot {
  background: #34d399;
}

.chat-status[data-state="offline"] .chat-dot {
  background: #f87171;
}

.chat-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-empty {
  margin: auto;
  padding: 24px;
  color: #8a93a8;
  text-align: center;
  font-size: 12.5px;
}

.chat-empty p {
  margin: 0 0 6px;
  color: #46506a;
  font-size: 15px;
  font-weight: 600;
}

.chat-empty[hidden] {
  display: none;
}

.chat-item {
  display: flex;
  flex-direction: column;
}

.chat-time {
  align-self: center;
  margin-bottom: 6px;
  color: #9aa3b8;
  font-size: 11px;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-msg.self {
  flex-direction: row-reverse;
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

.chat-avatar-service {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.chat-avatar-service img {
  width: 17px;
  height: 17px;
}

.chat-avatar-self {
  padding: 4px;
  background: #fff;
  border: 1px solid #e2e8f4;
}

.chat-avatar-self img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.chat-bubble {
  max-width: 76%;
  padding: 9px 12px;
  border-radius: 14px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.chat-msg.service .chat-bubble {
  border-bottom-left-radius: 4px;
}

.chat-msg.self .chat-bubble {
  border-bottom-right-radius: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 124, 255, 0.28);
}

.chat-bubble.has-image {
  padding: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.chat-msg.self .chat-bubble.has-image {
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.chat-image {
  display: block;
  max-width: 220px;
  max-height: 240px;
  border-radius: 10px;
  object-fit: cover;
}

.chat-video {
  display: block;
  max-width: 220px;
  max-height: 240px;
  border-radius: 10px;
}

.chat-faq {
  padding: 12px;
}

.chat-faq-title {
  margin: 0 0 4px;
  color: #8a93a8;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.chat-faq-item {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: #f2f6ff;
  color: #2f4faf;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-faq-item:hover {
  background: #e5edff;
}

.chat-system {
  align-self: center;
  max-width: 80%;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #7a8499;
  font-size: 11.5px;
  text-align: center;
}

.chat-emoji-pop {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  max-height: 150px;
  padding: 8px 10px;
  overflow-y: auto;
  background: #fff;
  border-top: 1px solid #e8edf7;
}

.chat-emoji-pop[hidden] {
  display: none;
}

.chat-emoji-item {
  padding: 5px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.chat-emoji-item:hover {
  background: #eef3ff;
}

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e8edf7;
}

.chat-tool {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5b6478;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.chat-tool:hover {
  background: #eef3ff;
}

.chat-tool svg {
  width: 20px;
  height: 20px;
}

.chat-file {
  display: none;
}

#chatInput {
  flex: 1;
  min-width: 0;
  max-height: 96px;
  padding: 8px 11px;
  border: 1px solid #e2e8f4;
  border-radius: 11px;
  background: #f8faff;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#chatInput:focus {
  border-color: #9db8ff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.12);
}

.chat-send {
  height: 36px;
  flex-shrink: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(79, 124, 255, 0.3);
}

.chat-send:active {
  transform: none;
}

@keyframes chat-panel-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
