/* ==========================================================================
   1. 全局设计系统变量与重置 (Zero Dependencies Design System)
   ========================================================================== */
:root {
  --bg-dark-950: #060913;
  --bg-dark-900: #0b1120;
  --bg-dark-850: #0f172a;
  --bg-dark-800: #1e293b;
  --bg-dark-700: #334155;

  --border-dark-800: rgba(30, 41, 59, 0.8);
  --border-dark-700: rgba(51, 65, 85, 0.8);

  --brand-400: #38bdf8;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;

  --accent-purple: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --text-white: #ffffff;
  --text-100: #f1f5f9;
  --text-200: #e2e8f0;
  --text-300: #cbd5e1;
  --text-400: #94a3b8;
  --text-500: #64748b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-dark-950);
  color: var(--text-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-dark-950);
  color: var(--text-100);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

::selection {
  background-color: var(--brand-500);
  color: #ffffff;
}

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

button, input, select, textarea {
  font: inherit;
}

/* ==========================================================================
   2. 基础布局与通用工具类
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-left: 2rem; padding-right: 2rem; } }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none !important; }
.block { display: block; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.shrink-0 { flex-shrink: 0; }

.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.font-medium { font-weight: 500; }
.font-light { font-weight: 300; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* 3D 地球仪弧形网格特效 (去滤镜低功耗版：零高斯模糊 + CSS 硬件遮罩) */
.bg-grid-pattern {
  background: radial-gradient(ellipse 80% 60% at 50% 45%, rgba(14, 165, 233, 0.06) 0%, transparent 75%);
}

.hero-section > .container {
  position: relative;
  z-index: 2;
}

.globe-grid-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: layout style paint;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000000 0%, rgba(0, 0, 0, 0.78) 58%, rgba(0, 0, 0, 0.22) 85%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 46%, #000000 0%, rgba(0, 0, 0, 0.78) 58%, rgba(0, 0, 0, 0.22) 85%, transparent 100%);
}

.globe-grid-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 地球仪基础弧形经纬线 */
.globe-latitudes path,
.globe-longitudes path {
  fill: none;
  stroke: rgba(148, 163, 184, 0.075);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* 重点经纬刻度线（微亮虚线/主轴线，增强地球仪精密仪器质感） */
.globe-latitudes path.globe-line-accent,
.globe-longitudes path.globe-line-accent {
  stroke: rgba(56, 189, 248, 0.13);
  stroke-width: 1.1;
  stroke-dasharray: 6 6;
}

/* 球面外轮廓环与内环 */
.globe-outer-ring {
  fill: none;
  stroke: rgba(56, 189, 248, 0.12);
  stroke-width: 1;
  stroke-dasharray: 3 8;
}

.globe-inner-ring {
  fill: none;
  stroke: rgba(99, 102, 241, 0.08);
  stroke-width: 1;
}

/* 经纬交汇电弧脉冲点：仅动画化 opacity，不改变几何半径 r，零重排开销 */
.globe-node-dot {
  fill: #bae6fd; /* 固定为偏白的浅蓝色，动画不再改 fill，避免触发重绘 */
  opacity: 0.12;
  animation: globe-node-spark 3.5s infinite ease-in-out;
}

@keyframes globe-node-spark {
  0%, 70%, 100% { opacity: 0.12; }
  82% { opacity: 0.95; }
  86% { opacity: 0.4; }
  90% { opacity: 0.9; }
}

/* 移动端不渲染脉冲点，减少无意义的动画层 */
@media (max-width: 767px) {
  .globe-nodes { display: none; }
}


/* Hero 滚出视口时（由 home.js 添加 .is-offscreen）暂停其内所有无限动画 */
.hero-section.is-offscreen .globe-node-dot,
.hero-section.is-offscreen .animate-pulse-slow,
.hero-section.is-offscreen .animate-ping {
  animation-play-state: paused;
}

/* Toast 平时不可见，其内圆点的 ping 动画不应持续运行（覆盖内联 animation 的 play-state） */
#toast:not(.show) .toast-box > div:first-child {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .globe-node-dot {
    animation: none !important;
    opacity: 0 !important;
  }
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.45; transform: translate3d(-50%, -50%, 0) scale(1); }
  50% { opacity: 0.75; transform: translate3d(-50%, -50%, 0) scale(1.06); }
}
/* 光晕脉冲：默认关闭，仅在桌面端、有悬停能力、且未开启"减少动态效果"时启用 */
.animate-pulse-slow {
  animation: none;
}
@media (min-width: 1024px) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
  }
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin {
  animation: spin 1s linear infinite;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ==========================================================================
   3. 导航栏 (Header)
   ========================================================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 50;
  height: 64px;
  background: rgba(6, 9, 19, 0.92);
  border-bottom: 1px solid var(--border-dark-800);
  transition: background 0.3s ease, border-color 0.3s ease;
}
@media (min-width: 768px) {
  .main-header {
    height: 80px;
  }
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-logo-wrap img{
  width: 45px;
  height: 45px;
}
.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-600), var(--accent-purple), var(--brand-400));
  padding: 2px;
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.25);
  transition: transform 0.3s;
}
.brand-logo-wrap:hover .brand-icon-box {
  transform: scale(1.05);
}
.brand-icon-inner {
  width: 100%;
  height: 100%;
  background: var(--bg-dark-950);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-400);
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, var(--text-200), var(--text-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-size: 10px;
 
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--brand-400);
  font-weight: 600;
  margin-top: -3px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.35rem;
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
}
.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-400);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link:hover {
  color: var(--brand-400);
  background-color: rgba(30, 41, 59, 0.5);
}
.nav-link.active {
  color: var(--text-200);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .header-actions { display: flex; }
}

.btn-ghost {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-300);
  transition: color 0.2s;
  background: transparent;
  border: none;
  cursor: pointer;
}
.btn-ghost:hover {
  color: #ffffff;
}

.btn-gradient {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(to right, var(--brand-600), var(--accent-purple));
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s ease;
}
.btn-gradient:hover {
  opacity: 0.95;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}
.btn-gradient:active {
  transform: scale(0.96);
}

.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-dark-800);
  color: var(--text-200);
  cursor: pointer;
  border-radius: 0.65rem;
  transition: all 0.2s ease;
}
.mobile-toggle:hover {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-dark-700);
}
@media (min-width: 768px) {
  .mobile-toggle { display: none; }
}

.mobile-drawer {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(11, 17, 32, 0.98);
  border-bottom: 1px solid var(--border-dark-800);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  padding: 1.25rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 49;
}
@media (min-width: 768px) {
  .mobile-drawer { display: none !important; }
}
.mobile-nav-item {
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-200);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav-item:hover, .mobile-nav-item:active {
  background: rgba(30, 41, 59, 0.7);
  color: var(--brand-400);
}
.mobile-drawer-actions {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-dark-800);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.mobile-btn-login {
  text-align: center;
  padding: 0.75rem 1rem;
  background: var(--bg-dark-800);
  border: 1px solid var(--border-dark-700);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-200);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
.mobile-btn-register {
  text-align: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(to right, var(--brand-600), var(--accent-purple));
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ==========================================================================
   4. Hero 首屏
   ========================================================================== */
.hero-section {
  padding-top: 5.5rem;
  padding-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-section {
    padding-top: 10rem;
    padding-bottom: 7rem;
  }
}

.glow-ball-blue {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.28) 0%, rgba(14, 165, 233, 0.12) 42%, rgba(14, 165, 233, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -10;
  contain: layout style paint;
}
.glow-ball-purple {
  position: absolute;
  top: 33%;
  left: 25%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.26) 0%, rgba(99, 102, 241, 0.10) 42%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -10;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}
.glow-ball-emerald {
  position: absolute;
  top: 50%;
  right: 2.5rem;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.08) 42%, rgba(16, 185, 129, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -10;
  transform: translate3d(0, 0, 0);
  contain: layout style paint;
}

/* 移动端：缩小蓝色光晕，隐藏紫/绿光晕，降低半透明大面积叠层的合成成本 */
@media (max-width: 767px) {
  .glow-ball-blue {
    width: 360px;
    height: 360px;
  }
  .glow-ball-purple,
  .glow-ball-emerald {
    display: none;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 2rem;
  }
}
.hero-grid > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(14, 165, 233, 0.3);
  font-size: 0.75rem;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
@media (min-width: 640px) {
  .pill-badge { font-size: 0.8rem; }
}
.ping-dot-wrap {
  display: flex;
  position: relative;
  width: 8px;
  height: 8px;
}
.ping-dot-outer {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--brand-400);
  opacity: 0.75;
}
.ping-dot-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-500);
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-top: 0.75rem;
  word-break: break-word;
}
@media (min-width: 640px) { .hero-title { font-size: 2.5rem; margin-top: 1rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 3.25rem; } }

.hero-title-gradient {
  display: block;
  margin-top: 0.35rem;
  background: linear-gradient(to right, var(--brand-400), #7dd3fc, var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 0.925rem;
  color: rgba(203, 213, 225, 0.9);
  line-height: 1.65;
  max-width: 42rem;
  font-weight: 300;
  margin-top: 1rem;
}
@media (min-width: 640px) {
  .hero-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-top: 1.25rem;
  }
}

.hero-btn-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.75rem;
  padding-top: 1.25rem;
}
@media (min-width: 640px) {
  .hero-btn-group {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    gap: 1rem;
    padding-top: 1.5rem;
  }
}
.hero-btn-primary {
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(to right, var(--brand-600), var(--brand-500), var(--accent-purple));
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  cursor: pointer;
  min-height: 46px;
}
.hero-btn-primary:hover {
  box-shadow: 0 12px 25px -3px rgba(14, 165, 233, 0.45);
  filter: brightness(1.1);
}
.hero-btn-primary:active { transform: scale(0.97); }

.hero-btn-secondary {
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-200);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-dark-700);
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  min-height: 46px;
}
.hero-btn-secondary:hover {
  background: var(--bg-dark-800);
  border-color: var(--text-500);
}

.hero-btn-sandbox {
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  min-height: 46px;
}
.hero-btn-sandbox:hover {
  background: rgba(16, 185, 129, 0.2);
}

.hero-metrics-bar {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-dark-800);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 36rem;
  text-align: center;
}
@media (min-width: 640px) {
  .hero-metrics-bar {
    margin-top: 2rem;
    padding-top: 1.5rem;
    gap: 1rem;
    text-align: left;
  }
}
.metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #ffffff;
  letter-spacing: -0.05em;
}
@media (min-width: 640px) { .metric-value { font-size: 2rem; } }
.metric-label {
  font-size: 0.7rem;
  color: var(--text-400);
  margin-top: 0.25rem;
  line-height: 1.3;
}
@media (min-width: 640px) { .metric-label { font-size: 0.75rem; } }

.terminal-wrapper {
  border-radius: 1rem;
  background: linear-gradient(to bottom, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-dark-700);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  padding: 1rem;
  overflow: hidden;
}
@media (min-width: 640px) {
  .terminal-wrapper { padding: 1.25rem; }
}
.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.terminal-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.dot-red { width: 12px; height: 12px; border-radius: 50%; background: rgba(239, 68, 68, 0.8); flex-shrink: 0; }
.dot-amber { width: 12px; height: 12px; border-radius: 50%; background: rgba(245, 158, 11, 0.8); flex-shrink: 0; }
.dot-green { width: 12px; height: 12px; border-radius: 50%; background: rgba(16, 185, 129, 0.8); flex-shrink: 0; }
.terminal-path {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-400);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .terminal-path { max-width: none; }
}
.status-badge-ok {
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 11px;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

.terminal-code-body {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-300);
  background: rgba(6, 9, 19, 0.85);
  padding: 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-dark-800);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
  .terminal-code-body {
    font-size: 0.8rem;
    padding: 1rem;
  }
}

.terminal-route-card {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: linear-gradient(to right, var(--bg-dark-900), var(--bg-dark-800));
  border: 1px solid var(--border-dark-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
@media (max-width: 639px) {
  .terminal-route-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .terminal-route-card .text-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-dark-800);
    padding-top: 0.5rem;
    text-align: left;
  }
}

/* ==========================================================================
   5. 支付生态渠道
   ========================================================================== */
.channels-section {
  border-top: 1px solid var(--border-dark-800);
  border-bottom: 1px solid var(--border-dark-800);
  background: rgba(11, 17, 32, 0.6);
  padding: 2rem 0;
}
@media (min-width: 640px) {
  .channels-section { padding: 2.5rem 0; }
}
.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}
@media (min-width: 480px) { .channels-grid { gap: 0.85rem; } }
@media (min-width: 640px) { .channels-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 768px) { .channels-grid { grid-template-columns: repeat(6, 1fr); } }

.channel-badge-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border-radius: 0.75rem;
  background: rgba(6, 9, 19, 0.7);
  border: 1px solid var(--border-dark-800);
  transition: all 0.2s ease;
  cursor: default;
  min-height: 48px;
}
@media (min-width: 640px) {
  .channel-badge-box { padding: 1rem; }
}
.channel-badge-box:hover {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(30, 41, 59, 0.4);
}
.channel-badge-box span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-200);
}
@media (min-width: 640px) {
  .channel-badge-box span { font-size: 0.875rem; }
}
.channel-badge-box:hover span {
  color: #ffffff;
}

/* ==========================================================================
   6. 核心优势卡片
   ========================================================================== */
.features-section {
  padding: 3.5rem 0;
  position: relative;
}
@media (min-width: 768px) {
  .features-section { padding: 6rem 0; }
}
.section-header {
  text-align: center;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.25rem;
}
@media (min-width: 768px) {
  .section-header { margin-bottom: 4rem; }
}
.section-subtitle-tag {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand-400);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  word-break: break-word;
}
@media (min-width: 640px) { .section-title { font-size: 2.25rem; } }
.section-desc {
  color: var(--text-400);
  font-size: 0.925rem;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .section-desc { font-size: 1.05rem; }
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  border-radius: 1rem;
  padding: 1.25rem;
  background: rgba(11, 17, 32, 0.8);
  border: 1px solid var(--border-dark-800);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 640px) {
  .feature-card { padding: 1.5rem; }
}
.feature-card:hover {
  border-color: rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 0 35px -5px rgba(14, 165, 233, 0.25);
}
.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform 0.3s;
}
.feature-card:hover .feature-icon-box {
  transform: scale(1.1);
}

/* ==========================================================================
   7. 在线沙箱测试
   ========================================================================== */
.sandbox-section {
  padding: 3.5rem 0;
  background: rgba(11, 17, 32, 0.4);
  border-top: 1px solid var(--border-dark-800);
}
@media (min-width: 768px) {
  .sandbox-section { padding: 5rem 0; }
}
.sandbox-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  word-break: break-word;
}
@media (min-width: 640px) {
  .sandbox-title { font-size: 2rem; }
}

.sandbox-section {
  position: relative;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.sandbox-card-wrapper {
  background: var(--bg-dark-900);
  border: 1px solid var(--border-dark-800);
  border-radius: 1.25rem;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 640px) { .sandbox-card-wrapper { padding: 2rem; border-radius: 1.5rem; gap: 1.5rem; } }
@media (min-width: 1024px) { .sandbox-card-wrapper { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

.sandbox-card-wrapper > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.channel-selector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .channel-selector-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.channel-btn {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-dark-700);
  background: rgba(6, 9, 19, 0.6);
  color: var(--text-300);
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.channel-btn:hover {
  border-color: var(--text-500);
}
.channel-btn.active {
  border-color: rgba(14, 165, 233, 0.6) !important;
  background: rgba(14, 165, 233, 0.1) !important;
  color: #ffffff !important;
}
.channel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-500);
  flex-shrink: 0;
}
.channel-btn.active .channel-dot {
  background: var(--brand-400) !important;
}

.order-id-input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.order-id-input-group .form-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.order-id-refresh-btn {
  padding: 0.65rem;
  background: var(--bg-dark-800);
  border: 1px solid var(--border-dark-700);
  border-radius: 0.75rem;
  color: var(--text-300);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.2s;
}
.order-id-refresh-btn:hover {
  background: var(--bg-dark-700);
  color: #ffffff;
}

#sandboxResponseView {
  white-space: pre-wrap !important;
  word-break: break-all !important;
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.form-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg-dark-950);
  border: 1px solid var(--border-dark-700);
  border-radius: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 16px;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}
@media (min-width: 640px) {
  .form-input { font-size: 0.875rem; }
}
.form-input:focus {
  border-color: var(--brand-500);
}

/* ==========================================================================
   8. 开发者代码区块 (固定高度与无抖动视窗优化)
   ========================================================================== */
.developer-section {
  padding: 3.5rem 0;
  position: relative;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}
@media (min-width: 768px) {
  .developer-section { padding: 6rem 0; }
}
.developer-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  word-break: break-word;
}
@media (min-width: 640px) {
  .developer-title { font-size: 2.25rem; }
}

.developer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .developer-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
}
.developer-grid > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.code-tabs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-dark-800);
  background: var(--bg-dark-950);
  padding: 0.65rem 1rem;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
#codeLangTabs {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}
.lang-tab {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  border-radius: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-400);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.lang-tab:hover {
  color: #ffffff;
}
.lang-tab.active {
  background: var(--bg-dark-800) !important;
  color: #ffffff !important;
  font-weight: 500;
}

/* 响应式代码块高度：移动端 280px，桌面端 430px */
.code-pre-block {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-300);
  background: rgba(6, 9, 19, 0.9);
  height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
  margin: 0;
  border: none;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .code-pre-block {
    padding: 1.25rem;
    font-size: 0.8rem;
    height: 430px;
  }
}
.code-pre-block::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.code-pre-block::-webkit-scrollbar-track {
  background: rgba(6, 9, 19, 0.6);
}
.code-pre-block::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.6);
  border-radius: 3px;
}
.code-pre-block::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.5);
}

/* ==========================================================================
   9. 开放文档表格
   ========================================================================== */
.docs-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border-dark-800);
  background: rgba(11, 17, 32, 0.3);
}
@media (min-width: 768px) {
  .docs-section { padding: 5rem 0; }
}

.table-scroll-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--brand-400);
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}
@media (min-width: 768px) {
  .table-scroll-hint { display: none; }
}

.table-responsive {
  border: 1px solid var(--border-dark-800);
  border-radius: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(11, 17, 32, 0.7);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.docs-table {
  width: 100%;
  min-width: 650px;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-300);
  border-collapse: collapse;
}
.docs-table th {
  background: rgba(6, 9, 19, 0.85);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-400);
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-dark-800);
  white-space: nowrap;
}
@media (min-width: 640px) {
  .docs-table th { padding: 1rem 1.5rem; }
}
.docs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
@media (min-width: 640px) {
  .docs-table td { padding: 1rem 1.5rem; }
}
.docs-table tr:hover td {
  background: rgba(30, 41, 59, 0.4);
}

/* ==========================================================================
   10. 快速上手：四步完成接入模块
   ========================================================================== */
.steps-section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--border-dark-800);
  background: var(--bg-dark-950);
}
@media (min-width: 768px) {
  .steps-section { padding: 6rem 0; }
}
.steps-header {
  margin-bottom: 2.25rem;
  text-align: left;
}
@media (min-width: 768px) {
  .steps-header { margin-bottom: 3.5rem; }
}
.steps-badge {
  color: var(--brand-400);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: inline-block;
  letter-spacing: 0.05em;
}
.steps-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 0.65rem;
  word-break: break-word;
}
@media (min-width: 640px) {
  .steps-title { font-size: 2.75rem; margin-bottom: 0.85rem; }
}
.steps-desc {
  color: var(--text-400);
  font-size: 0.925rem;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .steps-desc { font-size: 1.05rem; }
}
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 1024px) {
  .steps-grid { grid-template-columns: repeat(4, 1fr); }
}
.step-card {
  padding: 1.5rem 1.25rem;
  border-radius: 1.25rem;
  background: rgba(11, 17, 32, 0.75);
  border: 1px solid var(--border-dark-800);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: all 0.3s ease;
  position: relative;
}
@media (min-width: 640px) {
  .step-card { padding: 2.25rem 1.75rem; }
}
.step-card:hover {
  border-color: rgba(14, 165, 233, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}
.step-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) {
  .step-card-top { margin-bottom: 2rem; }
}
.step-icon {
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.5);
  color: var(--text-400);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}
.step-card-desc {
  font-size: 0.85rem;
  color: var(--text-400);
  line-height: 1.6;
}

/* ==========================================================================
   11. 底部 CTA 横幅
   ========================================================================== */
.cta-section {
  padding: 3.5rem 0;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg-dark-900), var(--bg-dark-950));
  border-top: 1px solid var(--border-dark-800);
}
@media (min-width: 768px) {
  .cta-section { padding: 5rem 0; }
}
.cta-container {
  max-width: 64rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
}
.cta-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  word-break: break-word;
}
@media (min-width: 640px) {
  .cta-title { font-size: 2.5rem; }
}
.cta-desc {
  font-size: 0.925rem;
  color: var(--text-400);
  max-width: 42rem;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .cta-desc { font-size: 1rem; }
}
.cta-btn-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding-top: 0.5rem;
}
@media (min-width: 640px) {
  .cta-btn-group {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    gap: 1rem;
    padding-top: 1rem;
  }
}
.cta-btn-group a, .cta-btn-group button {
  width: 100%;
  justify-content: center;
  text-align: center;
}
@media (min-width: 640px) {
  .cta-btn-group a, .cta-btn-group button {
    width: auto;
  }
}

/* ==========================================================================
   12. 弹窗与 Toast
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop.flex {
  display: flex !important;
}
.modal-card {
  background: var(--bg-dark-900);
  border: 1px solid var(--border-dark-700);
  border-radius: 1.5rem;
  max-width: 28rem;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  position: relative;
  margin: auto;
}
@media (min-width: 640px) { .modal-card { padding: 2rem; } }

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-400);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.5);
}

#toast {
  position: fixed;
  bottom: 1.25rem;
  left: 1rem;
  right: 1rem;
  z-index: 1100;
  transform: translateY(5rem);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  justify-content: center;
}
@media (min-width: 640px) {
  #toast {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
  }
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-box {
  background: #0f172a;
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #ffffff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 24rem;
}

/* ==========================================================================
   13. 页脚 Footer
   ========================================================================== */
.footer-section {
  background: var(--bg-dark-950);
  border-top: 1px solid var(--border-dark-800);
  padding: 3.5rem 0 2.5rem;
  font-size: 0.875rem;
  color: var(--text-400);
}
@media (min-width: 768px) {
  .footer-section { padding: 4.5rem 0 2.5rem; }
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2.25rem; }
  .footer-brand-col { grid-column: span 2; }
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; margin-bottom: 3.5rem; }
  .footer-brand-col { grid-column: span 1; }
}

.footer-brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.footer-brand-desc {
  font-size: 0.875rem;
  color: var(--text-400);
  max-width: 24rem;
  line-height: 1.65;
}
.footer-col-title {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-200);
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.875rem;
}
.footer-nav-link {
  color: var(--text-400);
  transition: color 0.2s;
}
.footer-nav-link:hover {
  color: #ffffff;
}
.footer-bottom-bar {
  padding-top: 2rem;
  border-top: 1px solid var(--border-dark-800);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-500);
}
.footer-bottom-bar a {
  color: var(--brand-400);
  transition: color 0.2s;
}
.footer-bottom-bar a:hover {
  color: #ffffff;
}
