/* 全局样式与CSS变量 */
:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --secondary: #1d3557;
  --accent: #f1faee;
  --bg: #ffffff;
  --text: #1a1a2e;
  --text-light: #6c757d;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --transition: 0.3s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--secondary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 700px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 50px 0;
  }
  .section-title {
    font-size: 1.6rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--secondary);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg);
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  .nav.open {
    display: flex;
  }
  .hamburger {
    display: flex;
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 650px;
}

.hero-badge {
  display: inline-block;
  background: rgba(230, 57, 70, 0.2);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(230, 57, 70, 0.3);
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stats .stat {
  text-align: center;
}

.hero-stats .stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.hero-stats .stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
  }
  .hero-stats .stat {
    flex: 1;
    min-width: 80px;
  }
}

/* About */
.about {
  background: var(--gray-100);
}

.about .grid-2 {
  align-items: center;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 1.05rem;
}

.about-list {
  list-style: none;
  margin-top: 20px;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-weight: 500;
}

.about-list li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* Products */
.products {
  background: var(--bg);
}

.product-card {
  text-align: center;
  padding: 40px 30px;
}

.product-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
}

.product-card h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.product-card p {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* Advantages */
.advantages {
  background: var(--gray-100);
}

.advantage-item {
  text-align: center;
  padding: 30px 20px;
}

.advantage-item .num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.advantage-item h4 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

/* FAQ */
.faq {
  background: var(--bg);
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  padding: 8px 0;
  text-align: left;
}

.faq-question .icon {
  font-size: 1.4rem;
  transition: transform var(--transition);
  color: var(--primary);
}

.faq-item.active .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s;
  opacity: 0;
  color: var(--text-light);
  line-height: 1.7;
  padding-left: 0;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  opacity: 1;
  padding: 8px 0 16px;
}

/* HowTo */
.howto {
  background: var(--gray-100);
}

.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.howto-step .step-num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.howto-step h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.howto-step p {
  color: var(--text-light);
}

/* Testimonials */
.testimonials {
  background: var(--bg);
}

.testimonial-card {
  padding: 30px;
  position: relative;
}

.testimonial-card .quote {
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card .author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

.testimonial-card .author-info strong {
  display: block;
  font-size: 0.95rem;
}

.testimonial-card .author-info span {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Insights */
.insights {
  background: var(--gray-100);
}

.insight-card {
  padding: 25px;
}

.insight-card .date {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.insight-card h4 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.insight-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.insight-card .read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Contact */
.contact {
  background: var(--bg);
}

.contact-info {
  list-style: none;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--text-light);
}

.contact-info .icon {
  width: 40px;
  height: 40px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Footer */
.footer {
  background: var(--secondary);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 30px;
}

.footer .grid-4 {
  gap: 30px;
}

.footer h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer ul a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
  color: var(--primary);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

/* Scroll animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Dark mode */
body.dark {
  --bg: #1a1a2e;
  --text: #f1faee;
  --text-light: #b0b0c0;
  --gray-100: #16213e;
  --gray-200: #1f2b47;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark .header {
  background: rgba(26, 26, 46, 0.95);
}

body.dark .hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #16213e 50%, #0f3460 100%);
}

body.dark .nav a {
  color: var(--text);
}

body.dark .card {
  background: #1f2b47;
}

body.dark .contact-info .icon {
  background: #2a3a5e;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}