﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (Smoothness & Performance Optimization)
   ========================================================== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

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

/* 硬件加速与流畅悬停 */
a, button, .media-news-card, .btn-media-primary, .btn-media-secondary, .faq-card, .intro-panel {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* 移动端平滑滚动与防抖 */
.table-wrapper, .table-container, .code-box, pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* 媒体图片防溢出与自适应 */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 消除点击高亮延迟 */
a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* 霓虹黑紫风设计系统变量 (Neon Cyberpunk Dark Purple Tokens) */
  --neon-bg: #07070d;            /* 极深曜石黑底 */
  --neon-bg-alt: #0e0d1a;        /* 辅助黑紫底 */
  --neon-surface: #121024;       /* 暗夜紫卡片 */
  --neon-surface-hover: #191633;
  
  --neon-purple: #a855f7;        /* 核心霓虹紫 */
  --neon-purple-glow: rgba(168, 85, 247, 0.35);
  --neon-magenta: #ec4899;       /* 霓虹洋红 */
  --neon-cyan: #06b6d4;          /* 赛博电光青 */
  --neon-blue: #6366f1;          /* 靛蓝发光 */
  
  --neon-border: rgba(168, 85, 247, 0.22);
  --neon-border-strong: rgba(168, 85, 247, 0.5);
  --neon-border-glow: 0 0 15px rgba(168, 85, 247, 0.25);
  
  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background: var(--neon-bg);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.85;
}

a { color: var(--neon-purple); text-decoration: none; font-weight: 700; }
a:hover { color: var(--neon-magenta); text-decoration: underline; text-shadow: 0 0 8px var(--neon-purple-glow); }

.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

/* 顶部独立声明栏 */
.neon-topbar {
  background: #0b0a14;
  color: #a1a1aa;
  font-size: 12.5px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.neon-pill {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.2);
}
.topbar-text strong { color: #ffffff; }

/* 头部导航 */
.neon-header {
  background: rgba(14, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--neon-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  gap: 20px;
}
.neon-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.neon-logo-glow {
  font-size: 24px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}
.neon-title-group {
  display: flex;
  flex-direction: column;
}
.neon-main-title {
  font-size: 20px;
  font-weight: 950;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.neon-main-title span {
  background: linear-gradient(90deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.neon-sub-title {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a {
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  background: rgba(18, 16, 36, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.18);
  transition: all .2s ease;
}
.nav a:hover, .nav a.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--neon-purple);
  color: #f3e8ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
  text-decoration: none;
}

/* Hero 首屏 - 霓虹黑紫强视觉 */
.hero {
  padding: 54px 0 46px;
  background: radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.15) 0%, rgba(7, 7, 13, 1) 70%);
  border-bottom: 1px solid var(--neon-border);
  position: relative;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(168, 85, 247, 0.12);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}
.hero h1 {
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 950;
  line-height: 1.35;
  color: #ffffff;
  margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}
.hero p {
  font-size: 16.5px;
  color: #cbd5e1;
  max-width: 960px;
  line-height: 1.85;
  margin-bottom: 26px;
}
.hero strong {
  color: #c084fc;
  text-shadow: 0 0 6px rgba(192, 132, 252, 0.4);
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 6px;
  transition: all .2s ease;
}
.btn.primary {
  background: linear-gradient(135deg, #9333ea, #db2777);
  color: #ffffff;
  border: 1px solid rgba(236, 72, 153, 0.5);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.6);
  text-decoration: none;
  transform: translateY(-2px);
}
.btn.secondary {
  background: rgba(18, 16, 36, 0.8);
  color: #f1f5f9;
  border: 1px solid var(--neon-border);
}
.btn.secondary:hover {
  background: rgba(25, 22, 51, 0.9);
  border-color: var(--neon-purple);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
  text-decoration: none;
}

/* 霓虹数据看板 (Cyber Stat Matrix) */
.cyber-stat-matrix {
  background: rgba(18, 16, 36, 0.7);
  border: 1px solid var(--neon-border);
  border-radius: 8px;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.stat-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.stat-icon {
  font-size: 24px;
  color: var(--neon-purple);
  text-shadow: 0 0 10px var(--neon-purple-glow);
}
.stat-info strong {
  display: block;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 2px;
}
.stat-info span {
  font-size: 12px;
  color: #94a3b8;
}

/* 通用 Section */
.section {
  padding: 48px 0;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}
.section-head h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  font-weight: 950;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}
.section-note {
  max-width: 480px;
  color: #94a3b8;
  font-size: 14px;
}

/* 六宫格功能模块区 - 霓虹发光卡片 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.neon-card {
  background: var(--neon-surface);
  border: 1px solid var(--neon-border);
  border-radius: 8px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
}
.neon-card:hover {
  transform: translateY(-3px);
  background: var(--neon-surface-hover);
  border-color: var(--neon-purple);
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.28);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.card-tag {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #d8b4fe;
  background: rgba(168, 85, 247, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.card-code {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--neon-cyan);
  font-weight: 700;
}
.neon-card h3 {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}
.neon-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
  flex: 1;
}

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.intro-box {
  background: var(--neon-surface);
  border: 1px solid var(--neon-border);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.intro-box h3 {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.intro-box p {
  font-size: 14.5px;
  color: var(--text-body);
  margin-bottom: 14px;
  line-height: 1.85;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 12px;
}
.intro-box li {
  font-size: 14px;
  color: #e2e8f0;
  padding-left: 24px;
  position: relative;
}
.intro-box li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  font-size: 13px;
  color: var(--neon-purple);
}

/* 热门教程表格 */
.table-wrap {
  background: var(--neon-surface);
  border: 1px solid var(--neon-border);
  border-radius: 8px;
  overflow-x: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
  font-size: 14px;
  vertical-align: middle;
}
th {
  background: #0e0d1a;
  color: #ffffff;
  font-weight: 900;
  border-bottom: 2px solid var(--neon-border);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(168, 85, 247, 0.06); }
.level-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-mono);
}
.level-badge.easy { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }
.level-badge.medium { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.level-badge.hard { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }

/* FAQ 折叠面板 */
.faq-list {
  display: grid;
  gap: 12px;
}
details {
  background: var(--neon-surface);
  border: 1px solid var(--neon-border);
  border-radius: 6px;
  padding: 18px 24px;
  transition: all .2s ease;
}
details:hover {
  border-color: var(--neon-purple);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.2);
}
summary {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 18px;
  color: var(--neon-purple);
  font-weight: 900;
}
details[open] summary::after { content: "−"; }
details p {
  margin-top: 12px;
  color: var(--text-body);
  font-size: 14.5px;
  line-height: 1.85;
}

/* 子页面文章 */
.article {
  max-width: 900px;
  margin: 36px auto;
  background: var(--neon-surface);
  border: 1px solid var(--neon-border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}
.article h1 {
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 950;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.35;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}
.article-lead {
  background: rgba(168, 85, 247, 0.1);
  border-left: 4px solid var(--neon-purple);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 14.5px;
  color: var(--text-body);
  border-radius: 0 6px 6px 0;
  line-height: 1.85;
}
.article h2 {
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  margin: 28px 0 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
}
.article p, .article li {
  color: var(--text-body);
  font-size: 14.5px;
  margin-bottom: 12px;
  line-height: 1.85;
}
.article ul { margin-left: 20px; }

/* 页脚 */
.neon-footer {
  margin-top: 50px;
  background: #0b0a14;
  color: #94a3b8;
  padding: 46px 0 26px;
  border-top: 1px solid rgba(168, 85, 247, 0.2);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 28px;
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}
.footer-brand p {
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 440px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-nav a {
  color: #cbd5e1;
  background: #18162e;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}
.footer-nav a:hover {
  background: var(--neon-purple);
  color: #ffffff;
  border-color: var(--neon-purple);
  box-shadow: 0 0 10px var(--neon-purple-glow);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  padding-top: 18px;
  font-size: 12.5px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 960px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .grid-6, .intro-grid, .cyber-stat-matrix, .footer-top { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .article { padding: 22px 16px; }
  .topbar-inner { flex-direction: column; align-items: flex-start; }
}
