/* ========== Custom Font & Base ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --accent: #f59e0b;
  --dark: #0f172a;
  --darker: #020617;
  --light: #f8fafc;
  --card-bg: #1e293b;
  --text-muted: #94a3b8;
  --gradient-1: linear-gradient(135deg, #1a56db 0%, #7c3aed 100%);
  --gradient-2: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--darker);
  color: #e2e8f0;
  overflow-x: hidden;
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--darker); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ========== Glass Effect ========== */
.glass {
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ========== Navbar ========== */
.navbar-scrolled {
  background: rgba(2, 6, 23, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-link {
  position: relative;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
  transition: transform 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* ========== Hero Section ========== */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  pointer-events: none;
}

.hero-glow-1 {
  background: var(--primary);
  top: -200px;
  left: -100px;
  animation: floatGlow 8s ease-in-out infinite;
}

.hero-glow-2 {
  background: #7c3aed;
  bottom: -200px;
  right: -100px;
  animation: floatGlow 8s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ========== Animated Border Card ========== */
.card-hover {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient-1);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(26, 86, 219, 0.25);
}

.card-hover:hover::before {
  opacity: 1;
}

/* ========== Feature Icon ========== */
.feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 28px;
  background: var(--gradient-1);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-hover:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 10px 40px rgba(26, 86, 219, 0.5);
}

/* ========== Stats Counter ========== */
.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

/* ========== Testimonial Card ========== */
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 2rem;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  opacity: 0.15;
  font-family: serif;
}

/* ========== FAQ Accordion ========== */
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--card-bg);
  transition: all 0.3s ease;
}

.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(26, 86, 219, 0.15);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #60a5fa;
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform 0.4s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========== CTA Section ========== */
.cta-section {
  background: var(--gradient-1);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  top: -100px;
  right: -100px;
}

.cta-section::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  bottom: -80px;
  left: -80px;
}

/* ========== Button Styles ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  background: var(--gradient-1);
  color: #fff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(26, 86, 219, 0.5);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  transition: all 0.3s ease;
}

.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 50px;
  background: var(--gradient-2);
  color: #fff;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(245, 158, 11, 0.5);
}

/* ========== Footer ========== */
.footer-link {
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #60a5fa;
}

.footer-social {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.footer-social:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

/* ========== Hamburger Menu ========== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100vh;
  background: var(--dark);
  z-index: 1000;
  padding: 5rem 2rem 2rem;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu.open {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ========== Page Hero (About/Download) ========== */
.page-hero {
  padding-top: 8rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: var(--primary);
  filter: blur(150px);
  opacity: 0.15;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
}

/* ========== Download Cards ========== */
.download-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.download-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  border-color: var(--primary);
}

.download-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.1) 0%, var(--card-bg) 30%);
}

.download-card.featured::before {
  content: '推荐';
  position: absolute;
  top: 16px;
  right: -32px;
  background: var(--gradient-2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 3rem;
  transform: rotate(45deg);
}

.download-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  font-size: 36px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-1);
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Pulse Dot ========== */
.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ========== About Page Timelime ========== */
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 2.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item:last-child {
  border-left-color: transparent;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 20px rgba(26, 86, 219, 0.6);
}

/* ========== Responsive Tweaks ========== */
@media (max-width: 768px) {
  .hero-glow {
    width: 300px;
    height: 300px;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .page-hero {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
}
