/* ===== 变量与重置 ===== */
:root {
  --bg-dark: #05070D;
  --bg-float: #0B111A;
  --green: #00FFA3;
  --blue: #00D4FF;
  --gold: #FFB84C;
  --text-main: #F2F4F8;
  --text-sub: #A0AAB8;
  --glass: rgba(255, 255, 255, 0.06);
  --gradient: linear-gradient(135deg, #00FFA3 0%, #00D4FF 100%);
  --font-head: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-data: "JetBrains Mono", Consolas, "Courier New", monospace;
  --header-h: 68px;
  --announcement-h: 32px;
  --header-total: 104px;
  --container: 1200px;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-head);
  line-height: 1.2;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--green);
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

#main-content {
  scroll-margin-top: 120px;
  min-height: 60vh;
}

:focus-visible {
  outline: 2px solid rgba(0, 255, 163, 0.7);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

/* ===== 跳过链接 ===== */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 2000;
  padding: 10px 20px;
  background: var(--green);
  color: #05070D;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  transition: top .25s ease;
}

.skip-link:focus {
  top: 12px;
  color: #05070D;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  background: rgba(5, 7, 13, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.header-announcement {
  min-height: var(--announcement-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px;
  background: linear-gradient(90deg, rgba(0, 255, 163, 0.08), rgba(0, 212, 255, 0.04));
  border-bottom: 1px solid rgba(0, 255, 163, 0.08);
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  letter-spacing: 1px;
}

.announcement-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-data);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--green);
  border: 1px solid rgba(0, 255, 163, 0.3);
  border-radius: 3px;
  padding: 2px 8px;
  line-height: 1.2;
  flex-shrink: 0;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(0, 255, 163, 0); }
  50% { box-shadow: 0 0 12px rgba(0, 255, 163, 0.35); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  position: relative;
}

/* ===== 品牌 ===== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-head);
  flex-shrink: 0;
  transition: opacity .2s ease;
}

.brand:hover {
  opacity: 0.85;
  color: var(--text-main);
}

.brand-mark {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background: var(--gradient);
  transform: skew(-20deg);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(0, 255, 163, 0.35);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-main);
}

.brand-sub {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-sub);
  text-transform: uppercase;
}

/* ===== 导航 ===== */
.site-nav {
  display: flex;
  align-items: center;
}

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

.nav-list a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(242, 244, 248, 0.75);
  letter-spacing: 0.5px;
  position: relative;
  transition: color .2s ease, background .2s ease;
}

.nav-list a:hover {
  color: var(--green);
  background: rgba(0, 255, 163, 0.06);
}

.nav-list a[aria-current="page"] {
  color: var(--green);
  font-weight: 600;
}

.nav-list a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s ease;
}

.nav-toggle:hover {
  border-color: var(--green);
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

.nav-toggle.is-active .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--gradient);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(0, 255, 163, 0.4);
  transition: width .1s ease-out;
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  background: var(--bg-float);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 100px;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green), var(--blue), transparent);
  opacity: 0.5;
}

.site-footer::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.07), transparent 60%);
  pointer-events: none;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 48px;
  padding: 72px 0 56px;
  position: relative;
  z-index: 1;
}

.footer-brand .brand {
  margin-bottom: 20px;
}

.footer-summary {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 360px;
}

.service-note {
  font-size: 13px;
  color: var(--text-sub);
  background: rgba(0, 255, 163, 0.04);
  border-left: 3px solid var(--green);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  line-height: 1.6;
  max-width: 380px;
}

.footer-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 2px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--gradient);
}

.footer-links ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.footer-links a {
  display: inline-block;
  font-size: 15px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
  transition: color .2s ease;
}

.footer-links a::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-size: 12px;
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-links a:hover::before {
  color: var(--green);
}

.footer-contact p {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 12px;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.footer-contact p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--gradient);
  transform: skew(-20deg);
  border-radius: 1px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 7, 13, 0.4);
  padding: 16px 0;
  position: relative;
  z-index: 1;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-sub);
}

.footer-bottom a {
  font-size: 13px;
  color: var(--text-sub);
  transition: color .2s ease;
}

.footer-bottom a:hover {
  color: var(--green);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-icp {
  font-family: var(--font-data);
  font-size: 12px;
  color: rgba(160, 170, 184, 0.75);
  letter-spacing: 1px;
}

.footer-copyright {
  font-size: 13px;
}

/* ===== Back to top ===== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-float);
  border: 1px solid rgba(0, 255, 163, 0.3);
  border-radius: 10px;
  color: var(--green);
  font-size: 18px;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease, background .3s ease, box-shadow .3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--gradient);
  color: #05070D;
  border-color: transparent;
  box-shadow: 0 0 24px rgba(0, 255, 163, 0.35);
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-main);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.btn:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 255, 163, 0.15);
}

.btn-primary {
  background: var(--gradient);
  color: #05070D;
  border: none;
  font-weight: 800;
}

.btn-primary:hover {
  color: #05070D;
  box-shadow: 0 6px 30px rgba(0, 216, 209, 0.35);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(0, 212, 255, 0.4);
  color: var(--blue);
}

.btn-ghost:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: var(--blue);
  color: var(--blue);
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 20px 0;
  font-size: 14px;
  color: var(--text-sub);
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.25);
}

.breadcrumb a {
  color: var(--text-sub);
  transition: color .2s ease;
}

.breadcrumb a:hover {
  color: var(--green);
}

/* ===== 正文容器 ===== */
.prose {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
}

.prose p {
  margin-bottom: 1.2em;
}

.prose h2,
.prose h3 {
  font-weight: 800;
  transform: skew(-3deg);
  margin: 1.8em 0 0.6em;
}

.prose h2 {
  font-size: 28px;
}

.prose h3 {
  font-size: 22px;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em 1.5em;
}

.prose li {
  margin-bottom: 0.5em;
}

/* ===== 网格 ===== */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 991px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-float);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 163, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 163, 0.06);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-head);
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-sub);
  font-size: 15px;
  line-height: 1.7;
}

/* ===== 章节 ===== */
.section {
  padding: 100px 0;
}

.section-header {
  margin-bottom: 48px;
  position: relative;
}

.section-no {
  display: block;
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 900;
  font-family: var(--font-head);
  transform: skew(-4deg);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-sub);
  max-width: 560px;
}

/* ===== 页面主视觉 ===== */
.page-hero {
  position: relative;
  padding: calc(var(--header-total) + 40px) 0 64px;
  background: linear-gradient(180deg, rgba(11, 17, 26, 0.7), var(--bg-dark));
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(0, 255, 163, 0.12), transparent 60%);
  transform: skew(-12deg);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  bottom: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1), transparent 60%);
  transform: skew(15deg);
  pointer-events: none;
}

.page-hero-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  transform: skew(-5deg);
  margin-bottom: 16px;
}

.page-hero-desc {
  position: relative;
  z-index: 1;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-sub);
}

/* ===== 数据样式 ===== */
.data-label {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-sub);
  display: block;
  margin-bottom: 4px;
}

.data-value {
  font-family: var(--font-data);
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
}

.highlight-green {
  color: var(--green);
}

.highlight-blue {
  color: var(--blue);
}

.highlight-gold {
  color: var(--gold);
}

/* ===== 响应式 ===== */
@media (max-width: 991px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding: 56px 0 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  :root {
    --header-total: 90px;
  }

  .container {
    padding-inline: 16px;
  }

  .header-announcement {
    min-height: 28px;
    font-size: 12px;
    padding: 4px 12px;
  }

  .announcement-label {
    display: none;
  }

  .header-inner {
    height: 60px;
  }

  .site-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 7, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    padding: 16px;
    gap: 2px;
  }

  .nav-list a {
    display: block;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  .nav-list a[aria-current="page"]::after {
    bottom: 8px;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0 32px;
  }

  .footer-links ul {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    padding: 64px 0;
  }

  .page-hero {
    padding: calc(var(--header-total) + 24px) 0 48px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

/* ===== 减弱动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .announcement-label {
    animation: none !important;
  }
}
