/* ═══════════════════════════════════════════════
   流光极速 - Global Styles
   ═══════════════════════════════════════════════ */

/* ─── CSS Reset ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #000000;
  background: #F3EFE6;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  --core-yellow: #FFFF00;
  --taupe: #847D71;
  --deep-ink: #4C4C4C;
  --true-black: #000000;
  --off-white: #F3EFE6;
  --white: #FFFFFF;
  --success: #00AA00;
  --danger: #CC0000;
}

/* ─── Container ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

/* ─── Typography Utilities ─── */
.font-serif {
  font-family: 'Noto Serif SC', Georgia, serif;
}

.font-mono {
  font-family: 'Roboto Mono', monospace;
}

.text-center {
  text-align: center;
}

/* ─── Animations ─── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ─── Section Base ─── */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--true-black);
  color: var(--off-white);
}

.section-light {
  background: var(--off-white);
  color: var(--true-black);
}

.section-yellow {
  background: var(--core-yellow);
  color: var(--true-black);
}

.section-taupe {
  background: var(--taupe);
  color: var(--off-white);
}

.section-ink {
  background: var(--deep-ink);
  color: var(--off-white);
}

.section-white {
  background: var(--white);
  color: var(--true-black);
}

.section-title {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  color: var(--taupe);
  text-align: center;
  margin-bottom: 60px;
}

/* ─── Navigation ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: 24px;
  color: var(--off-white);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
}

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--off-white);
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-link:hover {
  color: var(--core-yellow);
}

.nav-link.active {
  color: var(--core-yellow);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--core-yellow);
}

.nav-download-btn {
  background: var(--core-yellow);
  color: var(--true-black);
  border-radius: 9999px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 255, 0, 0.3);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--off-white);
  transition: all 0.3s ease;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile .nav-link {
  font-size: 20px;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-download-btn {
    display: none;
  }
}

/* ─── Footer ─── */
.footer {
  background: var(--off-white);
  border-top: 2px solid var(--deep-ink);
  padding: 40px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-text {
  font-size: 14px;
  color: var(--taupe);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 14px;
  color: var(--deep-ink);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--true-black);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ─── Grid System ─── */
.grid {
  display: grid;
  gap: 32px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-3,
  .grid-4,
  .grid-2,
  .grid-6 {
    grid-template-columns: 1fr;
  }
}

/* ─── Card Component ─── */
.card {
  background: var(--white);
  border: 1px solid var(--true-black);
  padding: 40px 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0px var(--true-black);
}

.card-icon {
  width: 48px;
  height: 48px;
  color: var(--core-yellow);
  background: var(--true-black);
  padding: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--true-black);
  margin-top: 20px;
}

.card-desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--taupe);
  margin-top: 12px;
}

/* ─── Button Components ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.05);
}

.btn-primary {
  background: var(--core-yellow);
  color: var(--true-black);
  border-radius: 9999px;
  padding: 16px 40px;
  font-size: 16px;
}

.btn-large {
  padding: 20px 48px;
  font-size: 20px;
}

.btn-dark {
  background: var(--true-black);
  color: var(--core-yellow);
}

/* ─── FAQ Component ─── */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 239, 230, 0.1);
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.08);
}

.faq-question-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--off-white);
  flex: 1;
  padding-right: 16px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  color: var(--off-white);
  flex-shrink: 0;
  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;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 32px 24px;
  color: var(--taupe);
  line-height: 1.8;
  font-size: 16px;
}

/* ─── Infinite Scroll Banner ─── */
.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 20s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-text {
  font-family: 'Roboto Mono', monospace;
  font-size: 20px;
  letter-spacing: 2px;
  padding: 0 20px;
}

/* ─── Sliced Text Effect ─── */
.sliced-wrapper {
  position: relative;
  display: inline-block;
  font-family: 'Noto Serif SC', Georgia, serif;
  font-weight: 900;
  font-size: clamp(48px, 10vw, 120px);
  line-height: 1.1;
}

.sliced-container {
  display: flex;
  position: relative;
}

.sliced-part {
  display: inline-block;
  overflow: hidden;
  position: relative;
  will-change: transform, opacity;
}

.sliced-part-inner {
  display: block;
  white-space: nowrap;
}

@keyframes sliceReveal1 {
  0%, 45% { transform: translateY(0); opacity: 1; }
  50%, 95% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes sliceReveal2 {
  0%, 45% { transform: translateY(100%); opacity: 0; }
  50%, 95% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

/* ─── 3D Carousel Effect ─── */
.carousel-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  perspective: 2000px;
  overflow: hidden;
}

.carousel-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1200px;
  height: 600px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%);
  animation: carouselRotate 30s linear infinite;
}

@keyframes carouselRotate {
  from { transform: translate(-50%, -50%) rotateY(0deg); }
  to { transform: translate(-50%, -50%) rotateY(-360deg); }
}

.carousel-slice {
  position: absolute;
  top: 0;
  width: 50px;
  height: 100%;
  background-size: 1200px 100%;
  backface-visibility: hidden;
}

/* ─── Stats Counter ─── */
.stat-number {
  font-family: 'Noto Serif SC', Georgia, serif;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 900;
  color: var(--core-yellow);
}

.stat-label {
  font-size: 16px;
  color: var(--taupe);
  margin-top: 8px;
}

/* ─── Review Card ─── */
.review-card {
  background: var(--true-black);
  color: var(--off-white);
  padding: 32px;
}

.review-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.review-star {
  width: 18px;
  height: 18px;
  color: var(--core-yellow);
}

.review-author {
  font-size: 18px;
  font-weight: 700;
}

.review-rating {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  color: var(--taupe);
  margin-top: 4px;
}

.review-text {
  font-size: 16px;
  line-height: 1.7;
  margin-top: 12px;
  color: rgba(243, 239, 230, 0.9);
}

/* ─── Comparison Table ─── */
.compare-table {
  max-width: 900px;
  margin: 0 auto;
  border: 2px solid var(--true-black);
  border-collapse: collapse;
  width: 100%;
}

.compare-table th,
.compare-table td {
  padding: 16px 24px;
  border: 1px solid var(--true-black);
  text-align: center;
}

.compare-table th {
  background: var(--true-black);
  color: var(--core-yellow);
  font-weight: 700;
}

.compare-table td:first-child {
  font-weight: 700;
  text-align: left;
}

.compare-table .col-chrome {
  background: rgba(255, 255, 0, 0.1);
}

.icon-check {
  color: var(--success);
  font-size: 20px;
}

.icon-cross {
  color: var(--danger);
  font-size: 20px;
}

@media (max-width: 768px) {
  .compare-table {
    font-size: 14px;
  }
  .compare-table th,
  .compare-table td {
    padding: 12px 8px;
  }
}

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Utility ─── */
.hidden {
  display: none !important;
}

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ─── Print ─── */
@media print {
  .navbar,
  .footer,
  .marquee-wrapper,
  .carousel-stage,
  .nav-hamburger {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
}
