/* ═══════════════════════════════════════════════
   WPS Office 下载落地页 - 全局样式
   技术栈: 纯原生 HTML + CSS + JS
   ═══════════════════════════════════════════════ */

/* ─── CSS 变量定义 ─── */
:root {
  --bg-primary: #040405;
  --bg-secondary: #0a0a0c;
  --bg-card: #161618;
  --bg-card-hover: #1e1e20;
  --border-color: #2a2a2e;
  --border-hover: #3a3a3e;
  --text-primary: #ffffff;
  --text-secondary: #8b8b8e;
  --text-muted: #5a5a5e;
  --accent: #E60012;
  --accent-hover: #ff1a2e;
  --accent-glow: rgba(230, 0, 18, 0.3);
  --glass-bg: rgba(22, 22, 24, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(230, 0, 18, 0.2);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* ─── 全局重置 ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ─── spin 动画 ─── */
@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 fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(230, 0, 18, 0.2); }
  50% { box-shadow: 0 0 40px rgba(230, 0, 18, 0.4); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease forwards;
}

/* ─── 滚动显示动画 ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ─── 布局容器 ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 48px;
  }
}

/* ─── 导航栏 ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(4, 4, 5, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: background var(--transition-normal);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.navbar-brand svg {
  width: 36px;
  height: 36px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--accent);
  background: rgba(230, 0, 18, 0.1);
}

/* ─── 按钮样式 ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-normal);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 40px rgba(230, 0, 18, 0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 44px;
  font-size: 18px;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 14px;
}

/* ─── 区块标题 ─── */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(230, 0, 18, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 32px;
  }
  .section-desc {
    font-size: 16px;
  }
}

/* ─── 卡片样式 ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 0, 18, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── 平台下载卡片 ─── */
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  text-align: center;
  transition: all var(--transition-normal);
}

.platform-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.platform-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 0, 18, 0.08);
  border-radius: var(--radius-md);
}

.platform-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.platform-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.platform-version {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.platform-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ─── 评价卡片 ─── */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-normal);
}

.review-card:hover {
  border-color: var(--border-hover);
}

.review-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.review-stars svg {
  width: 18px;
  height: 18px;
  color: #f5a623;
  fill: #f5a623;
}

.review-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff4d5a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.review-name {
  font-size: 15px;
  font-weight: 600;
}

.review-role {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── 数据统计 ─── */
.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 16px;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .stat-number {
    font-size: 40px;
  }
}

/* ─── FAQ 手风琴 ─── */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item:hover {
  border-color: var(--border-hover);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── 对比表格 ─── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.compare-table th {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compare-table td {
  font-size: 15px;
}

.compare-table td:first-child {
  font-weight: 600;
}

.compare-table .check {
  color: #4ade80;
}

.compare-table .cross {
  color: #ef4444;
}

.compare-table .highlight-row {
  background: rgba(230, 0, 18, 0.05);
}

/* ─── 页脚 ─── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 32px;
}

.footer-disclaimer {
  text-align: center;
  padding: 24px;
  background: rgba(230, 0, 18, 0.05);
  border: 1px solid rgba(230, 0, 18, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 40px;
}

.footer-disclaimer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── 分隔线 ─── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 80px 0;
}

/* ─── 渐变文字 ─── */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── 标签 ─── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(230, 0, 18, 0.1);
  color: var(--accent);
  border-radius: var(--radius-full);
}

/* ─── 步骤指示器 ─── */
.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ─── 版本日志 ─── */
.changelog-item {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.changelog-version {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.changelog-version .version-tag {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.changelog-version .version-date {
  font-size: 13px;
  color: var(--text-muted);
}

.changelog-list {
  list-style: disc;
  padding-left: 20px;
}

.changelog-list li {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.6;
}

/* ─── 系统要求表格 ─── */
.sysreq-table {
  width: 100%;
  border-collapse: collapse;
}

.sysreq-table th,
.sysreq-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.sysreq-table th {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
}

.sysreq-table td {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ─── 响应式工具 ─── */
.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1024px) {
  .grid-lg-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-lg-1 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .grid-md-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-md-1 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-sm-1 { grid-template-columns: 1fr; }
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 16px;
}

.gap-6 {
  gap: 24px;
}

.gap-8 {
  gap: 32px;
}

.text-center {
  text-align: center;
}

.mt-8 {
  margin-top: 32px;
}

.mb-8 {
  margin-bottom: 32px;
}

.py-20 {
  padding-top: 80px;
  padding-bottom: 80px;
}

.py-24 {
  padding-top: 96px;
  padding-bottom: 96px;
}

.py-32 {
  padding-top: 128px;
  padding-bottom: 128px;
}

/* ─── 移动端菜单 ─── */
.mobile-menu-toggle {
  display: none;
  padding: 8px;
  color: var(--text-primary);
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(4, 4, 5, 0.98);
    backdrop-filter: blur(20px);
    padding: 16px;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--glass-border);
  }

  .navbar-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 14px 20px;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* ─── 滚动条美化 ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ─── 选择文字颜色 ─── */
::selection {
  background: rgba(230, 0, 18, 0.3);
  color: var(--text-primary);
}
