/* ===== 全局重置 & 基础 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: #0f172a;
  color: #e2e8f0;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ===== 容器 ===== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== 毛玻璃通用 ===== */
.glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dark .card {
  background: #1e293b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

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

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #d4a373, #b5835a);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

/* ===== 渐变背景 ===== */
.gradient-bg {
  background: linear-gradient(145deg, #0b1a2e 0%, #1a2f44 100%);
}

.dark .gradient-bg {
  background: linear-gradient(145deg, #020617, #0f172a);
}

/* ===== 头部 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.dark .site-header {
  background: rgba(15, 23, 42, 0.75);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.logo svg {
  width: 140px;
  height: auto;
}

.nav {
  display: flex;
  gap: 2rem;
  font-weight: 500;
}

.nav a {
  position: relative;
  padding: 0.3rem 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #b5835a;
  transition: width 0.2s;
}

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

.nav a.active {
  color: #b5835a;
}

.header-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.dark-toggle {
  background: none;
  border: 1px solid #ccc;
  border-radius: 30px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.dark-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.dark .dark-toggle {
  border-color: #475569;
}

.dark .dark-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.hamburger span {
  width: 28px;
  height: 2px;
  background: #1e293b;
  border-radius: 4px;
  transition: background 0.2s;
}

.dark .hamburger span {
  background: #e2e8f0;
}

/* ===== Hero Banner ===== */
.hero {
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: linear-gradient(135deg, #d4a373, #b5835a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  margin: 1.5rem 0 2rem;
  opacity: 0.8;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

/* ===== 通用区块 ===== */
section {
  padding: 4.5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: #64748b;
  max-width: 720px;
  margin-bottom: 3rem;
}

.dark .section-sub {
  color: #94a3b8;
}

/* ===== 网格 ===== */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== 数字高亮 ===== */
.num-highlight {
  font-size: 2.6rem;
  font-weight: 800;
  color: #b5835a;
}

/* ===== 页脚 ===== */
.site-footer {
  background: #0b1a2e;
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
}

.dark .site-footer {
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
  padding: 1.2rem 0;
  cursor: pointer;
}

.dark .faq-item {
  border-color: #334155;
}

.faq-question {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-item.open .faq-answer {
  max-height: 300px;
  margin-top: 0.8rem;
}

/* ===== HowTo ===== */
.howto-step {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.dark .howto-step {
  background: #1e293b;
}

/* ===== 返回顶部 ===== */
.back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #b5835a;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.back-top:hover {
  background: #a0714a;
}

/* ===== 滚动出现动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 文章卡片 ===== */
.article-card {
  padding: 1.5rem;
  border-radius: 24px;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dark .article-card {
  background: #1e293b;
}

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

.article-card h3 {
  margin-bottom: 0.5rem;
}

.article-card .meta {
  font-size: 0.85rem;
  color: #64748b;
}

.trust-badge {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.trust-badge span {
  background: #e2e8f0;
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
}

.dark .trust-badge span {
  background: #334155;
}

.lazy-svg {
  background: #f1f5f9;
  border-radius: 12px;
}

/* ===== 轮播 ===== */
.carousel {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-item {
  min-width: 100%;
  padding: 1rem;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
  }

  .dark .nav {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: #334155;
  }

  .nav.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 3rem 0 4rem;
  }

  section {
    padding: 3rem 0;
  }

  .section-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }
}