/* WPS Office Landing Site - Set 1 Corporate Red Theme */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #E53935;
  --primary-dark: #C62828;
  --primary-light: #FFEBEE;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --text: #212121;
  --text-secondary: #616161;
  --text-muted: #9E9E9E;
  --border: #E0E0E0;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 24px rgba(229, 57, 53, 0.15);
  --radius: 12px;
  --nav-height: 64px;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Keyframes - spin only (no fade/reveal) */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.logo:hover {
  color: var(--text);
}

.logo svg {
  width: 36px;
  height: 36px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  position: relative;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.main-nav a.active {
  color: var(--primary);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

.nav-anchors {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.nav-anchors a {
  font-size: 0.85rem;
  padding: 6px 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(229, 57, 53, 0.45);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 80px) 0 100px;
  text-align: center;
  overflow: hidden;
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.12) 0%, rgba(229, 57, 53, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: var(--primary);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Features section */
.features-section {
  background: var(--white);
}

/* Stats strip */
.stats-strip {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 48px 0;
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 8px;
}

.stat-item .stat-label {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Platform cards */
.platforms-section {
  background: var(--bg);
}

.platform-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}

.platform-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.platform-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  color: var(--primary);
}

.platform-icon svg {
  width: 32px;
  height: 32px;
}

.platform-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.platform-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  min-height: 60px;
}

/* Deep feature articles */
.deep-features {
  background: var(--white);
}

.feature-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}

.feature-article:last-child {
  margin-bottom: 0;
}

.feature-article.reverse {
  direction: rtl;
}

.feature-article.reverse > * {
  direction: ltr;
}

.feature-article-visual {
  background: linear-gradient(135deg, var(--primary-light), var(--white));
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  box-shadow: var(--shadow);
}

.feature-article-visual svg {
  width: 120px;
  height: 120px;
  color: var(--primary);
  opacity: 0.85;
}

.feature-article-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
}

.feature-article-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.85;
  font-size: 0.98rem;
}

.feature-article-content ul {
  list-style: none;
  margin-top: 16px;
}

.feature-article-content li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-article-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

/* Compare table */
.compare-section {
  background: var(--bg);
}

.compare-table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.compare-table th,
.compare-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: var(--primary-light);
  font-weight: 700;
  color: var(--text);
}

.compare-table th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
}

.compare-table .check {
  color: var(--primary);
  font-weight: 700;
}

.compare-table .cross {
  color: var(--text-muted);
}

/* Reviews */
.reviews-section {
  background: var(--white);
}

.review-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow-hover);
}

.review-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  color: #FFB300;
}

.review-stars svg {
  width: 18px;
  height: 18px;
}

.review-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 20px;
  font-style: italic;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.review-author-info .name {
  font-weight: 600;
  font-size: 0.95rem;
}

.review-author-info .role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* FAQ - details/summary */
.faq-section {
  background: var(--bg);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  transition: color var(--transition), background var(--transition);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform var(--transition);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.faq-item .faq-answer {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* FAQ - checkbox accordion alternative */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-accordion input[type="checkbox"] {
  display: none;
}

.faq-accordion label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: color var(--transition), background var(--transition);
}

.faq-accordion label:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.faq-accordion label::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
}

.faq-accordion input:checked + label::after {
  content: "−";
}

.faq-accordion .faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--white);
  margin-top: -12px;
  margin-bottom: 12px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.faq-accordion input:checked + label + .faq-panel {
  max-height: 500px;
}

.faq-accordion .faq-panel-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* Download page */
.download-hero {
  padding: calc(var(--nav-height) + 60px) 0 60px;
  background: var(--white);
  text-align: center;
}

.download-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.download-featured {
  background: linear-gradient(135deg, var(--primary-light), var(--white));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  margin-bottom: 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.download-featured-info h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.version-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary);
  color: var(--white);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 16px 0 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.download-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.download-requirements {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.install-guide {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 32px;
}

.install-guide h3 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: var(--text);
}

.install-steps {
  counter-reset: step;
  list-style: none;
}

.install-steps li {
  position: relative;
  padding-left: 48px;
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.install-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.changelog {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.changelog-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.changelog-item:first-child {
  padding-top: 0;
}

.changelog-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.changelog-version {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.changelog-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.changelog-item ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.changelog-item li {
  margin-bottom: 4px;
}

.security-notice {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px;
  margin: 32px 0;
}

.security-notice h3 {
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.security-notice p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
}

.sys-req-list {
  list-style: none;
  margin-top: 16px;
}

.sys-req-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.sys-req-list li:last-child {
  border-bottom: none;
}

.sys-req-list strong {
  color: var(--text);
  display: inline-block;
  min-width: 120px;
}

/* ZH-CN article page */
.article-page {
  padding: calc(var(--nav-height) + 40px) 0 60px;
}

.article-page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.4;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-content {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px;
  max-width: 860px;
  margin: 0 auto;
}

.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--text);
}

.article-content h2:first-of-type {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.article-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.85;
  font-size: 0.98rem;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 16px 24px;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.75;
}

.article-cta {
  text-align: center;
  margin-top: 48px;
  padding: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--white));
  border-radius: var(--radius);
}

.article-cta h2 {
  margin-bottom: 16px;
}

.article-cta p {
  margin-bottom: 24px;
}

.tip-box {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.tip-box strong {
  color: var(--primary-dark);
}

/* Footer */
.site-footer {
  background: #263238;
  color: rgba(255, 255, 255, 0.85);
  padding: 40px 0;
  text-align: center;
}

.footer-security {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(229, 57, 53, 0.2);
  padding: 10px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #FFCDD2;
}

.footer-security svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
}

/* Utility */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mt-32 { margin-top: 32px; }

/* Responsive */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .feature-article {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-article.reverse {
    direction: ltr;
  }

  .download-featured {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .download-featured .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-anchors {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  section {
    padding: 56px 0;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .article-content {
    padding: 24px;
  }

  .download-featured {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-item .stat-number {
    font-size: 2rem;
  }
}
