/* =============================================
   WPS Office 下载站 - 全局样式
   域名: wps-wpsoffice-zh.hl.cn
   纯原生 CSS，无框架依赖
   ============================================= */

/* --- CSS 变量 --- */
:root {
  --brand: #ff6a00;
  --brand-dark: #e55f00;
  --brand-light: #fff5eb;
  --green: #2aab5e;
  --green-dark: #1e8c4a;
  --blue: #1a73e8;
  --text: #1f2328;
  --text-secondary: #5a6069;
  --text-muted: #8b9199;
  --bg: #ffffff;
  --bg-warm: #faf8f5;
  --bg-section: #f6f7f9;
  --border: #e4e6eb;
  --shadow: 0 4px 20px rgba(31, 35, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(31, 35, 40, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* --- 重置 --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* --- 工具类 --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- spin 动画（下载按钮 loading 用）--- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* --- 导航栏 --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--text);
}

.nav-brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 6px;
}

.nav-menu a {
  display: block;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.nav-menu a:hover {
  color: var(--text);
  background: var(--bg-section);
  text-decoration: none;
}

.nav-menu a.active {
  color: var(--brand);
  background: var(--brand-light);
  font-weight: 600;
}

.nav-cta {
  display: none;
}

@media (max-width: 640px) {
  .nav-menu {
    gap: 2px;
  }
  .nav-menu a {
    padding: 6px 12px;
    font-size: 14px;
  }
  .nav-brand span {
    font-size: 16px;
  }
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 106, 0, 0.35);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  box-shadow: 0 6px 24px rgba(255, 106, 0, 0.45);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(42, 171, 94, 0.3);
}

.btn-green:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 14px;
}

.btn-lg {
  padding: 18px 44px;
  font-size: 18px;
}

/* --- 徽章 --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  background: var(--brand-light);
  color: var(--brand);
}

/* --- 节标题 --- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .section-header h2 {
    font-size: 26px;
  }
  .section-header p {
    font-size: 15px;
  }
}

/* --- 卡片 --- */
.card-grid {
  display: grid;
  gap: 20px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.card:hover {
  border-color: #d0d4da;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  color: var(--brand);
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- 评价星星 --- */
.stars {
  display: flex;
  gap: 3px;
  color: #ffb400;
  margin-bottom: 10px;
}

.stars svg {
  width: 16px;
  height: 16px;
}

/* --- 表格 --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-weight: 600;
  background: var(--bg-section);
  color: var(--text-secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td:first-child {
  font-weight: 500;
}

.check-yes {
  color: var(--green);
  font-weight: 600;
}

.check-no {
  color: var(--text-muted);
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  background: none;
  border: none;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  text-align: left;
}

.faq-question:hover {
  color: var(--brand);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: 22px;
}

.faq-answer p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

/* --- 页脚 --- */
.site-footer {
  background: var(--text);
  color: #b0b5bd;
  padding: 40px 0 32px;
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.site-footer a {
  color: #d4d8dd;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
}

.footer-disclaimer {
  font-size: 13px;
  color: #8b9199;
  line-height: 1.7;
  max-width: 720px;
}

/* --- 平台标签 --- */
.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-section);
  color: var(--text-secondary);
}

/* --- 步骤列表 --- */
.step-list {
  list-style: none;
  counter-reset: step;
}

.step-list > li {
  position: relative;
  padding-left: 48px;
  padding-bottom: 28px;
}

.step-list > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-list > li::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.step-list > li:last-child::after {
  display: none;
}

.step-list h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.step-list p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- 更新日志 --- */
.changelog-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.changelog-version {
  flex-shrink: 0;
  width: 100px;
}

.changelog-version .version-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.changelog-version .version-date {
  font-size: 13px;
  color: var(--text-muted);
}

.changelog-content h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.changelog-content ul {
  list-style: none;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.changelog-content li {
  position: relative;
  padding-left: 16px;
}

.changelog-content li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand);
}

/* --- 下载卡片 --- */
.dl-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--bg);
  transition: all 0.3s;
}

.dl-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.dl-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.dl-card-header svg {
  width: 44px;
  height: 44px;
  color: var(--brand);
}

.dl-card-header h3 {
  font-size: 20px;
  font-weight: 700;
}

.dl-card-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.dl-meta span {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-section);
  padding: 4px 12px;
  border-radius: 100px;
}

/* --- 安全徽章区域 --- */
.trust-badges {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

.trust-badge svg {
  width: 24px;
  height: 24px;
  color: var(--green);
}

/* --- 数据展示 --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 24px;
}

.stat-number {
  font-size: 40px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.2;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* --- CTA 区域 --- */
.cta-section {
  background: var(--brand);
  color: #fff;
  text-align: center;
  padding: 64px 20px;
  border-radius: var(--radius);
}

.cta-section h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 28px;
}

.cta-section .btn {
  background: #fff;
  color: var(--brand);
  font-weight: 700;
}

.cta-section .btn:hover {
  background: #fff5eb;
  color: var(--brand-dark);
}

/* --- 面包屑 --- */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* --- SEO 文章区域 --- */
.article-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.article-section h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
}

.article-section h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.article-section p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.article-section ul {
  margin: 12px 0 20px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-section li {
  margin-bottom: 8px;
}

/* --- 响应式 --- */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr !important;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .comparison-table th,
  .comparison-table td {
    padding: 12px 14px;
    font-size: 14px;
  }
  .step-list > li {
    padding-left: 42px;
  }
  .dl-card {
    padding: 24px;
  }
}

/* --- 页面内特定背景 --- */
.section-alt {
  background: var(--bg-section);
}

.section-warm {
  background: var(--bg-warm);
}
