/* ============================================
   Clash Verge Download — 官方下载站风格
   主色调：深蓝→天蓝 (#1E3A5F → #3B82F6)
   排版：极简下载站风格，大按钮、清晰标签、版本表格
   ============================================ */

/* ===== CSS 变量系统 ===== */
:root {
  /* 主色调 — 深蓝到天蓝 */
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #60A5FA;
  --primary-lighter: #DBEAFE;
  --secondary: #1E3A5F;
  --secondary-dark: #152945;
  --accent: #06B6D4;
  --gradient-start: #1E3A5F;
  --gradient-end: #3B82F6;

  /* 功能色 */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger: #EF4444;
  --info: #3B82F6;

  /* 文字色 */
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* 背景色 — 浅色清爽 */
  --bg: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;

  /* 边框/阴影 */
  --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-blue: 0 4px 20px rgba(37,99,235,0.2);

  /* 圆角 */
  --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 { padding-left: 1.4em; }

/* ===== 容器 ===== */
.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;
  overflow: visible;
}

.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: 2px; flex-shrink: 0;
  list-style: none; margin: 0; padding: 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 .nav-link { width: 100%; padding: 11px 16px; }
}

/* ===== Hero — 下载站风格 ===== */
.hero-download {
  padding: 120px 0 64px;
  background: linear-gradient(165deg, #EFF6FF 0%, #F0F9FF 50%, #F8FAFC 100%);
  text-align: center; position: relative; overflow: hidden;
}
.hero-download::before {
  content: ''; position: absolute; top: -40%; right: -15%;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.07) 0%, transparent 70%);
}
.hero-version-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  color: var(--primary); background: var(--primary-lighter);
  border-radius: var(--radius-full); margin-bottom: 18px;
}
.hero-download h1 {
  font-size: clamp(32px, 4.5vw, 48px); font-weight: 800; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 14px; position: relative; z-index: 1;
}
.hero-download h1 span.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: 520px; margin: 0 auto 28px; line-height: 1.7; position: relative; z-index: 1; }

/* 大下载按钮组 */
.download-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.btn-download {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--radius); border: none; cursor: pointer;
  transition: all var(--transition); box-shadow: var(--shadow-blue);
}
.btn-download:hover {
  transform: translateY(-2px); box-shadow: 0 6px 25px rgba(37,99,235,0.35); color: #fff;
}
.btn-download svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 15px 28px; font-size: 15px; font-weight: 600;
  background: var(--bg-card); color: var(--primary);
  border: 2px solid var(--primary-light); border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition);
}
.btn-secondary:hover { background: var(--primary-lighter); color: var(--primary-dark); }

/* 版本信息条 */
.version-bar {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 24px; font-size: 13px; color: var(--text-muted);
  position: relative; z-index: 1;
}
.version-bar span { display: flex; align-items: center; gap: 5px; }

@media (max-width: 600px) {
  .hero-download { padding: 100px 0 48px; }
  .download-buttons { flex-direction: column; align-items: stretch; }
  .btn-download, .btn-secondary { justify-content: center; }
  .version-bar { flex-wrap: wrap; gap: 12px; }
}

/* ===== 平台快速下载区（首页核心） ===== */
.platform-downloads {
  padding: 56px 0;
}
.pd-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.pd-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 16px; text-align: center;
  transition: all var(--transition); cursor: default;
}
.pd-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.pd-icon { font-size: 40px; margin-bottom: 12px; }
.pd-card h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.pd-card p { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.pd-btn {
  display: inline-block; width: 100%; padding: 10px 0; font-size: 13px; font-weight: 600;
  background: var(--primary-lighter); color: var(--primary);
  border-radius: var(--radius-sm); transition: all var(--transition-fast);
}
.pd-btn:hover { background: var(--primary); color: #fff; }

@media (max-width: 900px) { .pd-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 580px) { .pd-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== 章节通用 ===== */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-secondary); }

.section-header { text-align: center; margin-bottom: 40px; }
.section-tag {
  display: inline-block; padding: 4px 14px; font-size: 12px; font-weight: 600;
  color: var(--primary); background: var(--primary-lighter);
  border-radius: var(--radius-full); letter-spacing: 0.5px; margin-bottom: 10px;
}
.section-header h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.section-header p { font-size: 15px; color: var(--text-secondary); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ===== 特性网格 ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 26px 22px; transition: all var(--transition);
}
.feature-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.feat-icon { font-size: 30px; margin-bottom: 12px; }
.feature-card h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

/* ===== 更新日志 ===== */
.changelog-list { max-width: 720px; margin: 0 auto; }
.changelog-item {
  padding: 22px 0; border-bottom: 1px solid var(--border-light);
}
.changelog-item:last-child { border-bottom: none; }
.cl-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cl-badge {
  display: inline-flex; padding: 3px 10px; font-size: 11px; font-weight: 700;
  border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.5px;
}
.cl-badge.latest { background: #DCFCE7; color: #15803D; }
.cl-badge.stable { background: var(--primary-lighter); color: var(--primary-dark); }
.cl-header h4 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.cl-date { font-size: 13px; color: var(--text-muted); margin-left: auto; }
.cl-body { font-size: 14px; color: var(--text-secondary); line-height: 1.75; padding-left: 4px; }
.cl-body ul { margin-top: 8px; }
.cl-body li { margin-bottom: 4px; }

/* ===== 系统要求表 ===== */
.sys-table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-light); }
.sys-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 550px; }
.sys-table th, .sys-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-light); }
.sys-table th { background: var(--bg-secondary); font-weight: 700; font-size: 13px; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.5px; }
.sys-table tr:last-child td { border-bottom: none; }
.sys-table tr:hover td { background: var(--bg-secondary); }
.sys-table td:first-child { font-weight: 600; color: var(--text-primary); }

/* ===== 详细下载列表 ===== */
.dl-section { scroll-margin-top: 72px; padding: 44px 0; border-bottom: 1px solid var(--border-light); }
.dl-section:last-child { border-bottom: none; }
.dl-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.dl-platform-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0;
}
.dl-header h3 { font-size: 22px; font-weight: 700; }
.dl-header p { font-size: 14px; color: var(--text-muted); }

.dl-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dl-file-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 22px; text-align: center;
  transition: all var(--transition);
}
.dl-file-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.dl-file-icon { font-size: 32px; margin-bottom: 10px; }
.dl-file-card h4 { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.dl-file-card .dl-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.dl-file-card .btn-dl {
  display: block; padding: 10px 0; font-size: 13px; font-weight: 600;
  background: var(--primary); color: #fff; border-radius: var(--radius-sm);
  border: none; cursor: pointer; transition: all var(--transition-fast); width: 100%;
}
.dl-file-card .btn-dl:hover { background: var(--primary-dark); }

/* ===== FAQ ===== */
.faq-list { list-style: none !important; padding: 0 !important; max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius); margin-bottom: 10px; overflow: hidden;
  transition: all var(--transition);
}
.faq-item.active, .faq-item.open { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 17px 20px; font-size: 15px; font-weight: 600;
  color: var(--text-primary); background: none; border: none; cursor: pointer;
  text-align: left; gap: 14px; transition: color var(--transition-fast);
}
.faq-question:hover { color: var(--primary); }
.faq-icon {
  width: 22px; height: 22px; min-width: 22px; border-radius: 50%;
  background: var(--bg-secondary); display: flex; align-items: center;
  justify-content: center; font-size: 13px; color: var(--text-muted);
  transition: all var(--transition); font-weight: 700; line-height: 1;
}
.faq-item.active .faq-icon, .faq-item.open .faq-icon { background: var(--primary); color: #fff; transform: rotate(45deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; padding: 0 20px;
}
.faq-item.active .faq-answer, .faq-item.open .faq-answer { max-height: 350px; padding: 0 20px 16px; }
.faq-answer p { font-size: 14px; color: var(--text-secondary); line-height: 1.75; }

/* ===== 友链 ===== */
.friend-links { background: var(--bg-secondary); border-top: 1px solid var(--border-light); padding: 32px 0; }
.friend-links .container { text-align: center; }
.friend-links h3 { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 14px; }
.friend-links-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.friend-link {
  padding: 6px 16px; font-size: 13px; color: var(--text-secondary);
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-full); transition: all var(--transition-fast);
}
.friend-link:hover { color: var(--primary); border-color: var(--primary-light); background: var(--primary-lighter); }

/* ===== CTA ===== */
.cta-section { padding: 56px 0; background: linear-gradient(135deg, #EFF6FF, #F0F9FF); text-align: center; }
.cta-section h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.cta-section p { font-size: 15px; color: var(--text-secondary); margin-bottom: 24px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { background: var(--secondary); color: rgba(255,255,255,0.65); padding: 48px 0 24px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.7; opacity: 0.7; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.5); padding: 4px 0; transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; display: flex; justify-content: space-between; font-size: 12px; flex-wrap: wrap; gap: 6px; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ===== 回到顶部 ===== */
.back-to-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(37,99,235,0.25);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== 动画 ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible, .reveal.active { opacity: 1; transform: translateY(0); }

/* ===== 平台标签 ===== */
.platform-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.platform-tab {
  padding: 7px 18px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-full); cursor: pointer;
  transition: all var(--transition-fast);
}
.platform-tab:hover { color: var(--primary); border-color: var(--primary-light); }
.platform-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 响应式调整 */
@media (max-width: 480px) {
  .section { padding: 42px 0; }
  .cta-section { padding: 42px 0; }
}
