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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #f4f4f4;
  min-width: 1200px;
}

/* 清除默认样式 */
ul, li {
  list-style: none;
}

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

/* 清除浮动 */
.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

/* 通用布局容器 */
.container {
  width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 全局样式优化 */
:root {
  --primary-color: #4a90e2;
  --secondary-color: #f8f9fa;
  --accent-color: #ff6b6b;
  --text-color: #2c3e50;
  --border-radius: 12px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 固定的导航 header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px; /* 降低高度 */
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 0 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.logo img {
  height: 35px;
}

/* 主导航样式 */
header nav ul {
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

header nav ul li {
  position: relative;
}

header nav ul li a {
  font-size: 15px;
  color: #333;
  text-decoration: none;
  padding: 0;
  position: relative;
}

/* 移除之前的小圆点样式 */
header nav ul li a::before {
  display: none;
}

/* 悬停效果 */
header nav ul li a:hover {
  color: #ff4400;
}

/* 登录注册按钮 */
.auth-buttons {
  display: flex;
  gap: 20px;
}

.auth-buttons a {
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.3s;
}

.auth-buttons a:first-child {
  color: #666;
}

.auth-buttons a:last-child {
  background: #ff4400;
  color: #fff;
}

.auth-buttons a:first-child:hover {
  color: #ff4400;
}

.auth-buttons a:last-child:hover {
  background: #f30;
}

/* 商品分类导航 */
.shop-nav {
  flex: 1;
}

.shop-nav ul {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-nav ul li a {
  display: block;
  padding: 8px 24px;
  text-decoration: none;
  color: #666;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
  border-radius: 20px;
}

/* 悬停和激活状态 */
.shop-nav ul li a:hover {
  color: #1890ff;
  background: rgba(24,144,255,0.1);
}

.shop-nav ul li.active a {
  color: #fff;
  background: #1890ff;
  box-shadow: 0 2px 6px rgba(24,144,255,0.35);
}

/* VIP下载按钮样式 */
.vip-download {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 24px;
  margin-left: 20px;
  border-left: 1px solid #f0f0f0;
}

.vip-download .icon {
  width: 20px;
  height: 20px;
  color: #1890ff;
}

.vip-download .text {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.vip-download .btn {
  padding: 6px 16px;
  background: #1890ff;
  color: #fff;
  font-size: 13px;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s;
}

.vip-download .btn:hover {
  background: #40a9ff;
  box-shadow: 0 2px 6px rgba(24,144,255,0.35);
  transform: translateY(-1px);
}

/* 商品展示区域 */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.category {
  display: none;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.category.active {
  display: grid;
}

/* 商品卡片样式 */
.item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-link {
  text-decoration: none;
  color: inherit;
}

.item img {
  width: 100%;
  aspect-ratio: 1;
  /*object-fit: cover;*/
}

.info {
  padding: 10px;
}

.title {
  margin: 0;
  font-size: 14px;
  color: #333;
}

.price-box {
  margin: 8px 0;
}

.price {
  color: #f40;
  font-size: 16px;
}

.vip-price {
  color: #52c41a;
  font-size: 12px;
}

.stats {
  display: flex;
  justify-content: space-between;
  color: #999;
  font-size: 12px;
}

/* 商品分类标签 */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.category-tag {
  padding: 4px 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 15px;
  font-size: 12px;
  color: #666;
  cursor: pointer;
}

.category-tag:hover,
.category-tag.active {
  color: #ff4400;
  border-color: #ff4400;
}

/* 销量和评价信息 */
.item-stats {
  margin-top: 5px;
  font-size: 12px;
  color: #999;
}

.item-stats span {
  margin-right: 10px;
}

/* 响应式布局 */
@media (max-width: 1200px) {
  .category {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .category {
    grid-width: 100%;
  }
  
  .shop-nav ul {
    flex-wrap: wrap;
  }
  
  .shop-nav ul li a {
    padding: 14px 15px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .category {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .item img {
    height: 140px;
  }
}

/* 商城标题和分类导航 */
.shop-header {
  margin: 20px auto;
  max-width: 1200px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 内容容器 */
.shop-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .shop-header-content {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }
  
  .shop-nav ul {
    flex-wrap: wrap;
  }
  
  .vip-download {
    border-left: none;
    border-top: 1px solid #f0f0f0;
    margin-left: 0;
    padding: 15px 0 0;
    width: 100%;
    justify-content: center;
  }
}

/* 音频列表样式 */
.audio-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 每行3个 */
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.audio-list li {
  position: relative;
  background: white;
  padding: 15px 20px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden; /* 确保进度条不会溢出 */
}

.audio-list li:hover {
  background: #f5f5f5;
}

.audio-list li.active {
  background: #e6f7ff;
  border-left: 3px solid #1890ff;
}

/* 音频标题样式 */
.audio-list li .title {
  flex: 1;
  color: #333;
  font-size: 15px;
  margin-right: 20px; /* 为下载按钮预留空间 */
}

/* 下载按钮样式 */
.audio-list li .download-btn {
  opacity: 0;
  visibility: hidden;
  background: #1890ff;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-left: auto; /* 将按钮推到右侧 */
}

/* 悬停时显示下载按钮 */
.audio-list li:hover .download-btn {
  opacity: 1;
  visibility: visible;
}

/* 下载按钮悬停效果 */
.audio-list li .download-btn:hover {
  background: #40a9ff;
}

/* 播放状态图标容器 */
.play-status {
  width: 24px;
  height: 24px;
  margin-right: 15px;
  cursor: pointer;
}

/* 播放/暂停图标样式 */
.play-status svg {
  width: 100%;
  height: 100%;
}

.play-icon, .pause-icon {
  transition: all 0.2s;
}

/* 激活状态样式 */
.audio-list li.active {
  background: #e6f7ff;
  border-left: 3px solid #1890ff;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .audio-list {
    grid-template-columns: repeat(2, 1fr); /* 平板上每行2个 */
  }
}

@media (max-width: 480px) {
  .audio-list {
    grid-template-columns: 1fr; /* 手机上每行1个 */
  }
}

/* Footer 样式优化 */
footer {
  background: #fff;
  padding: 30px 0;
  margin-top: 60px;
  border-top: 1px solid #eee;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-logo {
  height: 40px;
}

.footer-logo img {
  height: 100%;
  object-fit: contain;
}

.footer-info {
  text-align: center;
}

.footer-info p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

.footer-info .icp {
  color: #999;
  font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  footer {
    padding: 20px 0;
    margin-top: 40px;
  }

  .footer-logo {
    height: 30px;
  }
}

/* Banner 样式 */
.banner {
  width: 100%;
  height: 300px;
  margin: 0px 0;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 小说和视频部分的通用样式 */
#novels .content,
#videos .content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

#novels .item,
#videos .item {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#novels .item:hover,
#videos .item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#novels .item img,
#videos .item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

#novels .info,
#videos .info {
  padding: 15px;
}

#novels .info p,
#videos .info p {
  margin: 5px 0;
}

/* 小说特有样式 */
#novels .info p:first-child {
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 8px;
  font-weight: 500;
}

#novels .info p:last-child {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 42px;
}

/* 视频特有样式 */
#videos .info p {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  color: var(--text-color);
}

/* 分类标题样式 */
section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 40px 0;
  position: relative;
  padding-bottom: 15px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

/* 响应式设计补充 */
@media (max-width: 768px) {
  #novels .content,
  #videos .content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #novels .content,
  #videos .content {
    grid-template-columns: 1fr;
  }
  
  section h2 {
    font-size: 1.6rem;
    margin: 30px 0;
  }
}

/* 音频进度条样式 */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #1890ff;
  transition: width 0.1s linear;
  border-radius: 0 1.5px 1.5px 0;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}
