/* landing/other 共用样式：深色科技风 + 霓虹渐变 + Bento 拼贴 */
:root {
  --bg: #06080f;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --ink: #e8ecf5;
  --muted: #94a3b8;
  --a1: #22d3ee;
  --a2: #8b5cf6;
  --a3: #f472b6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { color: #fff; font-weight: 800; line-height: 1.25; margin: 0; }
p { margin: 0; }

/* ---------- 背景：网格 + 霓虹光斑 ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-fx::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 70%);
  opacity: 0.55;
}
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-a { width: 520px; height: 520px; top: -160px; left: -140px; background: var(--a2); }
.orb-b { width: 460px; height: 460px; top: 18vh; right: -160px; background: var(--a1); opacity: 0.32; }
.orb-c { width: 380px; height: 380px; bottom: -160px; left: 30%; background: var(--a3); opacity: 0.22; }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  color: #fff; font-weight: 700; font-size: 1rem;
  background: linear-gradient(90deg, var(--a2), var(--a1));
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(34, 211, 238, 0.35); filter: brightness(1.08); }
.btn-ghost {
  padding: 10px 22px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn-ghost:hover { border-color: var(--a1); background: var(--panel); }

/* ---------- 导航：置顶透明，滚动后变深色毛玻璃 ---------- */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}
#main-nav.is-scrolled {
  background: rgba(6, 8, 15, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; color: #fff; }
.brand img { width: 40px; height: 40px; }
.nav-links { display: none; align-items: center; gap: 28px; color: var(--muted); font-weight: 500; }
.nav-links a:hover, .nav-links button.link:hover { color: #fff; }
.nav-links button.link { color: var(--muted); }
@media (min-width: 768px) { .nav-links { display: flex; } .nav-burger { display: none !important; } }
.nav-burger { font-size: 1.9rem; color: #fff; cursor: pointer; line-height: 1; }
#menu-toggle:checked ~ #mobile-menu { display: flex; }
#mobile-menu {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  flex-direction: column; align-items: center; gap: 22px; padding: 26px 0;
  background: rgba(6, 8, 15, 0.96); border-bottom: 1px solid var(--line); color: var(--ink);
}
#user-dropdown, #mobile-user-dropdown {
  min-width: 150px; background: #0d1220; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
#user-dropdown button, #mobile-user-dropdown button { color: var(--ink); }
#user-dropdown button:hover, #mobile-user-dropdown button:hover { background: var(--panel-strong); }

/* ---------- Hero ---------- */
.hero { padding: 168px 20px 96px; text-align: center; }
.hero-inner { max-width: 820px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -0.02em; margin-bottom: 22px; }
.grad-text {
  background: linear-gradient(90deg, #c4b5fd 0%, var(--a1) 60%, #a7f3d0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.25rem); max-width: 620px; margin: 0 auto 36px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px; font-size: 0.85rem; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line);
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 10px var(--a1); }

/* ---------- 下载按钮（图标 + 文字） ---------- */
.dl-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 14px; font-weight: 600; font-size: 0.95rem; color: #fff;
  background: var(--panel-strong); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.dl-btn svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--a1); }
.dl-btn:hover { transform: translateY(-2px); border-color: var(--a1); box-shadow: 0 10px 30px rgba(34, 211, 238, 0.18); }

/* ---------- Bento ---------- */
.section { padding: 88px 20px; }
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.section-head p { color: var(--muted); margin-top: 10px; }

.bento { display: grid; grid-template-columns: repeat(1, 1fr); gap: 18px; }
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .b-wide { grid-column: span 4; }
  .b-half { grid-column: span 2; }
  .b-full { grid-column: span 6; }
  .b-tall { grid-row: span 2; }
}
.bento-card {
  position: relative; overflow: hidden;
  padding: 30px; border-radius: 24px;
  background: var(--panel); border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.bento-card:hover { border-color: rgba(34, 211, 238, 0.45); transform: translateY(-3px); }
.bento-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.bento-card p { color: var(--muted); font-size: 0.95rem; }
/* 跨两行的大卡：内容纵向铺开，连线动画贴底，和右侧叠起来的两张小卡等高 */
.b-tall { display: flex; flex-direction: column; }
.b-tall .route-svg { margin-top: auto; padding-top: 18px; }
.b-icon {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--a2), var(--a1));
}
.b-icon svg { width: 24px; height: 24px; }

/* 智能路由：节点连线动画 */
.route-svg { width: 100%; height: auto; margin-top: 18px; }
.route-line { stroke: url(#routeGrad); stroke-width: 2; fill: none; stroke-dasharray: 6 8; animation: dash 1.6s linear infinite; }
.route-node { fill: #0d1220; stroke: var(--a1); stroke-width: 2; }
.route-node.hot { fill: var(--a1); filter: drop-shadow(0 0 8px var(--a1)); }
@keyframes dash { to { stroke-dashoffset: -28; } }

/* 场景行 */
.scene-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .scene-row { grid-template-columns: repeat(4, 1fr); } }
.scene { padding: 18px; border-radius: 16px; background: var(--panel-strong); border: 1px solid var(--line); }
.scene b { display: block; color: #fff; margin-bottom: 4px; }
.scene span { color: var(--muted); font-size: 0.88rem; }

/* 下载 CTA */
.cta-card {
  max-width: 820px; margin: 0 auto; text-align: center; padding: 56px 24px;
  border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.25), transparent 60%), var(--panel);
}
.cta-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 8px; }
.cta-card p { color: var(--muted); margin-bottom: 28px; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 20px; text-align: center; color: var(--muted); }
.footer a { margin: 0 14px; }
.footer a:hover { color: #fff; }

/* ---------- 模态框（登录 / 注册 / 确认） ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(2, 4, 10, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal-overlay.hidden { display: none; }
.modal-card {
  width: 100%; max-width: 420px; padding: 34px; border-radius: 24px;
  background: #0d1220; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.modal-card h2 { font-size: 1.6rem; margin-bottom: 8px; }
.modal-switch { text-align: right; color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; cursor: pointer; }
.modal-switch:hover { color: var(--a1); }
.modal-input {
  width: 100%; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; font-size: 1rem; color: var(--ink);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); outline: none;
  transition: border-color 0.2s ease;
}
.modal-input::placeholder { color: #64748b; }
.modal-input:focus { border-color: var(--a1); }
.modal-row { display: flex; gap: 10px; margin-bottom: 14px; }
.modal-row .modal-input { margin-bottom: 0; }
.modal-send { padding: 0 16px; border-radius: 12px; white-space: nowrap; font-weight: 600; color: #fff; background: linear-gradient(90deg, var(--a2), var(--a1)); }
.modal-send:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.modal-cancel { padding: 10px 20px; border-radius: 999px; color: var(--muted); background: var(--panel-strong); }
.modal-cancel:hover { color: #fff; }
#login-error, #register-error { font-size: 0.9rem; margin-bottom: 12px; }
#register-error:not(.hidden), #login-error:not(.hidden) { color: #fb7185; }
#register-error.success { color: #34d399; background: rgba(52, 211, 153, 0.1); padding: 6px 10px; border-radius: 8px; }

/* ---------- 购买页 ---------- */
.plan-tabs {
  display: flex; gap: 6px; width: fit-content; margin: 0 auto 36px; padding: 6px;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--line);
}
.plan-tab { padding: 9px 26px; border-radius: 999px; font-weight: 700; color: var(--muted); transition: all 0.2s ease; }
.plan-tab.active { color: #fff; background: linear-gradient(90deg, var(--a2), var(--a1)); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35); }
.plan-group { display: none; }
.plan-group.active { display: block; }
.plan-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 18px; max-width: 1120px; margin: 0 auto; }
@media (min-width: 640px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .plan-grid { grid-template-columns: repeat(4, 1fr); } }
.pricing-card {
  position: relative; text-align: center; padding: 34px 22px; border-radius: 24px;
  background: var(--panel); border: 1px solid var(--line); transition: transform 0.25s ease, border-color 0.25s ease;
}
.pricing-card:hover { transform: translateY(-4px); border-color: rgba(34, 211, 238, 0.45); }
.pricing-card.featured { border-color: rgba(139, 92, 246, 0.7); background: linear-gradient(180deg, rgba(139, 92, 246, 0.14), var(--panel)); box-shadow: 0 18px 50px rgba(139, 92, 246, 0.2); }
.pricing-card h3 { font-size: 1.15rem; margin-bottom: 14px; }
.plan-price { font-size: 2.4rem; font-weight: 800; color: #fff; line-height: 1.2; }
.plan-original { color: #64748b; text-decoration: line-through; font-size: 0.9rem; margin-bottom: 8px; }
.plan-savings { color: var(--a1); font-weight: 600; font-size: 0.9rem; min-height: 1.5rem; margin-bottom: 22px; }
.plan-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 16px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, var(--a2), var(--a3));
}
.compare-card { max-width: 760px; margin: 56px auto 0; padding: 30px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.compare-card h3 { text-align: center; font-size: 1.4rem; margin-bottom: 18px; }
.compare-table { width: 100%; border-collapse: collapse; text-align: center; }
.compare-table th, .compare-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.compare-table th { color: #fff; font-weight: 800; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table td { color: var(--muted); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:nth-child(2), .compare-table td:nth-child(3) { color: var(--a1); font-weight: 600; }

/* ---------- 法律文本页 ---------- */
.legal-card { max-width: 800px; margin: 0 auto; padding: 44px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }
.legal-card h1 { font-size: 2.1rem; margin-bottom: 24px; }
.legal-card h2 { font-size: 1.35rem; margin: 30px 0 10px; }
.legal-card p { margin-bottom: 14px; color: #cbd5e1; }
.legal-card ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 14px; color: #cbd5e1; }
.legal-card li { margin-bottom: 8px; }
.legal-card a { color: var(--a1); text-decoration: underline; }
@media (max-width: 640px) { .legal-card { padding: 26px 20px; } }

/* ---------- 进场动画 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.rise { animation: rise 0.8s ease-out both; }
.rise-2 { animation-delay: 0.1s; }
.rise-3 { animation-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) { .rise, .route-line { animation: none; } }
