/* ============================================
   NeoWarp 官网 - 全局样式
   深色模式 / 玻璃拟态 / 霓虹强调色
   ============================================ */

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../font/HarmonyOS_Sans_SC_Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('../font/HarmonyOS_Sans_SC_Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- CSS 变量 ---------- */
:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(10, 10, 10, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --accent-cyan: #00d2ff;
  --accent-purple: #7b2ff7;
  --accent-cyan-glow: rgba(0, 210, 255, 0.35);
  --accent-purple-glow: rgba(123, 47, 247, 0.35);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --nav-height: 64px;
  --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'HarmonyOS Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--accent-cyan);
  color: #000;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   导航栏
   ============================================ */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: var(--max-width);
  height: var(--nav-height);
  background: rgba(15, 15, 15, 0.65);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 20px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.75);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.3px;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.nav-brand-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transition: opacity var(--transition);
}

.navbar.scrolled .nav-brand-text {
  opacity: 1;
}

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

.nav-link {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), rgba(123, 47, 247, 0.15));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link.active {
  color: var(--text);
  background: rgba(0, 210, 255, 0.12);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
}

/* ============================================
   主页 - 首屏 Hero
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: glow-pulse 8s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero-glow.cyan {
  width: 600px;
  height: 600px;
  background: var(--accent-cyan);
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  animation: glow-float-cyan 12s ease-in-out infinite;
}

.hero-glow.purple {
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
  bottom: 10%;
  left: 30%;
  animation: glow-float-purple 14s ease-in-out infinite, glow-pulse 8s ease-in-out infinite -4s;
}

@keyframes glow-float-cyan {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  33% { transform: translateX(-45%) translateY(-30px) scale(1.05); }
  66% { transform: translateX(-55%) translateY(20px) scale(0.95); }
}

@keyframes glow-float-purple {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.1); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.5; transform: translateX(-50%) scale(1.1); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  animation: grid-pan 20s linear infinite;
}

@keyframes grid-pan {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  animation: hero-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes hero-enter {
  0% { opacity: 0; transform: translateY(40px) scale(0.96); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.hero-title {
  font-size: clamp(60px, 14vw, 180px);
  font-weight: 900;
  letter-spacing: -6px;
  line-height: 0.9;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.5) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform, opacity;
  animation: title-glow 4s ease-in-out infinite;
}

@keyframes title-glow {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.15)); }
  50% { filter: drop-shadow(0 0 50px rgba(0, 210, 255, 0.25)); }
}

.hero-subtitle {
  margin-top: 24px;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 2px;
  will-change: opacity;
  animation: subtitle-enter 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes subtitle-enter {
  0% { opacity: 0; transform: translateY(20px); letter-spacing: 8px; }
  100% { opacity: 1; transform: translateY(0); letter-spacing: 2px; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  animation: badge-enter 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.2);
  transform: translateY(-2px);
}

@keyframes badge-enter {
  0% { opacity: 0; transform: translateY(-20px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan-glow);
  animation: dot-blink 2s ease-in-out infinite;
}

@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-tertiary);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: scroll-hint-bounce 2s ease-in-out infinite;
}

.hero-scroll-hint .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ============================================
   主页 - 功能介绍
   ============================================ */
.features {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.feature-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.feature-section.reverse {
  direction: rtl;
}

.feature-section.reverse > * {
  direction: ltr;
}

.feature-text {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-text.visible .feature-icon {
  animation: icon-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.feature-text.visible .feature-tag {
  animation: slide-fade-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.feature-text.visible .feature-title {
  animation: slide-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.feature-text.visible .feature-desc {
  animation: slide-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.feature-text.visible .feature-list li {
  animation: slide-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.feature-text.visible .feature-list li:nth-child(1) { animation-delay: 0.5s; }
.feature-text.visible .feature-list li:nth-child(2) { animation-delay: 0.58s; }
.feature-text.visible .feature-list li:nth-child(3) { animation-delay: 0.66s; }
.feature-text.visible .feature-list li:nth-child(4) { animation-delay: 0.74s; }

@keyframes icon-pop {
  0% { opacity: 0; transform: scale(0.5) rotate(-15deg); }
  60% { transform: scale(1.1) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes slide-fade-in {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.feature-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan-glow), var(--accent-purple-glow));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-section:hover .feature-icon {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--border-hover);
}

.feature-section:hover .feature-icon::before {
  opacity: 0.3;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  position: relative;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-section:hover .feature-icon svg {
  transform: scale(1.15);
}

.feature-icon.cyan svg { color: var(--accent-cyan); }
.feature-icon.purple svg { color: var(--accent-purple); }

.feature-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-tag.cyan {
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 210, 255, 0.2);
}

.feature-tag.purple {
  background: rgba(123, 47, 247, 0.1);
  color: var(--accent-purple);
  border: 1px solid rgba(123, 47, 247, 0.2);
}

.feature-section:hover .feature-tag.cyan {
  background: rgba(0, 210, 255, 0.18);
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.2);
}

.feature-section:hover .feature-tag.purple {
  background: rgba(123, 47, 247, 0.18);
  border-color: rgba(123, 47, 247, 0.4);
  box-shadow: 0 0 16px rgba(123, 47, 247, 0.2);
}

.feature-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 16px;
  line-height: 1.15;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-section:hover .feature-title {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-list li:hover {
  background: var(--bg-card);
  color: var(--text);
  transform: translateX(4px);
}

.feature-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin-top: 7px;
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--accent-cyan-glow);
  transition: all 0.3s ease;
}

.feature-list li:hover::before {
  transform: scale(1.5);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.feature-section.reverse .feature-list li::before {
  background: var(--accent-purple);
  box-shadow: 0 0 6px var(--accent-purple-glow);
}

.feature-image {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.feature-image.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.feature-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), transparent 40%, transparent 60%, rgba(123, 47, 247, 0.15));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 1;
}

.feature-image:hover {
  border-color: var(--border-hover);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 210, 255, 0.1);
}

.feature-image:hover::after {
  opacity: 1;
}

.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-image:hover .feature-img {
  transform: scale(1.08);
}

.feature-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(0, 210, 255, 0.04), rgba(123, 47, 247, 0.04)),
    var(--bg-elevated);
  position: relative;
}

.feature-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 30px 30px;
}

.feature-image-placeholder .placeholder-label {
  position: relative;
  color: var(--text-tertiary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.feature-image-placeholder .placeholder-label svg {
  width: 40px;
  height: 40px;
  opacity: 0.4;
}

/* ============================================
   页脚
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-purple), transparent);
  animation: footer-line 3s ease-in-out infinite;
}

@keyframes footer-line {
  0%, 100% { width: 200px; opacity: 0.5; }
  50% { width: 400px; opacity: 1; }
}

.footer a {
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer a:hover {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 210, 255, 0.5);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
  border-radius: 1px;
}

.footer-links a:hover::after {
  width: 100%;
}

/* ============================================
   Wiki 页
   ============================================ */
.wiki-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.wiki-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 32px 0;
  z-index: 100;
}

.wiki-sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.wiki-sidebar-header a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
}

.wiki-sidebar-header img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.wiki-sidebar-header .brand-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wiki-toc {
  list-style: none;
  padding: 0 12px;
}

.wiki-toc-item {
  margin-bottom: 2px;
}

.wiki-toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}

.wiki-toc-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent-cyan);
  border-radius: 2px;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiki-toc-link:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  transform: translateX(2px);
}

.wiki-toc-link.active {
  background: rgba(0, 210, 255, 0.1);
  color: var(--accent-cyan);
}

.wiki-toc-link.active::before {
  height: 60%;
  box-shadow: 0 0 8px var(--accent-cyan-glow);
}

.wiki-toc-link .toggle-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  opacity: 0.6;
}

.wiki-toc-item.expanded .wiki-toc-link .toggle-icon {
  transform: rotate(90deg);
  opacity: 1;
}

.wiki-toc-link.leaf .toggle-icon {
  opacity: 0;
}

.wiki-toc-sub {
  list-style: none;
  padding-left: 20px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.wiki-toc-item.expanded > .wiki-toc-sub {
  max-height: 1000px;
  opacity: 1;
}

.wiki-toc-item.expanded > .wiki-toc-sub > li {
  animation: toc-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wiki-toc-item.expanded > .wiki-toc-sub > li:nth-child(1) { animation-delay: 0.05s; }
.wiki-toc-item.expanded > .wiki-toc-sub > li:nth-child(2) { animation-delay: 0.1s; }
.wiki-toc-item.expanded > .wiki-toc-sub > li:nth-child(3) { animation-delay: 0.15s; }
.wiki-toc-item.expanded > .wiki-toc-sub > li:nth-child(4) { animation-delay: 0.2s; }
.wiki-toc-item.expanded > .wiki-toc-sub > li:nth-child(5) { animation-delay: 0.25s; }

@keyframes toc-slide-in {
  0% { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}

.wiki-toc-sub .wiki-toc-link {
  font-size: 13px;
  padding: 6px 12px;
}

.wiki-content {
  flex: 1;
  margin-left: 300px;
  padding: 64px 80px;
  max-width: 900px;
}

.wiki-content-section {
  margin-bottom: 64px;
  scroll-margin-top: 32px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiki-content-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.wiki-content-section h2 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.wiki-content-section h3 {
  font-size: 22px;
  font-weight: 900;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text);
}

.wiki-content-section h4 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--accent-cyan);
}

.wiki-content-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.wiki-content-section ul,
.wiki-content-section ol {
  margin: 0 0 16px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

.wiki-content-section li {
  margin-bottom: 6px;
}

.wiki-content-section code {
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  font-size: 13px;
  background: rgba(0, 210, 255, 0.08);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 210, 255, 0.15);
}

.wiki-content-section pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.wiki-content-section pre code {
  background: none;
  border: none;
  color: var(--text);
  padding: 0;
  font-size: 13px;
}

.wiki-callout {
  background: rgba(0, 210, 255, 0.05);
  border: 1px solid rgba(0, 210, 255, 0.15);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.wiki-callout.warning {
  background: rgba(255, 180, 0, 0.05);
  border-color: rgba(255, 180, 0, 0.15);
  border-left-color: #ffb400;
}

.wiki-callout strong {
  color: var(--text);
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}

.wiki-table th,
.wiki-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.wiki-table th {
  color: var(--text);
  font-weight: 700;
  background: var(--bg-card);
}

.wiki-table td {
  color: var(--text-secondary);
}

.wiki-mobile-toggle {
  display: none;
}

/* ============================================
   下载页
   ============================================ */
.download-page {
  padding-top: calc(var(--nav-height) + 48px);
  min-height: 100vh;
}

.download-header {
  text-align: center;
  padding: 64px 24px 48px;
}

.download-header h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.download-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.download-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 20px;
}

.download-version .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

.download-cards {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  animation: card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.download-card:nth-child(1) { animation-delay: 0.1s; }
.download-card:nth-child(2) { animation-delay: 0.2s; }
.download-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes card-enter {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.download-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 210, 255, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.download-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-8px);
  box-shadow: 
    0 24px 50px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 210, 255, 0.08);
}

.download-card:hover::before {
  opacity: 1;
}

.download-card:hover::after {
  opacity: 1;
}

.download-card-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.download-card:hover .download-card-icon {
  transform: translateY(-4px) scale(1.08);
  border-color: var(--border-hover);
}

.download-card-icon svg {
  width: 36px;
  height: 36px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-card:hover .download-card-icon svg {
  transform: scale(1.1);
}

.download-card.windows .download-card-icon svg { color: #00a4ef; }
.download-card.macos .download-card-icon svg { color: #ffffff; }
.download-card.linux .download-card-icon svg { color: #f0a000; }

.download-card h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.download-card:hover h3 {
  transform: translateY(-2px);
}

.download-card .version {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.download-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.download-btn:hover {
  border-color: rgba(0, 210, 255, 0.3);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.download-btn:hover::before {
  opacity: 1;
}

.download-btn svg {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-btn:hover svg {
  transform: translateY(2px);
}

.download-btn.primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  color: #000;
  background-size: 200% 200%;
  background-position: 0% 0%;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-position 0.5s ease;
}

.download-btn.primary::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
}

.download-btn.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 210, 255, 0.35);
  color: #000;
  background-position: 100% 100%;
}

.download-btn.primary svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.download-btn.primary:hover svg {
  transform: translateY(3px) scale(1.1);
}

.download-card .arch {
  font-size: 12px;
  color: var(--text-tertiary);
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* 待适配卡片 */
.download-card.pending {
  opacity: 0.7;
  cursor: not-allowed;
}

.download-card.pending:hover {
  transform: none;
  box-shadow: none;
}

.download-card.pending::before {
  opacity: 0;
}

.download-card.pending .version {
  color: var(--text-tertiary);
}

.download-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px dashed var(--border);
  color: var(--text-tertiary);
  font-size: 14px;
}

.download-pending svg {
  width: 20px;
  height: 20px;
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.download-info {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.download-info h2 {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 24px;
  text-align: center;
}

.download-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.info-card:hover::before {
  transform: scaleY(1);
}

.info-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  transition: color 0.3s ease;
}

.info-card:hover h4 {
  color: var(--accent-cyan);
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-height) + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .feature-section {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 64px 24px;
  }

  .feature-section.reverse {
    direction: ltr;
  }

  .download-cards {
    grid-template-columns: 1fr;
  }

  .download-info-grid {
    grid-template-columns: 1fr;
  }

  .wiki-sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 200;
  }

  .wiki-sidebar.open {
    transform: translateX(0);
  }

  .wiki-content {
    margin-left: 0;
    padding: 48px 24px;
  }

  .wiki-mobile-toggle {
    display: flex;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 150;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
  }

  .wiki-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .wiki-overlay.open {
    display: block;
  }
}

@media (max-width: 600px) {
  .hero-title {
    letter-spacing: -3px;
  }

  .download-card {
    padding: 32px 24px;
  }
}
