/* ===== 全局重置 & 变量 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand: #f0c27f;
  --brand-dark: #d9a85c;
  --brand-light: #f7e5c2;
  --glass: rgba(255, 255, 245, 0.08);
  --glass-border: rgba(255, 215, 150, 0.2);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 28px 48px -12px rgba(0, 0, 0, 0.7);
  --bg: #0b0e1a;
  --text: #e4e8f0;
  --text-muted: #b0b8d0;
  --text-dim: #8890aa;
  --nav-bg: rgba(11, 14, 26, 0.78);
  --footer-bg: #070a16;
  --card-bg: rgba(255, 255, 245, 0.08);
  --input-bg: rgba(255, 255, 245, 0.08);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light {
  --bg: #f8f9fe;
  --text: #1a1f36;
  --text-muted: #3a3f5a;
  --text-dim: #4a4f6a;
  --glass: rgba(10, 20, 40, 0.04);
  --glass-border: rgba(200, 170, 120, 0.3);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.12);
  --nav-bg: rgba(248, 249, 254, 0.8);
  --footer-bg: #eef0f8;
  --card-bg: rgba(10, 20, 40, 0.04);
  --input-bg: rgba(10, 20, 40, 0.04);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ===== 毛玻璃卡片 ===== */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.4s ease, background 0.3s ease;
  will-change: transform;
}

.glass-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-hover);
  background: rgba(255, 255, 245, 0.12);
}

body.light .glass-card:hover {
  background: rgba(10, 20, 40, 0.06);
}

.card-padding {
  padding: 28px;
}

/* ===== 渐变Banner文字 ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 头部导航 ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(240, 194, 127, 0.15);
  transition: background var(--transition), border-color var(--transition);
}

body.light header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  user-select: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
  border-radius: 2px;
}

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

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

.dark-toggle {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 6px 16px;
  border-radius: 40px;
  cursor: pointer;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.dark-toggle:hover {
  background: var(--glass);
  border-color: var(--brand);
}

/* ===== 移动端菜单 ===== */
.menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.menu-icon span {
  width: 26px;
  height: 2.5px;
  background: var(--brand);
  border-radius: 4px;
  transition: all 0.3s ease;
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(11, 14, 26, 0.96);
    padding: 24px 20px;
    gap: 18px;
    margin-top: 8px;
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
  }

  body.light .nav-links {
    background: rgba(255, 255, 255, 0.96);
  }

  .nav-links.open {
    display: flex;
    animation: slideDown 0.3s ease;
  }

  .menu-icon {
    display: flex;
  }

  .navbar {
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 1.05rem;
  }

  .dark-toggle {
    align-self: flex-start;
  }
}

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

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  padding: 12px 0 6px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--brand);
  text-decoration: none;
  transition: opacity 0.2s;
}

.breadcrumb a:hover {
  opacity: 0.8;
}

/* ===== Hero Banner ===== */
.hero {
  padding: 60px 0 80px;
  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% 40%, rgba(240, 194, 127, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(240, 194, 127, 0.05) 0%, transparent 50%);
  animation: heroGlow 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(2%, -2%) scale(1.1);
  }
}

.hero h1 {
  font-size: clamp(2.4rem, 8vw, 4.8rem);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--brand-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease;
}

.hero p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 24px auto 40px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease 0.1s both;
}

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

.btn-group {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.btn {
  background: linear-gradient(135deg, var(--brand-light), var(--brand), var(--brand-dark));
  border: none;
  padding: 14px 38px;
  border-radius: 60px;
  font-weight: 600;
  color: #0b0e1a;
  font-size: 1.1rem;
  box-shadow: 0 8px 22px rgba(240, 194, 127, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(240, 194, 127, 0.5);
}

.btn:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(240, 194, 127, 0.12);
  color: var(--brand-dark);
  border-color: var(--brand-dark);
}

/* ===== 通用章节 ===== */
section {
  padding: 70px 0;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), transparent);
  border-radius: 4px;
}

.section-sub {
  max-width: 700px;
  margin-bottom: 48px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

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

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

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

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

/* ===== 统计数字 ===== */
.stat-number {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
  transition: color 0.3s;
}

/* ===== 图片占位SVG ===== */
.img-svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  background: rgba(26, 31, 54, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background 0.3s;
}

body.light .img-svg {
  background: rgba(228, 232, 242, 0.6);
}

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid rgba(240, 194, 127, 0.15);
  padding: 18px 0;
  cursor: pointer;
  transition: border-color 0.3s;
}

.faq-item:hover {
  border-color: rgba(240, 194, 127, 0.3);
}

.faq-q {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  gap: 12px;
}

.faq-q span {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
  color: var(--brand);
}

.faq-item.open .faq-q span {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0.8;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-item.open .faq-a {
  max-height: 200px;
  margin-top: 12px;
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  max-width: 400px;
  background: var(--glass);
  border-radius: 60px;
  border: 1px solid var(--glass-border);
  padding: 4px 4px 4px 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(240, 194, 127, 0.15);
}

.search-box input {
  background: transparent;
  border: none;
  padding: 12px 0;
  flex: 1;
  color: var(--text);
  outline: none;
  font-size: 0.95rem;
  min-width: 0;
}

.search-box input::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

.search-box button {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  border: none;
  border-radius: 60px;
  padding: 10px 24px;
  font-weight: 600;
  color: #0b0e1a;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.search-box button:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(240, 194, 127, 0.3);
}

/* ===== 滚动动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== 回到顶部 ===== */
#backTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #0b0e1a;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 200;
  transition: all 0.3s ease;
  display: none;
  align-items: center;
  justify-content: center;
}

#backTop:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 28px rgba(240, 194, 127, 0.4);
}

#backTop:active {
  transform: scale(0.95);
}

/* ===== Footer ===== */
footer {
  background: var(--footer-bg);
  padding: 40px 0;
  border-top: 1px solid rgba(240, 194, 127, 0.08);
  transition: background 0.3s, border-color 0.3s;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.copyright {
  text-align: center;
  margin-top: 32px;
  opacity: 0.7;
  font-size: 0.85rem;
  color: var(--text-dim);
}

footer a {
  color: var(--brand);
  text-decoration: none;
  transition: opacity 0.2s;
}

footer a:hover {
  opacity: 0.8;
}

/* ===== 响应式微调 ===== */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0 60px;
  }

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

  .hero p {
    font-size: 1rem;
    margin: 16px auto 30px;
  }

  section {
    padding: 50px 0;
  }

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

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

  .btn {
    padding: 12px 28px;
    font-size: 1rem;
  }

  .card-padding {
    padding: 20px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    gap: 20px;
  }

  .footer-grid {
    gap: 20px;
  }

  #backTop {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }

  .search-box {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-links {
    padding: 16px;
    gap: 14px;
  }

  .btn-group {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* ===== 暗色模式额外优化 ===== */
body.light .stat-number {
  color: var(--brand-dark);
}

body.light .faq-item {
  border-color: rgba(0, 0, 0, 0.08);
}

body.light .faq-item:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--brand-dark);
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

/* ===== 选中样式 ===== */
::selection {
  background: rgba(240, 194, 127, 0.3);
  color: var(--text);
}

/* ===== 焦点样式 ===== */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 打印样式 ===== */
@media print {
  header,
  #backTop,
  .search-box,
  .dark-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .glass-card {
    background: none;
    backdrop-filter: none;
    border: 1px solid #ccc;
    box-shadow: none;
  }
}