﻿/* ==========================================================
   上线性能与顺滑度增强引擎 (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 {
  --bg: #070b14;
  --surface: rgba(15, 23, 42, 0.75);
  --surface-solid: #0f172a;
  --surface-hover: rgba(30, 41, 59, 0.9);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --line: rgba(255, 255, 255, 0.08);
  --border-curve: rgba(56, 189, 248, 0.2);
  
  --brand-cyan: #06b6d4;
  --brand-blue: #3b82f6;
  --brand-indigo: #6366f1;
  --brand-purple: #a855f7;
  --brand-teal: #14b8a6;
}

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

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
  position: relative;
  overflow-x: hidden;
}

/* 科技动感波浪与曲线渐变背景 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.015) 0px, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 16px),
    repeating-linear-gradient(-45deg, rgba(56, 189, 248, 0.01) 0px, rgba(56, 189, 248, 0.01) 2px, transparent 2px, transparent 16px);
  z-index: -1;
  pointer-events: none;
}

a { color: var(--brand-cyan); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }

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

/* 顶部声明栏 */
.notice {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--line);
  color: #94a3b8;
  font-size: 13px;
  padding: 10px 0;
  backdrop-filter: blur(8px);
}
.notice-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice-badge {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #070b14;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 导航栏 */
.site-header {
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  min-height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-size: 20px;
  font-weight: 900;
  border-bottom: none;
}
.brand-wave {
  color: var(--brand-cyan);
  font-size: 22px;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a {
  color: #cbd5e1;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: all .2s ease;
}
.nav a:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  text-decoration: none;
}

/* 首屏 Hero */
.hero {
  padding: 60px 0 48px;
  position: relative;
}
.wave-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  color: var(--brand-cyan);
  border: 1px solid var(--border-curve);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(32px, 5.2vw, 56px);
  font-weight: 950;
  line-height: 1.16;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 70%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
  max-width: 960px;
}
.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.7;
}
.hero strong { color: #ffffff; -webkit-text-fill-color: #ffffff; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  margin-bottom: 40px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  transition: all .2s ease;
}
.button.primary {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #070b14;
  border: 1px solid #06b6d4;
  box-shadow: 0 4px 24px rgba(6, 182, 212, 0.35);
}
.button.primary:hover {
  filter: brightness(1.1);
  text-decoration: none;
}
.button.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
  text-decoration: none;
}

/* 动感波浪卡片组 */
.wave-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 10px;
}
.wave-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-curve);
  border-radius: 20px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: all .25s ease;
}
.wave-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #a855f7);
}
.wave-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15);
}
.wave-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.wave-icon {
  font-size: 26px;
  display: inline-flex;
  padding: 8px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
}
.wave-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.1);
  color: var(--brand-cyan);
}
.wave-card h3 {
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 8px;
}
.wave-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* 通用 Section */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(26px, 3.8vw, 36px);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
}
.section-note {
  max-width: 480px;
  color: var(--text-dim);
  font-size: 15px;
}

/* 六宫格功能模块区 */
.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: all .2s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-cyan);
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--brand-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 8px;
  border-radius: 999px;
}
.card-num {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
}
.card h3 {
  font-size: 19px;
  font-weight: 900;
  margin-bottom: 10px;
  color: #ffffff;
}
.card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.card strong { color: var(--text-main); }

/* 正文介绍区 */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.intro-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  backdrop-filter: blur(8px);
}
.intro-box h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-box p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 14px;
}
.intro-box ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.intro-box li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.intro-box li::before {
  content: "〰️";
  position: absolute;
  left: 0;
  color: var(--brand-cyan);
  font-size: 12px;
}

/* 热门教程表格 */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow-x: auto;
  backdrop-filter: blur(8px);
}
table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
th, td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
th {
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.03); }
.level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.level-badge.easy { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }
.level-badge.medium { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.level-badge.hard { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

/* FAQ 区域 */
.faq-list {
  display: grid;
  gap: 12px;
}
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  backdrop-filter: blur(8px);
}
summary {
  font-size: 17px;
  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: 20px;
  color: var(--brand-cyan);
  font-weight: 900;
}
details[open] summary::after {
  content: "−";
}
details p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* 子页面文章样式 */
.article {
  max-width: 900px;
  margin: 44px auto;
  background: var(--surface);
  border: 1px solid var(--border-curve);
  border-radius: 20px;
  padding: 42px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.article h1 {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 950;
  color: #ffffff;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  line-height: 1.25;
}
.article-lead {
  font-size: 16px;
  color: var(--text-muted);
  border-left: 4px solid var(--brand-cyan);
  padding: 12px 18px;
  margin-bottom: 28px;
  background: rgba(6, 182, 212, 0.05);
  border-radius: 0 10px 10px 0;
}
.article h2 {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin: 32px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.article p, .article li {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 14px;
  line-height: 1.8;
}
.article ul { margin-left: 20px; }
.article .wave-note {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
  color: #67e8f9;
  font-size: 14px;
}
.article .wave-note strong { color: #ffffff; }

/* 页脚 */
.site-footer {
  margin-top: 56px;
  background: #04070e;
  color: #94a3b8;
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 30px;
}
.footer-brand strong {
  display: block;
  font-size: 17px;
  color: #ffffff;
  margin: 8px 0 4px;
}
.footer-brand p {
  font-size: 13px;
  color: #64748b;
  max-width: 440px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-links a {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
}
.footer-links a:hover {
  background: var(--brand-cyan);
  color: #070b14;
  border-color: var(--brand-cyan);
  text-decoration: none;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 13px;
  color: #475569;
  text-align: center;
}

/* 响应式适配 */
@media (max-width: 860px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 14px 0; }
  .wave-cards-grid, .grid-6, .intro-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-top { flex-direction: column; }
  .article { padding: 24px 18px; }
  .notice-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}
