/* ========== WPS Office Landing Page - Global Styles ========== */

/* --- CSS Variables --- */
:root {
  --primary: #FF6B35;
  --primary-dark: #E55A2B;
  --primary-light: #FFF5F0;
  --secondary: #1A1A2E;
  --accent: #FF8C42;
  --text-primary: #1A1A2E;
  --text-secondary: #5A5A7A;
  --text-muted: #8888A0;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FC;
  --bg-dark: #1A1A2E;
  --border: #E8E8F0;
  --border-light: #F0F0F8;
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 4px 20px rgba(26, 26, 46, 0.10);
  --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 72px;
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

/* --- Spin Animation --- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-brand svg {
  width: 36px;
  height: 36px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-light);
  border-color: var(--text-muted);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--border);
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: #9A9AB0;
  padding: 48px 0 32px;
}

.footer-content {
  text-align: center;
}

.footer-security {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: #7A7A90;
}

.footer-security svg {
  width: 18px;
  height: 18px;
  color: #4CAF50;
}

.footer-copyright {
  font-size: 0.8125rem;
  color: #6A6A80;
  line-height: 1.8;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 24px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb .sep {
  margin: 0 8px;
  color: var(--border);
}

.breadcrumb .current {
  color: var(--text-muted);
}

/* --- Article Content --- */
.article-content {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 24px 24px;
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 0 24px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* --- Meta Tags --- */
.meta-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meta-tags .tag {
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .section {
    padding: 56px 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  .nav-menu {
    gap: 4px;
  }

  .nav-item {
    padding: 8px 14px;
    font-size: 0.875rem;
  }

  .container {
    padding: 0 16px;
  }
}

/* --- Loading State --- */
.btn-loading .btn-text {
  opacity: 0;
}

.btn-loading .btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.btn-spinner {
  display: none;
}

.btn-loading .btn-spinner {
  display: block;
}

.btn-spinner svg {
  animation: spin 1s linear infinite;
  width: 20px;
  height: 20px;
}
