/* ===================== 全局基础样式 ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Microsoft Yahei", "PingFang SC", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #fff;
  overflow-x: hidden;
  background: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 50%, #202020 100%);
  /* 避免内容被固定导航栏遮挡 */
  padding-top: 80px;
}

/* 容器样式 - 居中+适配宽度 */
.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* 粒子背景容器 */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none; /* 避免遮挡点击事件 */
}

/* ===================== 导航栏样式 ===================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
  height: 80px;
  display: flex;
  align-items: center;
  z-index: 999;
  transition: all 0.3s ease;
}

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

/* 商城logo样式 */
.logo {
  font-size: 22px;
  font-weight: 700;
  color: #ffd700; /* 金色logo */
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  letter-spacing: 1px;
}

/* 导航链接样式 */
.nav-links {
  display: flex;
  list-style: none;
  gap: 24px; /* 链接之间的间距 */
}

.nav-links a {
  text-decoration: none;
  color: #f8f8f8;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffd700;
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffd700;
}

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

/* ===================== 首页横幅样式 ===================== */
.hero {
  height: calc(100vh - 80px); /* 减去导航栏高度 */
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero .container {
  max-width: 800px;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.2);
  padding: 3rem 2rem;
}

.hero h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 24px;
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero h1 span {
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.hero p {
  font-size: 18px;
  color: #ccc;
  margin-bottom: 32px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero p span {
  color: #ffd700;
}

/* 双按钮容器样式 */
.hero-buttons {
  display: flex;
  gap: 16px; /* 按钮之间的间距 */
  justify-content: center;
  flex-wrap: wrap; /* 移动端按钮换行 */
}

/* 通用按钮样式 */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 140px;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  border: none;
}

/* 装备按钮样式 */
.btn-equip {
  background: linear-gradient(45deg, #ffd700, #ffb800);
  color: #222;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.btn-equip:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

/* 宠物按钮样式 */
.btn-pet {
  background: linear-gradient(45deg, #4169e1, #1e90ff);
  color: #fff;
  box-shadow: 0 5px 15px rgba(65, 105, 225, 0.4);
}

.btn-pet:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(65, 105, 225, 0.6);
}

/* ===================== 商品列表区域样式 ===================== */
.products {
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

.products .container {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.2);
  padding: 40px 20px;
}

.products h2 {
  font-size: 32px;
  font-weight: 600;
  text-align: left;
  margin-bottom: 40px;
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

/* 商品网格布局 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  grid-auto-rows: 1fr;
}

/* 无数据提示 */
.no-data {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: #ccc;
  font-size: 1.2rem;
}

/* 商品卡片样式 */
.product-card {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 215, 0, 0.5);
}

.product-card:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* 商品图片样式 */
.product-image {
  width: 100%;
  height: 220px;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.product-image img:hover {
  opacity: 0.95;
}

/* 图片占位提示 */
.product-image::after {
  content: "暂无图片";
  position: absolute;
  color: #ccc;
  font-size: 1rem;
}

/* 商品信息区域 */
.product-info {
  padding: 20px;
}

.product-name {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 8px;
  color: #ffd700;
  /* 文字溢出省略 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-desc {
  font-size: 14px;
  color: #ccc;
  margin-bottom: 12px;
  /* 多行文本溢出省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 20px;
  font-weight: 600;
  color: #ff6b6b;
  text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* ===================== 商品详情页样式 ===================== */
.product-detail {
  padding: 60px 0;
  position: relative;
  z-index: 2;
}

.product-detail .container {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.2);
  padding: 40px 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: #ffd700;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #ffb800;
}

.detail-wrapper {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.detail-image {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
}

.detail-image img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.detail-info {
  flex: 2;
  min-width: 300px;
}

.detail-title {
  font-size: 2.2rem;
  color: #ffd700;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.detail-category {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background-color: rgba(255, 215, 0, 0.2);
  border-radius: 4px;
  color: #ffd700;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.detail-desc {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.detail-price {
  font-size: 2.5rem;
  color: #ff6b6b;
  font-weight: 700;
  margin-bottom: 2rem;
  text-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
}

.buy-btn {
  padding: 1rem 2.5rem;
  background: linear-gradient(45deg, #ffd700, #ffb800);
  color: #222;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.buy-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

/* ===================== 页脚样式 ===================== */
.footer {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  color: #ccc;
  text-align: center;
  padding: 24px 0;
  margin-top: 40px;
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

/* 页脚内容一行显示 */
.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px; /* 版权和备案号间距 */
  flex-wrap: wrap; /* 移动端自动换行 */
  font-size: 14px;
  opacity: 0.8;
}

/* 核心修复：页脚备案链接样式 */
.beian-link,
.beian-link:link,
.beian-link:visited {
  color: #1e90ff !important;
  text-decoration: none;
}

.beian-link:hover,
.beian-link:active {
  color: #ffd700 !important;
  text-decoration: underline;
}

/* ===================== 回到顶部按钮 ===================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ffd700, #ffb800);
  color: #222;
  border: none;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  z-index: 998;
  display: none;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* ===================== 响应式适配 ===================== */
@media (max-width: 768px) {
  /* 导航栏适配 */
  .nav-links {
    gap: 16px;
  }
  .logo {
    font-size: 20px;
  }
  .nav-links a {
    font-size: 14px;
  }

  /* 首页适配 */
  .hero h1 {
    font-size: 28px;
  }
  .hero .container {
    padding: 2rem 1.5rem;
  }

  /* 商品列表适配 */
  .products {
    padding: 40px 0;
  }
  .products .container {
    padding: 30px 15px;
  }
  .products h2 {
    font-size: 28px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  /* 详情页适配 */
  .detail-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
  .detail-title {
    font-size: 1.8rem;
  }
  .detail-price {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  /* 导航栏适配 */
  .navbar {
    height: 70px;
  }
  body {
    padding-top: 70px; /* 同步导航栏高度 */
  }

  /* 首页适配 */
  .hero {
    height: calc(100vh - 70px);
    min-height: 400px;
  }
  .hero h1 {
    font-size: 24px;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 90%;
  }

  /* 商品列表适配 */
  .product-grid {
    grid-template-columns: 1fr; /* 移动端单列显示 */
  }

  /* 页脚适配 */
  .footer-content {
    gap: 10px;
    font-size: 12px;
    flex-direction: column;
  }

  /* 回到顶部按钮适配 */
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
  }
}/* 新增备案组样式 */
.beian-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px; /* 图标和链接之间的间距 */
  flex-wrap: wrap;
}

.beian-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.beian-link {
  color: var(--primary-light-blue);
  transition: color 0.3s;
  white-space: nowrap; /* 防止备案号换行 */
}

.beian-link:hover {
  color: var(--primary-gold);
}