/**
 * Theme Name: Lab
 * Theme URI: https://clashlab.com.cn/
 * Description: Clash Verge Lab - WP Theme
 * Version: 1.0.0
 * Author: Clash Verge
 * License: GPL-3.0
 * Text Domain: lab
 */

/* ============================================
   Clash Verge Lab — 实验室风格
   主色调：靛蓝→紫罗兰 (#4F46E5 → #7C3AED)
   排版：极简实验室风，状态标签、时间线、卡片网格
   ============================================ */

/* ===== CSS 变量系统 ===== */
:root {
  /* 主色调 — 靛蓝到紫罗兰 */
  --primary: #4F46E5;
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --primary-lighter: #EEF2FF;
  --secondary: #7C3AED;
  --secondary-dark: #6D28D9;
  --accent: #06B6D4;
  --gradient-start: #4F46E5;
  --gradient-end: #7C3AED;

  /* 功能色 */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --success-text: #065F46;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --warning-text: #92400E;
  --danger: #EF4444;
  --danger-bg: #FEF2F2;
  --danger-text: #991B1B;
  --info: #3B82F6;
  --info-bg: #EFF6FF;
  --info-text: #1E40AF;

  /* 实验室状态色 */
  --stable-color: #10B981;
  --beta-color: #F59E0B;
  --experimental-color: #8B5CF6;
  --idea-color: #94A3B8;

  /* 文字色 */
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* 背景色 — 浅色清爽 */
  --bg: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-lab: #F5F3FF;

  /* 边框/阴影 */
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-purple: 0 4px 20px rgba(79,70,229,0.15);

  /* 圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition: 0.25s ease;
  --transition-fast: 150ms ease;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--text-primary); background: var(--bg);
  line-height: 1.7; font-size: 15px; min-height: 100vh;
  display: flex; flex-direction: column; overflow-x: hidden;
}

a { text-decoration: none; color: var(--primary); transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }

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

ul, ol { list-style: none; padding: 0; margin: 0; }

/* ===== 容器 ===== */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; flex-shrink: 0;
}
.logo:hover { color: var(--text-primary); }
.logo-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; color: #fff;
}

.navbar-nav {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0; flex-shrink: 0;
}
.nav-link {
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-lighter); }

.mobile-menu-btn {
  display: none; width: 38px; height: 38px; align-items: center; justify-content: center;
  cursor: pointer; border-radius: var(--radius-sm); border: none; background: transparent;
}
.mobile-menu-btn span {
  display: block; width: 20px; height: 2px; background: var(--text-primary);
  position: relative; transition: all var(--transition);
}
.mobile-menu-btn span::before, .mobile-menu-btn span::after {
  content: ''; position: absolute; width: 20px; height: 2px;
  background: var(--text-primary); left: 0; transition: all var(--transition);
}
.mobile-menu-btn span::before { top: -6px; }
.mobile-menu-btn span::after { top: 6px; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .logo { font-size: 14px; gap: 8px; }
  .logo-icon { width: 28px; height: 28px; font-size: 14px; }
  .navbar-nav {
    position: fixed; top: 60px; left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column; padding: 14px; gap: 2px;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: all 0.3s ease; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .navbar-nav.active, .navbar-nav.open {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .navbar-nav a { width: 100%; padding: 11px 16px; }
}

/* ===== Hero — 实验室风格 ===== */
.hero-lab {
  padding: 120px 0 64px;
  background: linear-gradient(165deg, #EEF2FF 0%, #F5F3FF 50%, #FAFAFE 100%);
  text-align: center; position: relative; overflow: hidden;
}
.hero-lab::before {
  content: '';
  position: absolute; top: -30%; right: -10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.08) 0%, transparent 70%);
}
.hero-lab::after {
  content: '';
  position: absolute; bottom: -20%; left: -10%;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
}

.lab-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font-size: 13px; font-weight: 600;
  letter-spacing: 0.5px; margin-bottom: 20px;
}

.hero-lab h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.2; margin-bottom: 18px; position: relative; }
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { font-size: 17px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 30px; line-height: 1.8; position: relative; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; margin-bottom: 36px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-purple);
  transition: all var(--transition);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(79,70,229,0.3); color: #fff; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 24px; border-radius: var(--radius-lg);
  background: var(--bg-card); color: var(--text-secondary); font-size: 14px; font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.hero-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  position: relative;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 26px; font-weight: 800; color: var(--primary); }
.hero-stat .label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ===== Section 通用 ===== */
.section-header { text-align: center; max-width: 600px; margin: 0 auto 44px; }
.section-tag {
  display: inline-block; padding: 4px 14px; border-radius: var(--radius-full);
  background: var(--primary-lighter); color: var(--primary);
  font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 12px; color: var(--text-primary); }
.section-header p { color: var(--text-secondary); font-size: 15px; }

section { padding: 72px 0; }
section:nth-child(even) { background: var(--bg-secondary); }

/* ===== 状态标签系统（实验室核心组件）===== */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; letter-spacing: 0.3px;
}
.status-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
}
.status-stable { background: var(--success-bg); color: var(--success-text); }
.status-stable::before { background: var(--stable-color); }
.status-beta { background: var(--warning-bg); color: var(--warning-text); }
.status-beta::before { background: var(--beta-color); }
.status-experimental {
  background: #F3E8FF; color: #6B21A8;
}
.status-experimental::before { background: var(--experimental-color); }
.status-idea { background: var(--bg-tertiary); color: var(--text-muted); }
.status-idea::before { background: var(--idea-color); }

/* ===== 三段式区域：现在 / 计划 / 未来 ===== */
.timeline-section { position: relative; }
.timeline-section::before {
  content: '';
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--border));
  transform: translateX(-50%);
}
@media (max-width: 768px) {
  .timeline-section::before { left: 24px; }
}

.phase-block { margin-bottom: 56px; }
.phase-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700; margin-bottom: 24px;
}
.phase-now { background: var(--primary-lighter); color: var(--primary-dark); }
.phase-plan { background: #FEF3C7; color: #92400E; }
.phase-future { background: #FCE7F3; color: #9D174D; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.feat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all var(--transition);
}
.feat-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feat-card .feat-icon {
  width: 46px; height: 46px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.feat-card h3 { font-size: 17px; margin-bottom: 8px; }
.feat-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.feat-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; }

/* ===== 项目卡片（测试项目用）===== */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.proj-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  border-left: 4px solid var(--experimental-color);
  transition: all var(--transition);
}
.proj-card:hover { box-shadow: var(--shadow-md); }
.proj-card h3 { font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.proj-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.proj-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.progress-bar {
  height: 6px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden;
}
.progress-bar .fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.6s ease;
}

/* ===== 未来畅想卡片 ===== */
.vision-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.vision-card {
  background: linear-gradient(135deg, #FAF5FF, #F5F3FF);
  border: 1px solid #EDE9FE;
  border-radius: var(--radius-lg); padding: 28px;
  text-align: center; transition: all var(--transition);
}
.vision-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vision-icon { font-size: 40px; margin-bottom: 14px; }
.vision-card h3 { font-size: 17px; margin-bottom: 10px; color: var(--secondary-dark); }
.vision-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.vision-time { font-size: 12px; color: var(--text-muted); margin-top: 14px; }

/* ===== 下载页样式 ===== */
.download-hero { padding: 100px 0 56px; background: linear-gradient(165deg, #EEF2FF, #F5F3FF); text-align: center; }
.download-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.download-hero > .container > p { color: var(--text-secondary); max-width: 550px; margin: 0 auto 28px; font-size: 15px; }

.channel-tabs {
  display: flex; justify-content: center; gap: 8px; margin-bottom: 36px; flex-wrap: wrap;
}
.channel-tab {
  padding: 10px 24px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); transition: all var(--transition);
}
.channel-tab.active {
  border-color: var(--primary); background: var(--primary); color: #fff;
}
.channel-tab:hover:not(.active) { border-color: var(--primary-light); color: var(--primary); }

.platform-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pf-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; text-align: center;
  transition: all var(--transition);
}
.pf-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pf-icon { font-size: 36px; margin-bottom: 10px; }
.pf-card h3 { font-size: 17px; margin-bottom: 6px; }
.pf-card p { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.pf-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit;
  transition: all var(--transition);
}
.pf-btn:hover { transform: scale(1.05); color: #fff; box-shadow: var(--shadow-purple); }

/* ===== 版本对比表 ===== */
.version-table-wrap { overflow-x: auto; margin-top: 32px; }
.version-table {
  width: 100%; border-collapse: collapse; background: var(--bg-card);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.version-table th {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; padding: 14px 18px; font-size: 13px; font-weight: 600; text-align: left;
}
.version-table td {
  padding: 14px 18px; font-size: 14px; border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.version-table tr:last-child td { border-bottom: none; }
.version-table tr:hover td { background: var(--bg-secondary); }
.version-table .highlight { color: var(--primary); font-weight: 600; }

/* ===== 功能详情网格 ===== */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.detail-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.detail-card .detail-head {
  padding: 20px 24px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.detail-card .detail-head .d-icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.detail-card .detail-body { padding: 20px 24px; }
.detail-body ul li {
  padding: 6px 0; font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 8px;
}
.detail-body ul li::before { content: '✓'; color: var(--success); font-weight: bold; flex-shrink: 0; margin-top: 2px; }

/* ===== 时间线（路线图）===== */
.roadmap { position: relative; padding: 20px 0; }
.roadmap::before {
  content: ''; position: absolute; left: 28px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.r-item {
  display: flex; gap: 20px; margin-bottom: 28px; position: relative;
}
.r-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid var(--primary); background: var(--bg);
  flex-shrink: 0; margin-top: 4px; z-index: 1;
}
.r-dot.done { background: var(--success); border-color: var(--success); }
.r-dot.current { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-lighter); }
.r-dot.future { background: var(--bg); border-color: var(--border); }
.r-content h4 { font-size: 15px; margin-bottom: 4px; }
.r-content p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.r-date { font-size: 12px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }

/* ===== FAQ ===== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  overflow: hidden; transition: all var(--transition);
}
.faq-item.active { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-question {
  width: 100%; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  text-align: left;
}
.faq-q-icon {
  font-size: 18px; transition: transform var(--transition); flex-shrink: 0;
  color: var(--primary);
}
.faq-item.active .faq-q-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-answer-inner { padding: 0 20px 16px; font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.faq-item.active .faq-answer { max-height: 300px; }

/* ===== Footer ===== */
.footer {
  background: var(--secondary-dark); color: #E0E7FF; padding: 48px 0 24px;
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 36px; }
.footer-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; color: #fff; }
.footer-col a { display: block; color: #C7D2FE; font-size: 13px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px; text-align: center;
  font-size: 13px; color: #A5B4FC;
}


/* ===== 友情链接 ===== */
.friend-links {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  margin-bottom: 0;
}
.friend-links-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #A5B4FC;
  margin-bottom: 16px;
}
.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.friend-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  font-size: 13px;
  color: #C7D2FE;
  text-decoration: none;
  transition: all 0.2s ease;
}
.friend-link:hover {
  background: rgba(79,70,229,0.3);
  border-color: rgba(129,140,248,0.5);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.25);
}
.friend-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  border: none; box-shadow: var(--shadow-purple);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all var(--transition); z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== 下载弹窗 ===== */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.popup-overlay.active {
  display: flex;
}
.popup {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px 32px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  animation: popupIn .25s ease;
}
@keyframes popupIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.popup-ic {
  font-size: 40px;
  margin-bottom: 12px;
}
.popup h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1e293b;
}
.popup p {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 24px;
}
.popup-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.btn-popup {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.btn-cancel {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.btn-cancel:hover {
  background: var(--border);
}
.btn-confirm {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff;
  box-shadow: var(--shadow-purple);
}
.btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.35);
}

/* ===== 动画 ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.55s ease; }
.reveal.visible, .reveal.active { opacity: 1; transform: translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  section { padding: 52px 0; }
  .hero-lab { padding: 100px 0 48px; }
  .hero-stats { gap: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .vision-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .platform-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .download-hero { padding: 90px 0 42px; }
}
@media (max-width: 480px) {
  .platform-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ========== 友情链接 / 文字链接 ========== */
.friend-links-section {
  padding: 0 0 28px;
  width: 100%; max-width: 1100px; margin: 0 auto;
}

.friend-links-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-links-list a {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.friend-links-list a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}
/* ============================================
   文章页 / 分类页专用样式
   ============================================ */

/* ===== 文章 Hero ===== */
.article-hero {
  padding: 90px 0 40px;
  background: linear-gradient(165deg, #EEF2FF 0%, #F5F3FF 60%, #FAFAFE 100%);
  border-bottom: 1px solid var(--border-light);
}
.article-header { max-width: 760px; margin: 0 auto; }
.article-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted); margin-bottom: 20px;
}
.article-breadcrumb a { color: var(--primary); }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-cat-badge {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: var(--radius-full);
  background: #EEF2FF; color: #4338CA;
  font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.article-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800; line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 18px;
}
.article-meta-bar {
  display: flex; align-items: center; gap: 20px;
  flex-wrap: wrap; font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px;
}
.article-meta-item { display: flex; align-items: center; gap: 5px; }

/* ===== 文章封面 ===== */
.article-cover-wrap {
  background: linear-gradient(135deg,#EEF2FF,#C7D2FE);
  border-radius: var(--radius-xl); padding: 32px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 40px; overflow: hidden;
}
.article-cover-icon { font-size: 72px; }

/* ===== 文章进度条 ===== */
.article-progress { height: 4px; background: var(--bg-tertiary); border-radius: var(--radius-full); margin: 24px 0; overflow: hidden; }
.article-progress .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: var(--radius-full); transition: width 0.3s ease; }
.progress-label { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; margin-bottom: 6px; }
#reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 1001;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%; transition: width 0.1s linear;
}

/* ===== 文章正文布局 ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px; max-width: 1100px; margin: 0 auto;
  padding: 40px 24px 80px; align-items: start;
}
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { display: none; }
}

/* ===== 文章正文排版 ===== */
.article-body { min-width: 0; }
.article-body h2 {
  font-size: 22px; font-weight: 700; margin: 40px 0 16px;
  color: var(--text-primary); padding-bottom: 10px; border-bottom: 2px solid var(--primary-lighter);
}
.article-body h3 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; color: var(--text-primary); }
.article-body p { font-size: 15px; line-height: 1.85; color: var(--text-secondary); margin-bottom: 16px; }
.article-body strong { color: var(--text-primary); font-weight: 600; }
.article-body ul, .article-body ol { margin: 0 0 16px 0; padding-left: 1.5em; }
.article-body ul li, .article-body ol li { font-size: 15px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 8px; list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body ul li::marker { color: var(--primary); }
.article-body ol li::marker { color: var(--primary); font-weight: 600; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--primary-dark); }

/* ===== 代码块 ===== */
.article-code-block {
  background: #1E1E2E; border-radius: var(--radius-lg);
  padding: 20px 22px; margin: 20px 0; overflow-x: auto;
}
.article-code-block code {
  font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px; line-height: 1.7; color: #CDD6F4; white-space: pre;
}
.code-comment { color: #6C7086; }
.code-key { color: #CBA6F7; }
.code-val { color: #A6E3A1; }
.code-str { color: #F38BA8; }

/* ===== 提示块 ===== */
.callout {
  border-radius: var(--radius-lg); padding: 18px 20px;
  margin: 24px 0; display: flex; gap: 14px; align-items: flex-start;
}
.callout-info { background: var(--info-bg); border-left: 4px solid var(--info); }
.callout-warning { background: var(--warning-bg); border-left: 4px solid var(--warning); }
.callout-success { background: var(--success-bg); border-left: 4px solid var(--success); }
.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.callout-content { flex: 1; }
.callout-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.callout-info .callout-title { color: var(--info-text); }
.callout-warning .callout-title { color: var(--warning-text); }
.callout-success .callout-title { color: var(--success-text); }
.callout-text { font-size: 14px; line-height: 1.7; }
.callout-info .callout-text { color: var(--info-text); }
.callout-warning .callout-text { color: var(--warning-text); }
.callout-success .callout-text { color: var(--success-text); }

/* ===== 协议对比表 ===== */
.proto-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.proto-table th {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: #fff; padding: 12px 16px; font-size: 13px; font-weight: 600; text-align: left;
}
.proto-table td {
  padding: 11px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border-light); color: var(--text-secondary);
}
.proto-table tr:hover td { background: var(--bg-secondary); }
.proto-badge { display: inline-flex; padding: 2px 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; }
.proto-badge.good { background: var(--success-bg); color: var(--success-text); }
.proto-badge.ok { background: var(--warning-bg); color: var(--warning-text); }
.proto-badge.bad { background: var(--danger-bg); color: var(--danger-text); }

/* ===== 目录侧边栏 ===== */
.article-sidebar { position: sticky; top: 80px; }
.toc-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px;
}
.toc-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-muted);
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-item { margin-bottom: 4px; }
.toc-link {
  display: block; padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary);
  transition: all var(--transition-fast); border-left: 3px solid transparent;
}
.toc-link:hover, .toc-link.active { color: var(--primary); background: var(--primary-lighter); border-left-color: var(--primary); }
.toc-link.sub { padding-left: 22px; font-size: 12px; }

/* ===== 分享 ===== */
.share-card { text-align: center; }
.share-title { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; }
.share-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.share-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; border: 1px solid var(--border);
  background: var(--bg); transition: all var(--transition-fast);
}
.share-btn:hover { border-color: var(--primary); background: var(--primary-lighter); transform: translateY(-2px); }

/* ===== 相关文章 ===== */
.related-section { border-top: 1px solid var(--border-light); padding-top: 40px; margin-top: 48px; }
.related-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rel-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: all var(--transition);
}
.rel-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.rel-thumb { height: 100px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.rel-body { padding: 14px; }
.rel-body h4 { font-size: 14px; margin-bottom: 6px; line-height: 1.5; }
.rel-body h4 a { color: var(--text-primary); }
.rel-body h4 a:hover { color: var(--primary); }
.rel-meta { font-size: 12px; color: var(--text-muted); }

/* ===== 文章导航（上下篇） ===== */
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border-light);
}
@media (max-width: 600px) { .article-nav { grid-template-columns: 1fr; } }
.art-nav-link {
  display: block; padding: 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: all var(--transition); text-decoration: none;
}
.art-nav-link:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.art-nav-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.art-nav-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.art-nav-link.next { text-align: right; }

/* ===== 分类页筛选标签 ===== */
.filter-tag {
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text-secondary); transition: all var(--transition);
}
.filter-tag:hover { border-color: var(--primary-light); color: var(--primary); }
.filter-tag.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.sort-select {
  padding: 6px 12px; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--bg);
  font-size: 13px; color: var(--text-secondary); cursor: pointer; outline: none;
}

/* ===== 文章卡片（分类页） ===== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.art-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  transition: all var(--transition); display: flex; flex-direction: column;
}
.art-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.art-thumb { height: 140px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.art-thumb-icon { font-size: 52px; }
.art-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.art-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.art-cat { display: inline-flex; padding: 2px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; }
.art-date, .art-read { font-size: 12px; color: var(--text-muted); }
.art-title { font-size: 17px; font-weight: 700; margin-bottom: 10px; line-height: 1.45; }
.art-title a { color: var(--text-primary); }
.art-title a:hover { color: var(--primary); }
.art-excerpt {
  font-size: 13px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px;
  flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.art-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); }
.art-author { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); }
.author-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
}
.art-readmore { font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.art-readmore:hover { color: var(--primary-dark); }

/* ===== 分页 ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; }
.page-btn {
  padding: 8px 18px; border-radius: var(--radius-full);
  border: 1.5px solid var(--border); background: var(--bg);
  font-size: 14px; color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-nums { display: flex; gap: 4px; align-items: center; }
.page-num {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--bg);
  font-size: 14px; color: var(--text-secondary); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all var(--transition);
}
.page-num:hover { border-color: var(--primary); color: var(--primary); }
.page-num.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-ellipsis { font-size: 14px; color: var(--text-muted); padding: 0 4px; }

/* ===== 最新内容侧栏 ===== */
.latest-list { list-style: none; padding: 0; margin: 0; }
.latest-item { margin-bottom: 4px; }
.latest-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px; border-radius: var(--radius-sm);
  text-decoration: none; transition: background var(--transition-fast);
}
.latest-link:hover { background: var(--bg-secondary); }
.latest-icon {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.latest-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.latest-title {
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.latest-link:hover .latest-title { color: var(--primary); }
.latest-meta { font-size: 11px; color: var(--text-muted); }

/* ===== 补充缺失类 ===== */

/* 下载按钮（弹窗触发） */
.dl-btn {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* 下载区块 */
.dl-section {
  padding: 32px 0;
  border-bottom: 1px solid var(--border-light);
}
.dl-section:last-child { border-bottom: none; }

/* 文章导航 — 上一篇/下一篇 */
.art-nav-link.prev,
.art-nav-link.next {
  display: block;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 12px;
}
.art-nav-link:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}
.art-nav-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.art-nav-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.prev .art-nav-title::before { content: '← '; }
.next .art-nav-title::after { content: '→'; }
.next { text-align: right; }

/* 阅读进度条 */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* 友链标题 */
.friend-links-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
	
.friend-links-section {
  padding: 0 0 28px;
  width: 100%; max-width: 1100px; margin: 0 auto;
}

.friend-links-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.friend-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.friend-links-list a {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.friend-links-list a:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}

/* WP 导航菜单输出 — 确保 navbar-nav 样式覆盖 */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-nav li { margin: 0; }
.navbar-nav a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: color 0.2s, background 0.2s;
}
.navbar-nav a:hover,
.navbar-nav .current-menu-item a {
  color: var(--primary);
  background: var(--primary-lighter);
}
