/* ========================================
   WPS Office Download Site — Global Styles
   ======================================== */

/* ---- CSS Variables ---- */
:root {
  --primary: #E60012;
  --primary-dark: #C4000F;
  --primary-light: #FF4D5E;
  --text-primary: #1A1A2E;
  --text-secondary: #4A4A5A;
  --text-muted: #7A7A8A;
  --bg: #FFFFFF;
  --bg-light: #F8F9FC;
  --bg-dark: #1A1A2E;
  --border: #E8E8F0;
  --success: #10B981;
  --warning: #F59E0B;
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ---- Utilities ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 768px) { .container { padding-left: 40px; padding-right: 40px; } }
@media (min-width: 1024px) { .container { padding-left: 80px; padding-right: 80px; } }

.text-center { text-align: center; }
.section-heading {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.section-subheading {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
}
@media (max-width: 767px) {
  .section-heading { font-size: 28px; }
  .section-subheading { font-size: 15px; margin-bottom: 36px; }
}

/* ---- Navigation ---- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}
.site-nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}
@media (max-width: 767px) {
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 13px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 16px rgba(230,0,18,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230,0,18,0.35);
}
.btn-primary:active { transform: translateY(0); }
.btn-lg { padding: 16px 40px; font-size: 18px; }
.btn-full { width: 100%; }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---- Cards ---- */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border-color: transparent;
  transform: translateY(-4px);
}

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 24px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.open .faq-answer {
  max-height: 600px;
  padding-bottom: 24px;
}
.faq-answer p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-dark);
  padding: 48px 24px 24px;
}
.site-footer .container { text-align: center; }
.footer-safe {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
}
.footer-disclaimer {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
}
.footer-nav a {
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.footer-nav a:hover { color: #fff; }

/* ---- Animations ---- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  from { height: 0; }
  to { height: 100%; }
}
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ---- Hero ---- */
.hero {
  min-height: 600px;
  padding-top: 120px;
  padding-bottom: 80px;
  background: linear-gradient(135deg, #F8F9FC 0%, #FFF0F1 50%, #F8F9FC 100%);
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}
.hero-content { max-width: 560px; flex-shrink: 0; }
.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-top: 20px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}
.hero-visual-inner {
  position: relative;
  width: 400px;
  height: 320px;
}
@media (max-width: 1023px) {
  .hero .container { flex-direction: column; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-title { font-size: 36px; }
  .hero-actions { justify-content: center; }
  .hero-visual { width: 100%; min-height: 280px; }
  .hero-visual-inner { width: 300px; height: 240px; }
}
@media (max-width: 767px) {
  .hero { min-height: auto; padding-top: 100px; padding-bottom: 60px; }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ---- Section ---- */
.section { padding: 80px 0; }
@media (max-width: 767px) { .section { padding: 56px 0; } }

/* ---- Grid helpers ---- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Feature icon wrapper ---- */
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}
.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Platform card ---- */
.platform-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
}
.platform-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}
.platform-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--primary);
}
.platform-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.platform-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ---- Testimonial card ---- */
.testimonial-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.testimonial-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.testimonial-stars svg {
  width: 18px;
  height: 18px;
  color: var(--warning);
}
.testimonial-user {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}
.testimonial-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.testimonial-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Stats ---- */
.stats-section {
  background: linear-gradient(135deg, #1A1A2E, #2D2D44);
  padding: 80px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--primary-light);
}
.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 14px;
  color: #A0A0B0;
}
@media (max-width: 1023px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (max-width: 767px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .stat-number { font-size: 32px; }
}

/* ---- Comparison table ---- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  text-align: left;
  font-size: 14px;
}
.comparison-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-primary);
}
.comparison-table tr:nth-child(even) td {
  background: var(--bg-light);
}
.comparison-table td {
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}
.comparison-table td:first-child {
  font-weight: 500;
  color: var(--text-primary);
}
.comparison-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 500;
}
.comparison-check svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .comparison-table th,
  .comparison-table td { padding: 12px 14px; font-size: 13px; }
}

/* ---- Timeline steps ---- */
.timeline {
  position: relative;
  padding-left: 60px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-number {
  position: absolute;
  left: -60px;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  z-index: 2;
}
.timeline-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.timeline-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
@media (max-width: 767px) {
  .timeline { padding-left: 50px; }
  .timeline::before { left: 19px; }
  .timeline-number {
    left: -50px;
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
}

/* ---- Version card ---- */
.version-card {
  background: var(--bg-light);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin-bottom: 12px;
}
.version-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.version-tag {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}
.version-date {
  font-size: 13px;
  color: var(--text-muted);
}
.version-list {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 16px;
}
.version-list li {
  list-style: disc;
  margin-bottom: 4px;
}

/* ---- Security section ---- */
.security-section {
  background: linear-gradient(135deg, #1A1A2E, #2D2D44);
  padding: 80px 0;
  text-align: center;
}
.security-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--primary-light);
}
.security-heading {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.security-text {
  font-size: 16px;
  color: #A0A0B0;
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 32px;
}
.security-points {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.security-point {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.security-point svg {
  width: 20px;
  height: 20px;
  color: var(--success);
}

/* ---- CTA banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 80px 0;
  text-align: center;
}
.cta-banner .section-heading {
  color: #fff;
  margin-bottom: 12px;
}
.cta-banner .section-subheading {
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}
.cta-banner .btn {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}
.cta-banner .btn:hover {
  background: var(--bg-light);
  transform: scale(1.02);
}

/* ---- Tip card ---- */
.tip-card {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 28px;
}
.tip-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}
.tip-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.tip-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Comparison cards (3-up) ---- */
.compare-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.compare-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}
.compare-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 8px 30px rgba(230,0,18,0.1);
}
.compare-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.compare-card.featured h4 { color: var(--primary); }
.compare-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.compare-card li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.compare-card li svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.compare-card.featured li { color: var(--text-primary); }
.compare-card.featured .compare-check { color: var(--success); }
.compare-card .compare-x { color: var(--text-muted); }
.compare-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
}
@media (max-width: 1023px) {
  .compare-cards { grid-template-columns: 1fr; }
}

/* ---- Detail blocks (alternating) ---- */
.detail-block {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 80px;
}
.detail-block:last-child { margin-bottom: 0; }
.detail-block.reverse { flex-direction: row-reverse; }
.detail-block-text { flex: 1; max-width: 480px; }
.detail-block-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}
.detail-block h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.3;
}
.detail-block p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}
@media (max-width: 1023px) {
  .detail-block,
  .detail-block.reverse {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
  .detail-block-text { max-width: 100%; }
}

/* ---- Requirement card ---- */
.req-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
}
.req-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.req-card h4 svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.req-card ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.req-card li {
  font-size: 14px;
  color: var(--text-secondary);
}
.req-card li strong {
  color: var(--text-primary);
  font-weight: 500;
}
