/* ============================================================
   WPS Office Download Site - Global Styles
   Pure HTML + CSS + JS, no frameworks
   ============================================================ */

/* ----- CSS Reset & Base ----- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ----- CSS Variables ----- */
:root {
  --brand: #FF5722;
  --brand-dark: #E64A19;
  --brand-light: #FFF3E0;
  --black: #1A1A1A;
  --dark-gray: #333;
  --mid-gray: #666;
  --light-gray: #F5F5F5;
  --white: #FFF;
  --border-gray: #E8E8E8;
  --success: #4CAF50;
  --warning: #FFC107;
  --info: #2196F3;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-brand: 0 8px 20px rgba(255,87,34,0.3);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container: 1200px;
  --transition: all 0.3s ease;
}

/* ----- Keyframes ----- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  to {
    max-height: 500px;
    opacity: 1;
  }
}

/* ----- Scroll Reveal Base ----- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(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; }

/* ----- Container ----- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ----- Buttons ----- */
.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-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark-gray);
  border: 1px solid var(--border-gray);
}

.btn-secondary:hover {
  background: var(--light-gray);
  border-color: var(--brand);
}

.btn-white {
  background: var(--white);
  color: var(--brand);
  font-weight: 600;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 18px;
}

/* ----- Tags ----- */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}

/* ----- Cards ----- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ----- Navbar ----- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  transition: var(--transition);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo svg {
  width: 32px;
  height: 32px;
}

.nav-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  transition: var(--transition);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--dark-gray);
  padding: 6px 0;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--brand);
}

.nav-link.active {
  color: var(--brand);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--brand);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--dark-gray);
}

/* ----- Mobile Menu ----- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: var(--white);
  z-index: 1001;
  padding: 80px 24px 24px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-link {
  display: block;
  color: var(--dark-gray);
  font-size: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-gray);
}

.mobile-menu .nav-link.active {
  color: var(--brand);
}

/* ----- Section Headers ----- */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--mid-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ----- Footer ----- */
.footer {
  background: var(--black);
  color: var(--white);
  padding-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-column h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: var(--brand);
}

.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  text-align: center;
}

.footer-disclaimer p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}

/* ----- Star Rating ----- */
.stars {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.star {
  color: #FFB400;
}

.star-empty {
  color: #E0E0E0;
}

/* ----- FAQ Accordion ----- */
.faq-item {
  border-bottom: 1px solid var(--border-gray);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--black);
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--brand);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  opacity: 1;
}

.faq-answer p {
  padding-bottom: 20px;
  font-size: 15px;
  color: var(--mid-gray);
  line-height: 1.8;
}

/* ----- Page Loader ----- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  margin-top: 16px;
  font-size: 14px;
  color: var(--mid-gray);
}

/* ----- Responsive ----- */
@media (max-width: 1023px) {
  .section-header h2 {
    font-size: 30px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 15px;
  }

  .btn-lg {
    padding: 14px 32px;
    font-size: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
  }

  .footer-disclaimer p {
    font-size: 12px;
  }
}
