/**
 * WPS Office 官网落地页 - 全局样式
 * 纯原生 CSS3，无框架依赖
 */

/* ==================== CSS 变量定义 ==================== */
:root {
  --wps-red: #E60012;
  --wps-orange: #F08524;
  --wps-red-dark: #C4000F;
  --bg-light: #F5F5F5;
  --bg-dark: #2D2D2D;
  --bg-card-dark: #3A3A3A;
  --bg-card-dark-hover: #4A4A4A;
  --text-primary: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #888888;
  --text-light: #FFFFFF;
  --text-light-muted: #AAAAAA;
  --border-color: #E0E0E0;
  --border-dark: #4A4A4A;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-pill: 25px;
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s ease;
  --font-primary: 'Poppins', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-heading: 'Montserrat', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ==================== 全局重置与基础 ==================== */
*, *::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: var(--font-primary);
  color: var(--text-primary);
  line-height: 1.6;
  background-color: var(--bg-light);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: var(--transition-normal);
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Spin 动画（下载按钮 loading 需要） */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== 布局容器 ==================== */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 36px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-title.light {
  color: var(--text-light);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-subtitle.light {
  color: var(--text-light-muted);
}

/* ==================== 导航栏 ==================== */
.main-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 920px;
  max-width: calc(100% - 40px);
  height: 56px;
  background: var(--wps-red);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: box-shadow 0.3s ease, width 0.3s ease;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.nav-logo-icon {
  width: 30px;
  height: 30px;
}

.nav-logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  position: relative;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  color: var(--wps-red);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-cta:hover {
  background: #FFF5F5;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(230, 0, 18, 0.25);
}

.nav-cta-icon {
  width: 16px;
  height: 16px;
}

/* ==================== Hero 区域 ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #E60012 0%, #F04024 40%, #F08524 100%);
  display: flex;
  align-items: center;
  padding: 120px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  max-width: 560px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  color: white;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: white;
  color: var(--wps-red);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 40px;
}

.hero-cta:hover {
  background: #FFF5F5;
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
}

.hero-cta-icon {
  width: 22px;
  height: 22px;
}

/* Hero 数据统计 */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: white;
}

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.3);
}

/* Hero 视觉区域 - UI 模型 */
.hero-visual {
  position: relative;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-window {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.hero-window-main {
  width: 380px;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  transform: perspective(1000px) rotateY(-5deg) rotateX(3deg);
}

.hero-window-sub {
  width: 280px;
  position: absolute;
  top: 80px;
  left: 0;
  z-index: 1;
  transform: perspective(1000px) rotateY(5deg) rotateX(-2deg);
  opacity: 0.92;
}

.window-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #F8F8F8;
  border-bottom: 1px solid #EEEEEE;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.window-title {
  font-size: 11px;
  color: #888;
  font-weight: 500;
}

.window-body {
  padding: 12px;
}

/* Spreadsheet window */
.sheet-toolbar {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F0F0F0;
}

.sheet-tool-btn {
  padding: 3px 10px;
  font-size: 10px;
  color: #666;
  background: #F5F5F5;
  border-radius: 3px;
  border: none;
}

.sheet-tool-btn.active {
  background: var(--wps-red);
  color: white;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 24px repeat(4, 1fr);
  gap: 1px;
  font-size: 10px;
}

.sheet-cell {
  padding: 5px 6px;
  background: white;
  border: 1px solid #F0F0F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333;
}

.sheet-header {
  background: #F8F8F8;
  font-weight: 600;
  color: #666;
  text-align: center;
}

.sheet-row-header {
  background: #F8F8F8;
  font-weight: 500;
  color: #666;
  text-align: center;
}

.sheet-highlight {
  color: #27C93F;
  font-weight: 600;
}

/* Presentation window */
.slide-content {
  padding: 20px;
  text-align: center;
}

.slide-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.slide-subtitle {
  font-size: 10px;
  color: #888;
  margin-bottom: 16px;
}

.slide-chart {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 80px;
  padding: 10px;
  background: #FAFAFA;
  border-radius: 6px;
}

.chart-bar {
  width: 24px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--wps-red), var(--wps-orange));
}

.chart-bar-1 { height: 35%; }
.chart-bar-2 { height: 55%; }
.chart-bar-3 { height: 75%; }
.chart-bar-4 { height: 60%; }
.chart-bar-5 { height: 85%; }

/* AI Badge */
.hero-ai-badge {
  position: absolute;
  bottom: 60px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.ai-badge-icon {
  width: 26px;
  height: 26px;
}

.ai-badge-text {
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--wps-red), var(--wps-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Wave Divider */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 2;
}

.hero-wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==================== 功能特色 ==================== */
.features {
  padding: 80px 0;
  background: var(--bg-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-content {
  flex: 1;
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== 多平台支持 ==================== */
.platforms {
  padding: 80px 0;
  background: var(--bg-dark);
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.platform-card {
  background: var(--bg-card-dark);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  transition: var(--transition-normal);
}

.platform-card:hover {
  background: var(--bg-card-dark-hover);
  transform: translateY(-4px);
}

.platform-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.platform-icon svg {
  width: 100%;
  height: 100%;
}

.platform-name {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 6px;
}

.platform-desc {
  font-size: 13px;
  color: var(--text-light-muted);
  margin-bottom: 4px;
}

.platform-size {
  font-size: 12px;
  color: #777;
  margin-bottom: 20px;
}

.platform-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--wps-red);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  width: 100%;
}

.platform-btn:hover {
  background: var(--wps-red-dark);
  transform: scale(1.03);
}

.btn-icon {
  width: 16px;
  height: 16px;
}

/* ==================== 用户评价 ==================== */
.reviews {
  padding: 80px 0;
  background: var(--bg-light);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 28px;
  border-left: 4px solid var(--wps-red);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.review-card:hover {
  box-shadow: var(--shadow-md);
}

.review-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}

.star {
  width: 18px;
  height: 18px;
  color: #FFB400;
}

.review-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
  font-style: italic;
}

.reviewer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.reviewer-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.reviewer-avatar svg {
  width: 100%;
  height: 100%;
}

.reviewer-info {
  display: flex;
  flex-direction: column;
}

.reviewer-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.reviewer-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==================== 安全保障 ==================== */
.security {
  padding: 80px 0;
  background: var(--bg-dark);
}

.security-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 60px;
}

.security-feature {
  text-align: center;
}

.security-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
}

.security-icon svg {
  width: 100%;
  height: 100%;
}

.security-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.security-desc {
  font-size: 14px;
  color: var(--text-light-muted);
  line-height: 1.7;
}

/* 对比表格 */
.comparison-section {
  margin-top: 50px;
}

.comparison-title {
  font-size: 22px;
  font-weight: 700;
  color: white;
  text-align: center;
  margin-bottom: 24px;
}

.comparison-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.comparison-table thead th {
  background: var(--wps-red);
  color: white;
  font-weight: 600;
  padding: 14px 20px;
  font-size: 15px;
  text-align: left;
}

.comparison-table tbody td {
  padding: 14px 20px;
  font-size: 14px;
  color: #CCCCCC;
  border-bottom: 1px solid var(--border-dark);
  background: var(--bg-card-dark);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.highlight-col {
  background: rgba(230, 0, 18, 0.08) !important;
  color: white !important;
  font-weight: 500;
}

.check-mark {
  color: #4ADE80;
  font-weight: bold;
  margin-right: 6px;
}

/* ==================== 版本选择 ==================== */
.versions {
  padding: 80px 0;
  background: var(--bg-light);
}

.versions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.version-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 32px 28px;
  border: 2px solid var(--border-color);
  position: relative;
  transition: var(--transition-normal);
}

.version-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #D0D0D0;
}

.version-card-featured {
  border-color: var(--wps-red);
  transform: scale(1.04);
  box-shadow: 0 8px 32px rgba(230, 0, 18, 0.12);
  z-index: 2;
}

.version-card-featured:hover {
  box-shadow: 0 12px 40px rgba(230, 0, 18, 0.18);
}

.version-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wps-red);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 0 0 12px 12px;
}

.version-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.version-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.version-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--wps-red);
  font-family: var(--font-heading);
}

.version-period {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 400;
}

.version-features {
  margin-bottom: 28px;
}

.version-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.version-features li.feature-missing {
  color: var(--text-muted);
}

.feature-check {
  width: 18px;
  height: 18px;
  color: #27C93F;
  flex-shrink: 0;
}

.feature-x {
  width: 18px;
  height: 18px;
  color: #CCCCCC;
  flex-shrink: 0;
}

.version-btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-align: center;
}

.version-btn-primary {
  background: var(--wps-red);
  color: white;
}

.version-btn-primary:hover {
  background: var(--wps-red-dark);
  transform: scale(1.03);
}

.version-btn-outline {
  background: white;
  color: var(--wps-red);
  border: 2px solid var(--wps-red);
}

.version-btn-outline:hover {
  background: #FFF5F5;
  transform: scale(1.03);
}

/* ==================== FAQ 常见问题 ==================== */
.faq {
  padding: 80px 0;
  background: var(--bg-dark);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-dark);
}

.faq-item:first-child {
  border-top: 1px solid var(--border-dark);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 22px 0;
  background: none;
  color: white;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
}

.faq-question:hover {
  color: var(--wps-red);
}

.faq-q-text {
  padding-right: 20px;
}

.faq-toggle {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
}

.faq-toggle svg {
  width: 100%  !important;
  height: 100%  !important;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-plus,
.icon-minus {
  width: 24px;
  height: 24px;
}

.icon-plus {
  opacity: 1;
}

.icon-minus {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
}

/* 展开状态 */
.faq-item.is-open .icon-plus {
  opacity: 0;
  transform: rotate(90deg);
}

.faq-item.is-open .icon-minus {
  opacity: 1;
  transform: rotate(0deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 0 24px 0;
  color: var(--text-light-muted);
  font-size: 14px;
  line-height: 1.8;
}

.faq-answer-inner p {
  margin-bottom: 10px;
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

.faq-answer-inner ul,
.faq-answer-inner ol {
  margin: 10px 0 10px 20px;
  list-style-position: outside;
}

.faq-answer-inner ul {
  list-style-type: disc;
}

.faq-answer-inner ol {
  list-style-type: decimal;
}

.faq-answer-inner li {
  margin-bottom: 6px;
  color: var(--text-light-muted);
}

.faq-answer-inner strong {
  color: white;
  font-weight: 600;
}

/* ==================== 页脚 ==================== */
.footer {
  padding: 28px 0;
  background: #222222;
  text-align: center;
}

.footer-content p {
  font-size: 14px;
  color: #888888;
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    display: none;
  }

  .hero-content {
    text-align: center;
    max-width: 100%;
  }

  .hero-stats {
    justify-content: center;
  }

  .stat-item {
    align-items: center;
  }

  .versions-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .version-card-featured {
    transform: none;
    order: -1;
  }
}

@media (max-width: 900px) {
  .main-nav {
    width: 100%;
    max-width: calc(100% - 30px);
    top: 10px;
    padding: 0 16px;
    height: 50px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    padding: 7px 14px;
    font-size: 12px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .security-features {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .comparison-table {
    font-size: 13px;
  }

  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 10px 12px;
  }

  .hero {
    padding: 110px 0 80px;
    min-height: auto;
  }

  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .platforms-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 12px;
  }

  .stat-divider {
    display: none;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }
}
