/* ============================================================
   疾云加速器 · 全站样式
   科技蓝 + 深色 主题
   ============================================================ */

:root {
  --bg: #070b14;
  --bg-2: #0b1120;
  --surface: #0f172a;
  --surface-2: #131c31;
  --surface-3: #182238;
  --border: #1e293b;
  --border-2: #27354d;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --accent: #22d3ee;
  --accent-2: #06b6d4;
  --text: #e6eaf2;
  --text-2: #a3b0c4;
  --text-3: #64748b;
  --grad: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --grad-soft: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.18) 0%,
    rgba(34, 211, 238, 0.12) 100%
  );
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --shadow-blue: 0 12px 40px -12px rgba(59, 130, 246, 0.5);
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景网格光效 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      1200px 600px at 80% -10%,
      rgba(59, 130, 246, 0.18),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 10% 110%,
      rgba(34, 211, 238, 0.14),
      transparent 55%
    );
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 11, 20, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
}

.logo .logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-blue);
  flex: 0 0 auto;
}

.logo .logo-mark svg {
  width: 22px;
  height: 22px;
}

.logo em {
  font-style: normal;
  color: var(--accent);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-cta {
  margin-left: 8px;
  padding: 9px 20px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff !important;
  font-weight: 600;
  box-shadow: var(--shadow-blue);
}

.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ============ Hero ============ */
.hero {
  padding: 92px 0 76px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.hero h1 {
  font-size: 56px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero h1 .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero .lead {
  font-size: 19px;
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition:
    transform 0.15s,
    box-shadow 0.2s,
    background 0.2s;
  text-decoration: none;
}

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

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 16px 46px -12px rgba(59, 130, 246, 0.65);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--primary);
}

/* ============ 区块通用 ============ */
.section {
  padding: 60px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-2);
  font-size: 16px;
}

.section-head h2 .grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============ 线路/节点卡片 ============ */
.routes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.route-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  overflow: hidden;
}

.route-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.2s;
}

.route-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}

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

.route-card .rc-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--accent);
}

.route-card .rc-icon svg {
  width: 24px;
  height: 24px;
}

.route-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
}

.route-card .rc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #34d399;
  margin-bottom: 10px;
}

.route-card .rc-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.route-card .rc-desc {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 16px;
  min-height: 44px;
}

.route-card .rc-actions {
  display: flex;
  gap: 10px;
}

.btn-sm {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-sm.copy-btn {
  background: var(--grad);
  color: #fff;
}

.btn-sm.copy-btn:hover {
  box-shadow: var(--shadow-blue);
}

.btn-sm.link-btn {
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-2);
}

.btn-sm.link-btn:hover {
  color: var(--accent);
  border-color: var(--primary);
}

/* ============ 下载区 ============ */
.download-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.dl-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.dl-card .dl-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: var(--grad-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: grid;
  place-items: center;
  color: var(--accent);
}

.dl-card .dl-icon svg {
  width: 28px;
  height: 28px;
}

.dl-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.dl-card p {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 16px;
}

/* ============ 特性 ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.feature .f-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--grad-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.feature .f-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p {
  font-size: 15px;
  color: var(--text-2);
}

/* ============ 文章卡片 ============ */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}

.article-card .ac-cover {
  height: 150px;
  background: var(--grad-soft);
  position: relative;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.article-card .ac-cover svg {
  width: 48px;
  height: 48px;
  opacity: 0.7;
}

.article-card .ac-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .ac-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--grad-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.article-card h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card .ac-excerpt {
  font-size: 14px;
  color: var(--text-2);
  flex: 1;
  margin-bottom: 16px;
}

.article-card .ac-meta {
  font-size: 13px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============ 面包屑 ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-3);
  padding: 22px 0;
}

.breadcrumb a {
  color: var(--text-2);
}

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

.breadcrumb .sep {
  color: var(--text-3);
}

.breadcrumb .current {
  color: var(--text);
}

/* ============ 页面标题区 ============ */
.page-hero {
  padding: 56px 0 24px;
  text-align: center;
}

.page-hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 14px;
}

.page-hero p {
  color: var(--text-2);
  font-size: 17px;
  max-width: 640px;
  margin: 0 auto;
}

/* ============ 文章列表布局 ============ */
.list-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  padding: 20px 0 70px;
  align-items: start;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-list .article-card {
  flex-direction: row;
}

.article-list .article-card .ac-cover {
  width: 220px;
  height: auto;
  min-height: 160px;
  flex: 0 0 auto;
}

.article-list .article-card .ac-body {
  padding: 24px;
}

/* ============ 侧边栏 ============ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.side-widget h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.side-widget ul {
  list-style: none;
}

.side-widget li {
  margin-bottom: 12px;
}

.side-widget li:last-child {
  margin-bottom: 0;
}

.side-widget li a {
  color: var(--text-2);
  font-size: 14px;
  display: block;
  line-height: 1.5;
}

.side-widget li a:hover {
  color: var(--accent);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
}

.tag-cloud a:hover {
  color: var(--accent);
  border-color: var(--primary);
}

/* ============ 文章详情 ============ */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 0 70px;
}

.article-page .ap-header {
  margin-bottom: 32px;
}

.article-page .ap-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--grad-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.article-page h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin-bottom: 18px;
}

.article-page .ap-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--text-3);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-page .ap-meta .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.article-body {
  font-size: 17px;
  color: var(--text);
  line-height: 1.9;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}

.article-body h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 12px;
}

.article-body p {
  margin-bottom: 18px;
  color: #cdd5e2;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
  color: #cdd5e2;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body strong {
  color: var(--text);
}

.article-body a {
  color: var(--accent);
  border-bottom: 1px dashed rgba(34, 211, 238, 0.4);
}

.article-body blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  background: var(--grad-soft);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  color: var(--text-2);
  font-size: 15px;
}

.article-body .tip {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-left: 4px solid #34d399;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
  color: #d1fae5;
}

.article-body .warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-left: 4px solid #fbbf24;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 15px;
  color: #fef3c7;
}

.article-body code {
  font-family: "SF Mono", "JetBrains Mono", Consolas, monospace;
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  color: var(--accent);
}

.article-body pre {
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 20px 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: #d6e2f0;
  font-size: 14px;
  line-height: 1.7;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border);
  padding: 12px 14px;
  text-align: left;
}

.article-body th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.article-body td {
  color: #cdd5e2;
}

/* 文章底部标签 */
.ap-tags {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ap-tags span {
  color: var(--text-3);
  font-size: 14px;
}

.ap-tags a {
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 999px;
}

.ap-tags a:hover {
  color: var(--accent);
  border-color: var(--primary);
}

/* 相关文章 */
.related {
  margin-top: 48px;
}

.related h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 48px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-2);
  font-size: 14px;
  max-width: 300px;
  margin-top: 12px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-2);
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

/* ============ Toast 提示 ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.25s;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ 回到顶部 ============ */
.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 99;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  border-color: var(--primary);
  color: var(--accent);
}

/* ============ 分页 ============ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 14px;
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--accent);
}

.pagination .current {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .routes-grid,
  .download-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .list-layout {
    grid-template-columns: 1fr;
  }
  .article-list .article-card {
    flex-direction: column;
  }
  .article-list .article-card .ac-cover {
    width: 100%;
    height: 180px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 38px;
  }
  .section-head h2 {
    font-size: 27px;
  }
  .page-hero h1 {
    font-size: 32px;
  }
  .article-page h1 {
    font-size: 29px;
  }
  .routes-grid,
  .download-grid,
  .features-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
}
