:root {
  --deep-purple: #2A0A4A;
  --royal-purple: #5B2A86;
  --gold: #D4AF37;
  --light-gold: #E8C874;
  --neon-blue: #00C2FF;
  --ink-purple: #12061F;
  --mist-white: #F2EAE4;
  --steel-gray: #8A8FA3;
  --cream: #F8F4E3;
  --title-font: 'Rajdhani', 'DIN Alternate', 'PingFang SC', sans-serif;
  --body-font: 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
  --mono-font: 'JetBrains Mono', 'Roboto Mono', monospace;
  --header-h: 72px;
  --transition-base: 0.3s ease;
  --radius: 4px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  font-family: var(--body-font);
  background: var(--ink-purple);
  color: var(--mist-white);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(212, 175, 55, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  background: var(--neon-blue);
  color: var(--ink-purple);
  padding: 8px 16px;
  z-index: 2000;
  font-family: var(--mono-font);
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 12px;
}

a {
  color: var(--neon-blue);
  text-decoration: none;
}

a:hover {
  color: var(--light-gold);
}

:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 3px;
}

button {
  font-family: var(--body-font);
  cursor: pointer;
}

/* ========== 头部 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(18, 6, 31, 0.92);
  border-bottom: 1px solid var(--gold);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gold);
  color: var(--ink-purple);
  font-family: var(--mono-font);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
  border-radius: 0 8px 0 8px;
}

.brand-mark__text {
  font-family: var(--title-font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--mist-white);
}

.header-nav-wrap {
  display: flex;
  align-items: center;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 14px;
  color: var(--mist-white);
  font-family: var(--body-font);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--light-gold);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--light-gold);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link__index {
  font-family: var(--mono-font);
  font-size: 10px;
  color: var(--steel-gray);
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.search-toggle {
  background: transparent;
  border: 1px solid var(--steel-gray);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.search-toggle__icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--neon-blue);
  border-radius: 50%;
  position: relative;
}

.search-toggle__icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: var(--neon-blue);
  bottom: -4px;
  right: -4px;
  transform: rotate(45deg);
}

.search-toggle:hover,
.search-toggle:focus-visible {
  border-color: var(--neon-blue);
  transform: scale(1.05);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--ink-purple);
  border-radius: 0 10px 0 10px;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

.btn-download:hover,
.btn-download:focus-visible {
  background: var(--light-gold);
  color: var(--ink-purple);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--gold);
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 0 8px 0 8px;
  z-index: 1101;
  transition: border-color 0.3s ease;
}

.nav-toggle__bar {
  width: 22px;
  height: 1px;
  background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--neon-blue);
}

.header-search {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(42, 10, 74, 0.97);
  border-bottom: 1px solid var(--gold);
  padding: 20px 0;
  display: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.header-search[data-open="true"] {
  display: block;
}

.header-search .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-search__label {
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--steel-gray);
  letter-spacing: 1px;
}

.header-search__input {
  flex: 1;
  min-width: 220px;
  background: var(--ink-purple);
  border: 1px solid var(--steel-gray);
  border-radius: var(--radius);
  color: var(--mist-white);
  padding: 10px 14px;
  font-family: var(--body-font);
  font-size: 15px;
}

.header-search__input:focus {
  border-color: var(--neon-blue);
  outline: none;
}

.header-search__btn {
  background: transparent;
  border: 1px solid var(--neon-blue);
  color: var(--neon-blue);
  font-family: var(--mono-font);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: background 0.3s ease, color 0.3s ease;
}

.header-search__btn:hover,
.header-search__btn:focus-visible {
  background: var(--neon-blue);
  color: var(--ink-purple);
}

/* 移动端导航面板 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100vw);
  background: rgba(18, 6, 31, 0.98);
  border-left: 1px solid var(--gold);
  z-index: 1100;
  padding: 100px 40px 40px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  overflow-y: auto;
}

.mobile-nav[data-open="true"] {
  transform: translateX(0);
}

.mobile-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  color: var(--mist-white);
  font-size: 18px;
  font-weight: 500;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.mobile-nav__link:hover,
.mobile-nav__link:focus-visible {
  color: var(--light-gold);
  padding-left: 8px;
}

.mobile-nav__link[aria-current="page"] {
  color: var(--gold);
}

.mobile-nav__index {
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--steel-gray);
}

.mobile-nav__foot {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav__download {
  display: inline-flex;
  justify-content: center;
  background: var(--gold);
  color: var(--ink-purple);
  padding: 14px;
  font-weight: 700;
  border-radius: 0 10px 0 10px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.mobile-nav__download:hover,
.mobile-nav__download:focus-visible {
  background: var(--light-gold);
  transform: translateY(-2px);
}

.mobile-nav__ver {
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--steel-gray);
  text-align: center;
}

/* 滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--neon-blue));
  z-index: 2000;
  pointer-events: none;
}

/* ========== 页脚 ========== */
.site-footer {
  background: var(--ink-purple);
  border-top: 1px solid var(--gold);
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 2.5fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 48px;
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--gold);
  color: var(--ink-purple);
  font-family: var(--mono-font);
  font-weight: 700;
  font-size: 18px;
  border-radius: 0 10px 0 10px;
}

.footer-brand__name {
  font-family: var(--title-font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--mist-white);
}

.footer-brand__slogan {
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--neon-blue);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-brand__desc {
  font-size: 14px;
  color: var(--steel-gray);
  line-height: 1.8;
}

.footer-links__title {
  font-family: var(--mono-font);
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.footer-links__grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.footer-links__grid a {
  color: var(--mist-white);
  font-size: 15px;
  padding: 2px 0;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links__grid a:hover,
.footer-links__grid a:focus-visible {
  color: var(--light-gold);
  padding-left: 4px;
}

.footer-reach__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 14px;
  color: var(--mist-white);
}

.footer-reach__label {
  display: block;
  font-family: var(--mono-font);
  font-size: 11px;
  color: var(--steel-gray);
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.footer-reach__list a {
  color: var(--neon-blue);
  transition: color 0.3s ease;
}

.footer-reach__list a:hover,
.footer-reach__list a:focus-visible {
  color: var(--light-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(138, 143, 163, 0.3);
  padding: 20px 0;
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--steel-gray);
}

/* ========== 通用组件 ========== */
.tech-grid {
  position: relative;
}

.tech-grid::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(315deg, transparent 95%, rgba(212, 175, 55, 0.3) 95%, rgba(212, 175, 55, 0.3) 100%),
    linear-gradient(45deg, transparent 95%, rgba(212, 175, 55, 0.2) 95%, rgba(212, 175, 55, 0.2) 100%);
  background-size: 48px 48px;
  pointer-events: none;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono-font);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--steel-gray);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.corner-index {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--mono-font);
  font-size: 12px;
  color: var(--steel-gray);
  letter-spacing: 1px;
  z-index: 2;
}

/* 筛选按钮组 */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-tabs button {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--mono-font);
  font-size: 13px;
  letter-spacing: 1px;
  padding: 10px 20px;
  border-radius: 0 8px 0 8px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.filter-tabs button:hover,
.filter-tabs button:focus-visible {
  border-color: var(--light-gold);
  color: var(--light-gold);
}

.filter-tabs button[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--gold), var(--light-gold));
  color: var(--ink-purple);
  font-weight: 700;
}

.filter-panel {
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.filter-panel[data-hidden="true"] {
  opacity: 0;
  transform: translateY(-8px);
}

/* 显现动画卡片 */
.card-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.card-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .card-reveal {
    opacity: 1;
    transform: none;
  }
  .filter-panel {
    transition: opacity 0.1s ease;
  }
}

/* 返回顶部 */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 6, 31, 0.9);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 20px;
  z-index: 900;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.back-top[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-top:hover,
.back-top:focus-visible {
  background: var(--gold);
  color: var(--ink-purple);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono-font);
  font-size: 13px;
  color: var(--steel-gray);
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--gold);
}

.breadcrumb a {
  color: var(--neon-blue);
}

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

.breadcrumb [aria-current="page"] {
  color: var(--gold);
}

/* 通用文本容器 */
.prose {
  max-width: 720px;
  color: rgba(242, 234, 228, 0.85);
  font-size: 16px;
  line-height: 1.8;
}

.prose h1,
.prose h2,
.prose h3 {
  font-family: var(--title-font);
  color: var(--mist-white);
  margin: 40px 0 16px;
}

.prose h1 {
  font-size: 32px;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}

.prose h2 {
  font-size: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.prose h3 {
  font-size: 18px;
  color: var(--light-gold);
}

.prose p {
  margin-bottom: 16px;
}

.prose a {
  color: var(--neon-blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose a:hover {
  color: var(--light-gold);
}

.prose ul,
.prose ol {
  margin: 0 0 16px 24px;
}

.prose blockquote {
  border-left: 3px solid var(--neon-blue);
  padding: 16px 24px;
  background: rgba(91, 42, 134, 0.3);
  margin: 24px 0;
  color: var(--creation-light);
}

.prose code {
  font-family: var(--mono-font);
  font-size: 14px;
  background: rgba(0, 194, 255, 0.1);
  color: var(--neon-blue);
  padding: 2px 6px;
  border-radius: 3px;
}

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  background: var(--royal-purple);
  border: 1px solid var(--gold);
  border-radius: 0 16px 0 16px;
  overflow: hidden;
}

.media-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.media-frame--4x3 {
  aspect-ratio: 4 / 3;
}

.media-frame--1x1 {
  aspect-ratio: 1 / 1;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame::after {
  content: "PG/IMG";
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--mono-font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 2px 6px;
  background: rgba(18, 6, 31, 0.7);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .header-actions__download {
    display: none;
  }

  .site-nav {
    gap: 0;
  }

  .nav-link {
    padding: 10px 10px;
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .mobile-nav {
    display: block;
  }

  .header-actions {
    gap: 10px;
  }

  .header-search .container {
    flex-direction: column;
    align-items: stretch;
  }

  .search-toggle {
    display: inline-flex !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 40px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-mark__text {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .brand-mark__logo {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .footer-links__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
