:root {
  --bg: #050816;
  --bg-2: #081022;
  --panel: rgba(10, 20, 42, 0.62);
  --panel-hover: rgba(14, 31, 62, 0.84);
  --line: rgba(116, 191, 255, 0.14);
  --line-strong: rgba(80, 206, 255, 0.42);
  --text: #edf7ff;
  --muted: #8195aa;
  --cyan: #53d9ff;
  --cyan-2: #33a7ff;
  --violet: #8475ff;
  --green: #68f5c2;
  --danger: #ff6d8a;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
  /* 更丝滑、轻巧的过度曲线，减少生硬感 */
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(83, 217, 255, .45) transparent;
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(51, 167, 255, .14), transparent 26%),
    radial-gradient(circle at 84% 24%, rgba(132, 117, 255, .11), transparent 26%),
    linear-gradient(180deg, #050816 0%, #071020 48%, #040712 100%);
  color: var(--text);
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(83, 217, 255, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 217, 255, .032) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 95%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 20%, rgba(83, 217, 255, .025) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: scan-page 14s linear infinite;
}

@keyframes scan-page {
  to { transform: translateX(100%); }
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(83, 217, 255, .28);
  color: #fff;
}

/* ===== 背景粒子 ===== */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: .7;
  pointer-events: none;
  transform: translateZ(0);
}

/* ===== 顶部状态栏与语言切换器 ===== */
.topbar {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 13, 28, .66);
  backdrop-filter: blur(15px);
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lang-switcher {
  margin-left: 10px;
  position: relative;
}
.lang-switcher select {
  background: rgba(4, 10, 24, .68);
  color: var(--cyan);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;
}
.lang-switcher::after {
  content: "▼";
  color: var(--cyan);
  font-size: 8px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.lang-switcher select:focus,
.lang-switcher select:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(83,217,255,.2);
}
.lang-switcher select option {
  background: #050816;
  color: #fff;
}

/* 优化后的硬件加速闪烁灯 */
.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-gpu 1.8s infinite;
}

@keyframes pulse-gpu {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* ===== 左侧书签导航 ===== */
.rail {
  position: fixed;
  left: 24px;
  top: 50%;
  z-index: 60;
  transform: translateY(-50%);
  width: 64px;
  padding: 12px 8px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 24, .68);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 55px rgba(0,0,0,.3);
}

.rail::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(83, 217, 255, .22) 16%,
    rgba(83, 217, 255, .22) 84%,
    transparent
  );
}

.rail a {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin: 5px 0;
  border-radius: 14px;
  color: #7890a6;
  transition:
    transform .28s var(--ease),
    color .28s var(--ease),
    background .28s var(--ease),
    box-shadow .28s var(--ease);
}

.rail a:hover {
  color: var(--text);
  transform: translateX(4px);
  background: rgba(83, 217, 255, .08);
}

.rail a.active {
  color: var(--cyan);
  background: linear-gradient(135deg, rgba(83,217,255,.14), rgba(132,117,255,.10));
  box-shadow: inset 0 0 0 1px rgba(83,217,255,.20), 0 0 28px rgba(83,217,255,.07);
}

.rail a.active::after {
  content: "";
  position: absolute;
  left: -11px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(83,217,255,.85);
}

.rail .tooltip {
  position: absolute;
  left: 61px;
  top: 50%;
  transform: translateY(-50%) translateX(-7px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(5, 12, 26, .92);
  color: var(--text);
  font-size: 12px;
  transition: .2s ease;
}

.rail a:hover .tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.rail svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

/* ===== 主体 ===== */
main {
  width: 100%;
}

.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px max(8vw, 120px);
  isolation: isolate;
  content-visibility: auto;
  contain-intrinsic-size: auto 100vh;
}

.section-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 10px rgba(83,217,255,.6);
}

/* 修好的大标题中文字体排版 */
h1 {
  max-width: 880px;
  font-size: clamp(54px, 8.3vw, 118px);
  font-weight: 770;
  line-height: 1.15;      /* 撑开中文行距 */
  letter-spacing: 0.02em; /* 撑开中文左右间距 */
}

h1 .gradient {
  color: transparent;
  background: linear-gradient(90deg, #f5fbff 0%, #8ee7ff 42%, #8578ff 95%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 660px;
  margin-top: 30px;
  color: #8ea1b5;
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(7, 15, 31, .54);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  transition: .28s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(83,217,255,.36);
  background: rgba(12, 29, 51, .72);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
}

.btn.primary {
  border-color: rgba(83,217,255,.32);
  background: linear-gradient(135deg, rgba(51,167,255,.20), rgba(132,117,255,.16));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #5f7488;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.mouse {
  width: 25px;
  height: 39px;
  border: 1px solid rgba(121,161,194,.34);
  border-radius: 20px;
  position: relative;
}

.mouse::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 7px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: var(--cyan);
  animation: mouse-scroll 1.7s infinite;
}

@keyframes mouse-scroll {
  0% { transform: translate(-50%, 0); opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(-50%, 12px); opacity: 0; }
}

/* ===== 标题 ===== */
.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 430px);
  align-items: end;
  gap: 40px;
  margin-bottom: 48px;
}

/* 修好的副标题中文字体排版 */
.section-title {
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.2;       /* 撑开中文行距 */
  letter-spacing: 0.02em; /* 撑开中文左右间距 */
}

.section-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

/* ===== 卡片 ===== */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.portal-card {
  position: relative;
  min-height: 250px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(16, 33, 63, .58), rgba(5, 12, 26, .50));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  transition:
    transform .4s var(--ease),
    border-color .4s var(--ease),
    background .4s var(--ease),
    box-shadow .4s var(--ease);
  will-change: transform;
}

.portal-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: -90px;
  right: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83,217,255,.20), transparent 68%);
  opacity: .45;
  transition: .4s ease;
}

.portal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.05), transparent 70%);
  transform: translateX(-100%);
  transition: opacity .2s;
}

.portal-card:hover {
  transform: translateY(-8px);
  border-color: rgba(83,217,255,.32);
  background: var(--panel-hover);
  box-shadow: 0 20px 54px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03);
}

.portal-card:hover::before {
  opacity: .8;
  transform: scale(1.14);
}

.portal-card:hover::after {
  opacity: 1;
  animation: card-scan .9s ease;
}

@keyframes card-scan {
  to { transform: translateX(100%); }
}

.card-index {
  color: rgba(83,217,255,.55);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.card-icon {
  width: 46px;
  height: 46px;
  margin: 26px 0 20px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid rgba(83,217,255,.14);
  background: rgba(83,217,255,.06);
  color: var(--cyan);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.portal-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: -.01em;
}

.portal-card p {
  color: #7f93a7;
  line-height: 1.7;
  font-size: 13px;
}

.card-link {
  position: absolute;
  right: 23px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #8da5ba;
  border: 1px solid var(--line);
  transition: .25s ease;
}

.portal-card:hover .card-link {
  color: var(--cyan);
  border-color: rgba(83,217,255,.32);
  transform: translate(2px,-2px);
}

.card-link svg {
  width: 15px;
  height: 15px;
}

/* ===== 状态区域 ===== */
.status-layout {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
}

.glass {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 16, 34, .58);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow);
}

.status-main {
  min-height: 430px;
  padding: 32px;
  overflow: hidden;
}

.status-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 15%, rgba(51,167,255,.14), transparent 28%),
    linear-gradient(135deg, transparent, rgba(132,117,255,.045));
  pointer-events: none;
}

.status-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.status-title h3 {
  font-size: 21px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(104,245,194,.16);
  border-radius: 999px;
  color: var(--green);
  background: rgba(104,245,194,.055);
  font-size: 11px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.metric {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(116,191,255,.10);
  background: rgba(6, 14, 29, .48);
}

.metric span {
  display: block;
  color: #688198;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 9px;
  font-size: 24px;
  font-weight: 680;
}

.metric strong small {
  color: #6f859a;
  font-size: 11px;
  font-weight: 500;
  margin-left: 4px;
}

.activity {
  position: relative;
  margin-top: 30px;
  height: 165px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding: 20px 16px 8px;
  border-top: 1px solid rgba(116,191,255,.08);
}

.bar {
  flex: 1;
  min-width: 3px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(to top, rgba(51,167,255,.22), rgba(83,217,255,.72));
  transform-origin: bottom;
  animation: bars 2.2s ease-in-out infinite alternate;
  box-shadow: 0 0 14px rgba(83,217,255,.05);
}

@keyframes bars {
  from { transform: scaleY(.78); opacity: .55; }
  to   { transform: scaleY(1); opacity: 1; }
}

.stack {
  display: grid;
  gap: 18px;
}

.mini-panel {
  min-height: 206px;
  padding: 26px;
}

.mini-panel h4 {
  margin-bottom: 20px;
  font-size: 15px;
}

.server-list {
  display: grid;
  gap: 12px;
}

.server {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 12px;
  color: #a7b5c2;
  font-size: 12px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(104,245,194,.5);
}

.server small {
  color: #64798d;
}

.terminal {
  color: #8ba1b7;
  font: 12px/1.8 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.terminal .prompt { color: var(--cyan); }
.terminal .ok { color: var(--green); }
.terminal .dim { color: #50697f; }

/* ===== 扩展模块 ===== */
.modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.module {
  min-height: 240px;
  padding: 30px;
  transition: .35s var(--ease);
}

.module:hover {
  transform: translateY(-5px);
  border-color: rgba(83,217,255,.24);
}

.module-number {
  color: rgba(83,217,255,.38);
  font-size: 46px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -.06em;
}

.module h3 {
  margin-top: 28px;
  font-size: 21px;
}

.module p {
  max-width: 450px;
  margin-top: 10px;
  color: #758a9d;
  line-height: 1.7;
  font-size: 13px;
}

.module-tag {
  display: inline-flex;
  margin-top: 24px;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(83,217,255,.13);
  color: #7ba2bb;
  background: rgba(83,217,255,.035);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ===== Footer / 最后一屏 ===== */
.end-section {
  text-align: center;
}

.end-wrap {
  width: min(900px, 100%);
  margin: auto;
}

.end-mark {
  width: 74px;
  height: 74px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1px solid rgba(83,217,255,.22);
  background: linear-gradient(135deg, rgba(83,217,255,.10), rgba(132,117,255,.08));
  box-shadow: 0 0 50px rgba(83,217,255,.08);
  color: var(--cyan);
}

.end-mark svg {
  width: 30px;
  height: 30px;
}

.end-section h2 {
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: -.045em;
  line-height: 1;
}

.end-section p {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--muted);
  line-height: 1.8;
}

footer {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: #4f6578;
  font-size: 11px;
  letter-spacing: .08em;
  white-space: nowrap;
}

/* ===== 滚动显示动画 (加快显示速度，减少生硬感) ===== */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(.985);
  transition:
    opacity .6s var(--ease),
    transform .6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }
.delay-3 { transition-delay: .24s; }
.delay-4 { transition-delay: .32s; }

/* ===== 装饰光环 ===== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}

.orb.one {
  right: -170px;
  top: 15%;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(83,217,255,.08);
  box-shadow:
    inset 0 0 80px rgba(83,217,255,.025),
    0 0 120px rgba(51,167,255,.025);
  animation: float-orb 8s ease-in-out infinite alternate;
}

.orb.two {
  left: 15%;
  bottom: -110px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(132,117,255,.08);
  animation: float-orb 10s ease-in-out infinite alternate-reverse;
}

@keyframes float-orb {
  to { transform: translate3d(0, -28px, 0) rotate(8deg); }
}

/* ===== 右侧页码 ===== */
.page-counter {
  position: fixed;
  right: 32px;
  bottom: 30px;
  z-index: 50;
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: #596f83;
  font-size: 11px;
  letter-spacing: .08em;
}

.page-counter strong {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 640;
}

/* ===== 响应式 ===== */
@media (max-width: 1050px) {
  .section {
    padding-left: 110px;
    padding-right: 42px;
  }
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
  .status-layout { grid-template-columns: 1fr; }
  .stack { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .rail {
    left: 50%; top: auto; bottom: 16px;
    width: auto; transform: translateX(-50%);
    display: flex; padding: 6px; border-radius: 18px;
  }
  .rail::before, .rail a.active::after, .rail .tooltip { display: none; }
  .rail a { width: 42px; height: 42px; margin: 0 2px; }
  .rail a:hover { transform: translateY(-3px); }
  .section { min-height: 100svh; padding: 90px 22px 110px; }
  .topbar { top: 14px; right: 14px; }
  .page-counter { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 18px; }
  .portal-grid, .modules, .stack, .metrics { grid-template-columns: 1fr; }
  .portal-card { min-height: 220px; }
  .status-main { padding: 22px; }
  h1 { font-size: clamp(50px, 17vw, 78px); }
  .hero-copy { font-size: 15px; }
  .scroll-hint { display: none; }
  footer { bottom: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
