/* ===== 全局变量与基础 ===== */
:root {
  --bg: #f8f9fa;
  --text: #1a1a2e;
  --primary: #1a1a2e;
  --accent: #e94560;
  --card: rgba(255, 255, 255, 0.85);
  --card-border: rgba(255, 255, 255, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --max-w: 1200px;
  --nav-h: 64px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
  --scrollbar-track: #e0e0e0;
  --scrollbar-thumb: #a0a0a0;
}

.dark {
  --bg: #0a0a14;
  --text: #e8e8f0;
  --card: rgba(20, 20, 36, 0.85);
  --card-border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(20, 20, 36, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  --scrollbar-track: #1a1a2e;
  --scrollbar-thumb: #333;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

body::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

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

a:hover {
  color: #ff6b81;
}

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

/* ===== 容器 ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background: #d6344e;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

.btn:active {
  transform: translateY(0);
}

/* ===== 通用区块 ===== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-sub {
  text-align: center;
  color: #888;
  margin-bottom: 48px;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.dark .section-sub {
  color: #aaa;
}

/* ===== 网格布局 ===== */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 28px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #ff6b81, #ffa07a);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.dark .card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ===== 徽章 ===== */
.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.tag {
  display: inline-block;
  background: rgba(233, 69, 96, 0.12);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 3px;
  border: 1px solid rgba(233, 69, 96, 0.2);
  transition: all var(--transition);
}

.tag:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== 导航栏 ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  height: var(--nav-h);
  transition: all var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.logo {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 0;
  position: relative;
  transition: color var(--transition);
}

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

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
  transition: transform var(--transition);
}

.menu-toggle:hover {
  transform: scale(1.1);
}

.dark-toggle {
  background: none;
  border: 1px solid var(--text);
  border-radius: 30px;
  padding: 8px 18px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-left: 16px;
}

.dark-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px 32px;
    gap: 16px;
    box-shadow: var(--glass-shadow);
    border-bottom: 1px solid var(--glass-border);
    animation: slideDown 0.3s ease;
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .dark-toggle {
    margin-left: auto;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Hero 区域 ===== */
.hero {
  background: var(--gradient-hero);
  color: #fff;
  padding: 140px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255,255,255,0.05) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

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

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  margin-bottom: 20px;
  letter-spacing: -1px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.25rem;
  max-width: 650px;
  margin: 0 auto 40px;
  opacity: 0.9;
  line-height: 1.8;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero .btn {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: fadeInUp 1s ease 0.4s both;
}

.hero .btn:hover {
  background: #f0f0f0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 统计数字 ===== */
.stat-grid {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  margin: 60px 0 0;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
}

.stat-item:last-child::after {
  display: none;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.95rem;
  color: #aaa;
  font-weight: 500;
}

.dark .stat-label {
  color: #888;
}

@media (max-width: 768px) {
  .stat-grid {
    gap: 32px;
  }
  .stat-item::after {
    display: none;
  }
}

/* ===== 测试卡片 ===== */
.testimonial-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-card p {
  font-style: italic;
  margin-bottom: 16px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.testimonial-card .author {
  font-weight: 700;
  color: var(--accent);
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px 0;
  transition: border-color var(--transition);
}

.dark .faq-item {
  border-color: rgba(255, 255, 255, 0.08);
}

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

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform var(--transition);
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  padding-left: 8px;
  color: #666;
  line-height: 1.8;
}

.dark .faq-answer {
  color: #bbb;
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding-top: 16px;
}

/* ===== HowTo 步骤 ===== */
.howto-step {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  transition: background var(--transition);
}

.howto-step:hover {
  background: rgba(233, 69, 96, 0.05);
}

.dark .howto-step:hover {
  background: rgba(233, 69, 96, 0.1);
}

.howto-step .step-num {
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.howto-step .step-content {
  flex: 1;
}

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

/* ===== 联系表单 ===== */
.contact-grid {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  justify-content: center;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.contact-form {
  flex: 1;
  min-width: 320px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--transition);
  outline: none;
}

.dark .contact-form input,
.dark .contact-form textarea {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(20, 20, 36, 0.8);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.4);
}

/* ===== 文章卡片 ===== */
.article-card .date {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
  display: block;
}

.article-card h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.article-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}

.dark .article-card p {
  color: #bbb;
}

/* ===== 搜索框 ===== */
.search-box {
  max-width: 480px;
  margin: 0 auto 48px;
  display: flex;
  gap: 8px;
}

.search-box input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: all var(--transition);
}

.dark .search-box input {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(20, 20, 36, 0.8);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

.search-box button {
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition);
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
}

/* ===== 页脚 ===== */
.footer {
  background: var(--primary);
  color: #ccc;
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.footer .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer a {
  color: #aaa;
  transition: color var(--transition);
}

.footer a:hover {
  color: #fff;
}

.footer-legal {
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.footer-legal a {
  position: relative;
  padding: 0 8px;
}

.footer-legal a:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: -12px;
  color: rgba(255, 255, 255, 0.2);
}

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, var(--accent), #ff6b81);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 1.6rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  z-index: 99;
  transition: all var(--transition);
}

.back-to-top.visible {
  display: flex;
  animation: fadeInUp 0.3s ease;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
}

/* ===== 滚动动画 ===== */
.section {
  opacity: 0;
  transform: translateY(40px);
  animation: sectionFadeIn 0.8s ease forwards;
}

@keyframes sectionFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }
.section:nth-child(6) { animation-delay: 0.5s; }
.section:nth-child(7) { animation-delay: 0.6s; }
.section:nth-child(8) { animation-delay: 0.7s; }
.section:nth-child(9) { animation-delay: 0.8s; }
.section:nth-child(10) { animation-delay: 0.9s; }
.section:nth-child(11) { animation-delay: 1.0s; }
.section:nth-child(12) { animation-delay: 1.1s; }
.section:nth-child(13) { animation-delay: 1.2s; }
.section:nth-child(14) { animation-delay: 1.3s; }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.6rem;
  }
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 100px 0 80px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .section {
    padding: 64px 0;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .stat-grid {
    gap: 24px;
  }
  .stat-number {
    font-size: 2.2rem;
  }
  .contact-grid {
    flex-direction: column;
  }
  .footer-legal {
    flex-direction: column;
    gap: 8px;
  }
  .footer-legal a:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .container {
    padding: 0 16px;
  }
  .card {
    padding: 24px;
  }
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}

/* ===== 工具类 ===== */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 16px;
}

/* ===== 暗色模式额外调整 ===== */
.dark .card {
  background: rgba(20, 20, 36, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .testimonial-card {
  background: rgba(20, 20, 36, 0.85);
  border-color: rgba(255, 255, 255, 0.08);
}

.dark .search-box input {
  background: rgba(20, 20, 36, 0.8);
}

.dark .contact-form input,
.dark .contact-form textarea {
  background: rgba(20, 20, 36, 0.8);
}

/* ===== 毛玻璃效果增强 ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ===== 渐变边框 ===== */
.gradient-border {
  position: relative;
  border: none;
}

.gradient-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--accent), #ff6b81, #ffa07a);
  border-radius: calc(var(--radius) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ===== 加载动画 ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ===== 打印样式 ===== */
@media print {
  .back-to-top,
  .menu-toggle,
  .dark-toggle {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}