:root {
  --bg: #ffffff;
  --card: #f9fafb;
  --text: #111827;
  --text-sec: #4b5563;
  --primary: #3b82f6;
  --border: #e5e7eb;
  --nav-bg: #ffffff;
  --nav-text: #111827;
  --underline: #3b82f6;
  --news-bg: #f8fafc;
}

[data-theme="dark"] {
  --bg: #111827;
  --card: #1f2937;
  --text: #f3f4f6;
  --text-sec: #9ca3af;
  --primary: #60a5fa;
  --border: #374151;
  --nav-bg: #111827;
  --nav-text: #f3f4f6;
  --underline: #60a5fa;
  --news-bg: #1e293b;
}

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

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.4s, color 0.4s;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

nav {
  position: sticky;
  top: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
  max-height: 48px;
  display: block;
}

[data-theme="dark"] .logo-img {
  filter: brightness(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a,
.nav-links .theme-toggle {
  margin-left: 2.8rem;
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links .theme-toggle:hover {
  color: var(--primary);
}

.nav-links .theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* ==================== Hero ==================== */
.hero {
  padding: 100px 1rem 80px;
  background: var(--bg);
  text-align: center;
}
.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero h1 {
  font-size: 3.8rem;                    /* PC端 PanDownload 缩小一点 */
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin: 0 0 40px 0;
}

.hero h1 .hero-subtitle {
  display: block;
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-sec);
  margin-top: 12px;
  line-height: 1.4;
}

/* ====================== 移动端优化 ====================== */
@media (max-width: 768px) {
  .hero {
    padding-top: 85px;
    padding-bottom: 65px;
  }
  
  .hero h1 {
    font-size: 3.1rem !important;     /* 移动端 PanDownload 保持较大 */
  }
  
  .hero h1 .hero-subtitle {
    font-size: 1.18rem;               /* 副标题较小 */
    margin-top: 10px;
    line-height: 1.35;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    max-width: 320px;
    padding: 1.1rem 2rem;
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.75rem !important;    /* 小手机 PanDownload 仍然突出 */
  }
  
  .hero h1 .hero-subtitle {
    font-size: 1.08rem;               /* 副标题进一步缩小 */
    margin-top: 8px;
  }
}

/* 按钮和版本信息样式 */
.cta-buttons {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 25px;
  margin-bottom: 32px;
}
.btn {
  padding: 16px 44px;
  font-size: 1.25rem;
  min-width: 210px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: #2563eb;
}
.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: rgba(59,130,246,0.05);
}
.version-info {
  color: var(--text-sec);
  font-size: 1.05rem;
  margin-bottom: 10px;
  margin-top: -20px;
}
.warning {
  color: #f59e0b;
  font-size: 0.96rem;
}

/* ==================== 公共部分 ==================== */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

h2 {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 4rem;
  position: relative;
}

h2:after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--underline);
  border-radius: 2px;
}

.features-grid,
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s;
}

.feature:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.feature .icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.feature h3 {
  font-size: 1.5rem;
  margin: 1rem 0;
  color: var(--text);
}

.feature p {
  color: var(--text-sec);
  font-size: 1.05rem;
  text-align: left;
  line-height: 1.6;
}

.shot {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  transition: all 0.3s;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.shot:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 45px rgba(0,0,0,0.12);
}

.shot img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 16px;
}

.shot-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 1.2rem;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.shot:hover .shot-caption {
  opacity: 1;
}

footer {
  background: var(--card);
  text-align: center;
  padding: 4rem 1rem 2rem;
  color: var(--text-sec);
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--primary);
  text-decoration: none;
  margin: 0 0.8rem;
}

footer a:hover {
  text-decoration: underline;
}

#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top.visible {
  opacity: 0.9;
  visibility: visible;
}

#back-to-top:hover {
  opacity: 1;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59,130,246,0.3);
}

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
  .features-grid,
  .screenshots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .hero {
    padding-top: 85px;
    padding-bottom: 65px;
  }
  .hero h1 {
    font-size: 2.2rem !important;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .btn {
    width: 100%;
    max-width: 320px;
    padding: 1.1rem 2rem;
    font-size: 1.15rem;
  }
  .features-grid,
  .screenshots-grid {
    gap: 1.8rem;
    padding: 0 1rem;
  }
  section {
    padding: 70px 0;
  }
  h2 {
    font-size: 2.1rem;
    margin-bottom: 2.5rem;
  }
  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }
}

@media (max-width: 640px) {
  .features-grid,
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem !important;
  }
  .cta-buttons {
    gap: 1rem;
  }
}

/* ==================== 区域间距优化 ==================== */
#features {
  padding-top: 10px;      /* 软件介绍往下挪更多 */
  margin-top: -50px;
}

#features h2 {
  margin-bottom: 4.5rem;
}

#screenshots {
  padding-top: 40px;
  padding-bottom: 60px;
}

#screenshots h2 {
  margin-bottom: 3rem;
}

/* Hero 移动端额外优化 */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.8rem !important;
  }
  .hero h1 .hero-subtitle {
    font-size: 1.25rem;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.45rem !important;
  }
}

.content-body p span[style*="text-wrap: nowrap"] {
    text-wrap: wrap !important;        /* 允许正常换行 */
    white-space: normal !important;    /* 兼容旧浏览器 */
    word-break: break-all;             /* 极端情况强制断词（中文一般不需要，但保险） */
}

/* 额外保险：让所有正文段落都能正常换行 */
.content-body p {
    word-break: normal;
    overflow-wrap: break-word;
    text-wrap: wrap;
}

.icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: rgba(0, 102, 255, 0.08);   /* 轻微背景（可选） */
    border-radius: 50%;                    /* 做成圆形背景，更现代 */
    color: #0066ff;
    flex-shrink: 0;
}

.icon svg {
    width: 32px;
    height: 32px;
}

html, body {
    overflow-x: hidden;     /* 禁止水平滚动 */
    max-width: 100%;
    width: 100%;
}

/* ==================== 最新文档专区 ==================== */
#latest-docs {
  padding: 80px 0;
  background: var(--bg);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.doc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  height: 100%;
}

.doc-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.doc-icon {
  width: 56px;
  height: 56px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.doc-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.doc-date {
  font-size: 0.9rem;
  color: var(--text-sec);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.doc-card h3 {
  font-size: 1.35rem;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text);
}

.doc-card h3 a {
  color: inherit;
  text-decoration: none;
}

.doc-card h3 a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.doc-card p {
  color: var(--text-sec);
  font-size: 1.02rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.2rem;
}

.doc-read-more {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
  align-self: flex-start;
  transition: color 0.2s;
}

.doc-read-more:hover {
  color: #2563eb;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .docs-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 0 1rem;
  }
  
  .doc-card {
    padding: 2rem 1.6rem;
  }
}

/* ====================== 稳定运行天数卡片 ====================== */
.running-days {
    max-width: 1280px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.running-days .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    text-align: center;
}

.running-days .header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.running-days .header h3 {
    margin: 0;
    font-size: 23px;
    font-weight: 600;
    color: var(--text);
}

.running-days .days {
    font-size: 50px;
    font-weight: 700;
    color: #10b981;
    letter-spacing: -1.8px;
    line-height: 1;
    margin-bottom: 20px;
}

.running-days .days span.small {
    font-size: 32px;
    font-weight: 500;
}

.running-days .desc {
    font-size: 15.5px;
    color: #6b8e6f;
    line-height: 1.6;
}


/* ====================== 下载信任提示 ====================== */
.security-trust {
  margin: 22px 0 32px 0;
  text-align: center;
  color: #10b981;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;                    /* 统一所有元素间距 */
}

/* PC端统一间距 */
.main-trust,
.pc-dot,
.sub-trust {
  margin: 0;
}

.sub-trust {
  font-size: 1.02rem;
}

/* 移动端两行布局 */
@media (max-width: 768px) {
  .security-trust {
    margin: 18px 0 28px 0;
    gap: 6px;
  }
  
  .main-trust {
    display: block !important;
    width: 100%;
    margin-bottom: 8px;
    font-size: 1rem;
    text-align: center;
  }
  
  .pc-dot {
    display: none !important;
  }
  
  .sub-trust {
    display: block !important;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .main-trust { font-size: 0.97rem; }
  .sub-trust { font-size: 0.92rem; }
}

/* ==================== FAQ ==================== */
#faq {
  padding: 80px 0;
  background: var(--bg);
}

#faq h2 {
  margin-bottom: 3rem;
}

.faq-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 5px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.faq-item:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

/* 关键调整：减小左右内边距，让宽度视觉对齐 */
.faq-question {
  padding: 1.4rem 1.8rem;        /* 减小左右间距 */
  font-size: 1.12rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  list-style: none;
  color: var(--text);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:after {
  content: "+";
  position: absolute;
  right: 1.8rem;
  font-size: 1.5rem;
  color: var(--primary);
  transition: all 0.3s;
}

details[open] .faq-question:after {
  content: "−";
}

.faq-answer {
  padding: 0 1.8rem 1.8rem 1.8rem;   /* 与 question 一致 */
  color: var(--text-sec);
  line-height: 1.75;
  font-size: 1.03rem;
}

/* 响应式 */
@media (max-width: 768px) {
  .faq-question,
  .faq-answer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* 下载方式对比表 */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 0 auto;
  padding: 0 10px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px; /* 保证桌面端表格完整 */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
}

.comparison-table th {
  background: var(--news-bg);
  font-weight: 600;
  color: var(--text);
}

.comparison-table td {
  color: var(--text-sec);
}

.comparison-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05); /* hover效果 */
}

.comparison-note {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--text-sec);
  text-align: left;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .comparison-table th,
  .comparison-table td {
    padding: 12px 8px;
    font-size: 0.92rem;
  }
}

/* ==================== 界面一览 - 双图横向完美撑满优化 ==================== */
/* 使用多级层级提高权重，完美冲刷并覆盖通用的 3 列布局 */
main .main-container .screenshots-grid.custom-two-shots,
#main-content #screenshots .screenshots-grid.custom-two-shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 大屏下强制等宽对半分，占满整个两列轨道 */
  gap: 2.5rem;                           /* 维持原站点一致的间距美感 */
  width: 100%;
  max-width: 1280px;                     /* 强制与上方软件介绍栅格绝对左中右对齐 */
  margin: 0 auto;
}

/* 保证每张截图的外部盒子宽度完全自适应 */
.screenshots-grid.custom-two-shots .shot {
  width: 100%;
  max-width: 100%;
  flex: 1;
}

/* 强制图片撑满它的子卡片网格，不留任何死角 */
.screenshots-grid.custom-two-shots .shot img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: cover;
  border-radius: 12px;                  /* 保持客户端精致的微圆角 */
}

/* 响应式断点：当屏幕宽度小于等于 900px 时，自动回退到单列纵向排版，确保移动端不会被挤压 */
@media (max-width: 900px) {
  main .main-container .screenshots-grid.custom-two-shots,
  #main-content #screenshots .screenshots-grid.custom-two-shots {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
}