/* 全局重置与基础 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

/* 暗黑模式 */
body.dark-mode {
  background: #1a1a2e;
  color: #e0e0e0;
}

/* 链接 */
a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  text-decoration: underline;
  color: #ff6b6b;
}

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

/* ===== 导航（吸顶+渐变+毛玻璃） ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  color: #fff;
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Logo */
.logo {
  font-size: 28px;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 导航菜单 */
.nav-menu {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-menu li a {
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  transition: background 0.3s, transform 0.2s;
  font-size: 15px;
  position: relative;
}
.nav-menu li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #ffd700;
  transition: all 0.3s;
  transform: translateX(-50%);
  border-radius: 2px;
}
.nav-menu li a:hover {
  background: rgba(255, 215, 0, 0.2);
  text-decoration: none;
  transform: translateY(-2px);
}
.nav-menu li a:hover::after {
  width: 60%;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid #ffd700;
  color: #ffd700;
  font-size: 24px;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}
.nav-toggle:hover {
  background: rgba(255, 215, 0, 0.1);
}

/* 移动端菜单 */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(15, 52, 96, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100%;
  padding: 15px;
  border-radius: 0 0 16px 16px;
  gap: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.mobile-menu a {
  color: #fff;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: padding-left 0.3s;
}
.mobile-menu a:hover {
  padding-left: 10px;
  background: rgba(255, 215, 0, 0.05);
  border-radius: 4px;
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .mobile-menu.active {
    display: flex;
  }
}

/* ===== 返回顶部按钮（毛玻璃+动画） ===== */
.back-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(255, 215, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #1a1a2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s;
  z-index: 999;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.back-top:hover {
  transform: scale(1.15) translateY(-3px);
  background: #ffd700;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

/* ===== Banner 轮播（渐变+毛玻璃） ===== */
.banner-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  margin: 30px 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  height: 420px;
  background: linear-gradient(135deg, #0f3460, #1a1a2e, #16213e);
}

.banner-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.8s, transform 0.8s;
  padding: 40px;
  text-align: center;
  color: #fff;
  transform: scale(0.95);
}

.banner-slide.active {
  opacity: 1;
  transform: scale(1);
}

.banner-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255,215,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.banner-slide div {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 30px 40px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 700px;
}

.banner-slide h2 {
  font-size: 36px;
  margin-bottom: 15px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.banner-slide p {
  font-size: 18px;
  max-width: 600px;
  line-height: 1.8;
  opacity: 0.95;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.banner-dots span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.banner-dots span.active {
  background: #ffd700;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.banner-dots span:hover {
  background: rgba(255, 215, 0, 0.7);
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .banner-wrapper {
    height: 280px;
  }
  .banner-slide h2 {
    font-size: 24px;
  }
  .banner-slide p {
    font-size: 15px;
  }
  .banner-slide div {
    padding: 20px;
  }
}

/* ===== 通用板块 ===== */
section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 40px;
  position: relative;
  color: #1a1a2e;
}

.dark-mode .section-title {
  color: #ffd700;
}

.section-title:after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #ffd700, #ff6b6b);
  margin: 12px auto 0;
  border-radius: 2px;
}

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

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

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== 卡片（毛玻璃+圆角+悬停） ===== */
.card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s, box-shadow 0.35s, background 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark-mode .card {
  background: rgba(22, 33, 62, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.05);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.dark-mode .card:hover {
  background: rgba(22, 33, 62, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card h3 {
  color: #1a1a2e;
  margin-bottom: 10px;
  font-size: 20px;
  transition: color 0.3s;
}

.dark-mode .card h3 {
  color: #ffd700;
}

.card p {
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

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

.tag {
  display: inline-block;
  background: rgba(238, 242, 255, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #1a1a2e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  margin: 4px;
  transition: all 0.3s;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.dark-mode .tag {
  background: rgba(42, 42, 74, 0.8);
  color: #ccc;
}

.tag:hover {
  background: #ffd700;
  color: #1a1a2e;
  transform: scale(1.05);
}

/* ===== 首页首屏（渐变背景） ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 50%, #16213e 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
  border-radius: 0 0 40px 40px;
  margin-bottom: 40px;
  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.05) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite;
}

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

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.hero .btn {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffb347);
  color: #1a1a2e;
  padding: 14px 40px;
  border-radius: 40px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.hero .btn:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 215, 0, 0.5);
  text-decoration: none;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 30px;
  }
  .hero p {
    font-size: 16px;
  }
}

/* ===== FAQ（手风琴） ===== */
.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 18px 0;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 8px;
  padding-left: 12px;
  padding-right: 12px;
}

.faq-item:hover {
  background: rgba(255, 215, 0, 0.03);
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 17px;
  color: #1a1a2e;
}

.dark-mode .faq-question {
  color: #ffd700;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  color: #555;
  padding-top: 0;
  line-height: 1.8;
}

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

.faq-item.open .faq-answer {
  max-height: 500px;
  padding-top: 8px;
}

.faq-icon {
  transition: transform 0.3s;
  font-size: 20px;
  font-weight: 300;
  color: #ffd700;
}

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

/* ===== 文章卡片 ===== */
.article-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s, box-shadow 0.35s;
}

.dark-mode .article-card {
  background: #16213e;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.dark-mode .article-card:hover {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

.article-body {
  padding: 20px;
}

.article-body h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #1a1a2e;
  transition: color 0.3s;
}

.dark-mode .article-body h3 {
  color: #ffd700;
}

.article-body .meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}

.article-body p {
  color: #555;
  font-size: 14px;
  line-height: 1.7;
}

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

.read-more {
  display: inline-block;
  margin-top: 10px;
  color: #0066cc;
  font-weight: 500;
  transition: all 0.3s;
}

.read-more:hover {
  color: #ff6b6b;
  transform: translateX(4px);
}

/* ===== 数字动画 ===== */
.stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  padding: 40px 0;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.1);
  transition: all 0.3s;
}

.dark-mode .stat-item {
  background: rgba(22, 33, 62, 0.5);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-item .num {
  font-size: 48px;
  font-weight: 700;
  color: #ffd700;
}

.stat-item .label {
  font-size: 16px;
  color: #666;
  margin-top: 5px;
}

.dark-mode .stat-item .label {
  color: #aaa;
}

/* ===== 页脚 ===== */
footer {
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  color: #bbb;
  padding: 50px 0 30px;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}

footer a {
  color: #ffd700;
  transition: color 0.3s;
}

footer a:hover {
  color: #ff6b6b;
  text-decoration: none;
}

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

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

footer h4 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 18px;
  position: relative;
  display: inline-block;
}

footer h4::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: #ffd700;
  margin-top: 6px;
  border-radius: 2px;
}

footer ul {
  list-style: none;
}

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

footer ul li a {
  transition: padding-left 0.3s;
}

footer ul li a:hover {
  padding-left: 6px;
}

footer .copyright {
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 25px;
  margin-top: 30px;
  font-size: 14px;
}

/* ===== 暗黑切换按钮 ===== */
.dark-toggle {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid #1a1a2e;
  border-radius: 30px;
  padding: 6px 16px;
  cursor: pointer;
  z-index: 999;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.dark-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.dark-mode .dark-toggle {
  background: rgba(22, 33, 62, 0.85);
  border-color: #ffd700;
  color: #ffd700;
}

/* ===== 搜索框 ===== */
.search-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-box input {
  padding: 8px 16px;
  border-radius: 30px;
  border: none;
  font-size: 14px;
  width: 200px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  outline: none;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}

.search-box input:focus {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-box button {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  border: none;
  border-radius: 30px;
  padding: 8px 18px;
  color: #1a1a2e;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.search-box button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
  .search-box input {
    width: 120px;
  }
}

/* ===== 滚动动画 ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}

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

/* ===== 图片懒加载占位 ===== */
img[loading="lazy"] {
  background: #e0e0e0;
  min-height: 60px;
  border-radius: 8px;
}

.dark-mode img[loading="lazy"] {
  background: #2a2a4a;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dark-mode ::-webkit-scrollbar-track {
  background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ffb347;
}

/* ===== 选中文本 ===== */
::selection {
  background: rgba(255, 215, 0, 0.4);
  color: #1a1a2e;
}

.dark-mode ::selection {
  background: rgba(255, 215, 0, 0.3);
  color: #fff;
}

/* ===== 其他辅助 ===== */
em {
  font-style: italic;
  color: #666;
}

.dark-mode em {
  color: #aaa;
}

strong {
  color: #1a1a2e;
}

.dark-mode strong {
  color: #ffd700;
}

/* ===== 响应式微调 ===== */
@media (max-width: 480px) {
  .hero .btn {
    padding: 12px 30px;
    font-size: 16px;
  }
  .section-title {
    font-size: 28px;
  }
  .card {
    padding: 20px;
  }
}