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

:root {
  --bg: #ffffff;
  --bg2: #f5f7fa;
  --text: #1a1a2e;
  --text2: #555555;
  --primary: #1a1a2e;
  --accent: #ffd700;
  --card-bg: #ffffff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --nav-bg: rgba(26, 26, 46, 0.95);
  --footer-bg: #0f0f1a;
  --transition: 0.3s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --text: #e0e0e0;
  --text2: #aaaaaa;
  --primary: #ffd700;
  --card-bg: #1a1a2e;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(26, 26, 46, 0.8);
  --glass-border: rgba(255, 215, 0, 0.2);
  --nav-bg: rgba(15, 15, 26, 0.98);
  --footer-bg: #080812;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--accent);
}

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

ul {
  list-style: none;
}

/* ===== 容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 头部导航 ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo svg {
  height: 40px;
  width: auto;
  transition: transform var(--transition);
}

.logo:hover svg {
  transform: scale(1.02);
}

nav ul {
  display: flex;
  gap: 28px;
}

nav ul li a {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  letter-spacing: 0.5px;
  transition: color var(--transition);
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle,
.menu-toggle,
.search-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background var(--transition), transform var(--transition);
  line-height: 1;
}

.theme-toggle:hover,
.menu-toggle:hover,
.search-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
  font-size: 28px;
}

/* ===== 移动菜单 ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1500;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  animation: fadeIn 0.3s ease;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  transition: color var(--transition), transform var(--transition);
}

.mobile-menu a:hover {
  color: var(--accent);
  transform: scale(1.05);
}

.mobile-menu .close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  transition: transform var(--transition);
}

.mobile-menu .close-menu:hover {
  transform: rotate(90deg);
}

/* ===== 搜索遮罩 ===== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.search-overlay.open {
  display: flex;
}

.search-box {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

.search-box input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #ddd;
  border-radius: 50px;
  font-size: 16px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition);
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-box .close-search {
  margin-top: 16px;
  text-align: right;
}

.search-box .close-search button {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  transition: color var(--transition);
}

.search-box .close-search button:hover {
  color: var(--accent);
}

/* ===== Hero 区域 ===== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  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, 215, 0, 0.06) 0%, transparent 60%);
  animation: heroGlow 12s ease-in-out infinite;
}

@keyframes heroGlow {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(5%, 5%);
  }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 300px;
}

.hero-text h1 {
  font-size: clamp(32px, 5vw, 52px);
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 20px;
  animation: fadeSlideUp 0.8s ease;
}

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

.hero-text p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
  max-width: 600px;
  animation: fadeSlideUp 0.8s ease 0.1s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeSlideUp 0.8s ease 0.2s both;
}

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

.btn-primary {
  background: var(--accent);
  color: #1a1a2e;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.hero-visual {
  flex: 1;
  min-width: 280px;
  display: flex;
  justify-content: center;
  animation: fadeSlideUp 0.8s ease 0.3s both;
}

.hero-visual svg {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
}

.hero-visual svg:hover {
  transform: scale(1.02);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  background: var(--bg2);
  transition: background var(--transition);
}

.breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text2);
}

.breadcrumb ul li+li::before {
  content: '/';
  margin-right: 8px;
  color: #999;
}

.breadcrumb ul li a {
  color: var(--text2);
  transition: color var(--transition);
}

.breadcrumb ul li a:hover {
  color: var(--accent);
}

.breadcrumb ul li:last-child {
  color: var(--primary);
  font-weight: 500;
}

/* ===== 通用区块 ===== */
section {
  padding: 80px 0;
  transition: background var(--transition);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--text);
  margin-bottom: 12px;
  transition: color var(--transition);
}

.section-title p {
  color: var(--text2);
  max-width: 600px;
  margin: 0 auto;
  font-size: 16px;
  transition: color var(--transition);
}

/* ===== 网格系统 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

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

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

/* ===== 卡片 ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  border-color: rgba(255, 215, 0, 0.2);
}

.card-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
  transition: transform var(--transition);
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  transition: color var(--transition);
}

.card p {
  color: var(--text2);
  font-size: 15px;
  transition: color var(--transition);
}

/* ===== 毛玻璃卡片 ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

/* ===== Banner 轮播 ===== */
.banner-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  margin: 40px 0;
}

.banner-slide {
  display: none;
  padding: 60px 40px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  color: #ffffff;
  min-height: 300px;
  align-items: center;
  gap: 40px;
}

.banner-slide.active {
  display: flex;
  animation: fadeSlide 0.6s ease;
}

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

.banner-slide .slide-text {
  flex: 1;
}

.banner-slide .slide-text h3 {
  font-size: 28px;
  margin-bottom: 12px;
}

.banner-slide .slide-text p {
  opacity: 0.85;
}

.banner-slide .slide-img {
  flex: 0 0 200px;
  transition: transform var(--transition);
}

.banner-slide:hover .slide-img {
  transform: scale(1.05);
}

.banner-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.banner-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-dots span.active {
  background: var(--accent);
  transform: scale(1.3);
}

.banner-dots span:hover {
  background: var(--accent);
  transform: scale(1.2);
}

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

[data-theme="dark"] .faq-item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  padding: 8px 0;
  transition: color var(--transition);
  user-select: none;
}

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

.faq-question::after {
  content: '+';
  font-size: 24px;
  transition: transform 0.3s ease;
  color: var(--accent);
  flex-shrink: 0;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 16px;
  color: var(--text2);
}

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

/* ===== HowTo ===== */
.howto-steps {
  counter-reset: step;
}

.howto-step {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: border-color var(--transition);
}

[data-theme="dark"] .howto-step {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.howto-step::before {
  counter-increment: step;
  content: counter(step);
  background: var(--accent);
  color: #1a1a2e;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.howto-step:hover::before {
  transform: scale(1.1);
}

.howto-step h3 {
  margin-bottom: 8px;
}

/* ===== 页脚 ===== */
footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: 16px;
}

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

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.footer-bottom .links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom .links a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

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

.qr-codes {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.qr-codes svg {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
  transition: transform var(--transition);
}

.qr-codes svg:hover {
  transform: scale(1.05);
}

/* ===== 返回顶部 ===== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1a2e;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  line-height: 1;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4);
}

/* ===== 动画工具 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease;
}

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

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

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

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

/* ===== 统计数字 ===== */
.stat-number {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  transition: color var(--transition);
}

/* ===== 文章卡片 ===== */
.article-card {
  padding: 24px;
}

.article-card .date {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 8px;
}

.article-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.article-card p {
  font-size: 14px;
  margin-bottom: 16px;
}

.read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  transition: gap var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more:hover {
  gap: 8px;
}

.tag {
  display: inline-block;
  background: rgba(255, 215, 0, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  margin: 4px;
  transition: background var(--transition);
}

.tag:hover {
  background: rgba(255, 215, 0, 0.25);
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  font-weight: bold;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.avatar:hover {
  transform: scale(1.05);
}

.testimonial {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.testimonial-content {
  flex: 1;
}

.testimonial-content p {
  font-style: italic;
  margin-bottom: 8px;
}

.testimonial-content .name {
  font-weight: 600;
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: center;
}

.partner-logos svg {
  height: 40px;
  width: auto;
  opacity: 0.6;
  transition: opacity var(--transition), transform var(--transition);
}

.partner-logos svg:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  nav ul {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-text h1 {
    font-size: 28px;
  }

  .hero-buttons .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  section {
    padding: 50px 0;
  }

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

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

  .banner-slide {
    flex-direction: column;
    padding: 40px 20px;
    min-height: auto;
  }

  .banner-slide .slide-img {
    flex: 0 0 120px;
  }

  .hero .container {
    gap: 40px;
  }

  .stat-number {
    font-size: 32px;
  }

  #back-to-top {
    width: 44px;
    height: 44px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }

  .search-box {
    padding: 30px 20px;
  }

  .testimonial {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 10px 16px;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 24px;
  }

  .hero-text p {
    font-size: 16px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .banner-slide .slide-text h3 {
    font-size: 22px;
  }

  .howto-step {
    flex-direction: column;
    align-items: flex-start;
  }

  .qr-codes svg {
    width: 64px;
    height: 64px;
  }
}

/* ===== 暗色模式微调 ===== */
[data-theme="dark"] .card {
  border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .search-box input {
  border-color: #444;
  background: #1a1a2e;
  color: #e0e0e0;
}

[data-theme="dark"] .search-box input:focus {
  border-color: var(--accent);
}

[data-theme="dark"] .banner-dots span {
  background: #555;
}

[data-theme="dark"] .banner-dots span.active {
  background: var(--accent);
}

/* ===== 打印样式 ===== */
@media print {
  header,
  .mobile-menu,
  .search-overlay,
  #back-to-top,
  .banner-slider,
  .breadcrumb {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .hero {
    padding: 40px 0;
    background: #f5f5f5 !important;
    color: #000000;
  }

  .hero-text h1,
  .hero-text p {
    color: #000000;
  }

  .card,
  .glass-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .section-title h2 {
    color: #000000;
  }

  .section-title p {
    color: #555555;
  }
}