/* ===== 分类导航 ===== */
.category-nav {
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 8px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-tab:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  color: #667eea;
}

.nav-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.35);
}

.tab-icon {
  font-size: 26px;
  line-height: 1;
}

.tab-label {
  white-space: nowrap;
}

/* ===== 主内容区域 ===== */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== 列表容器 ===== */
#items_list {
  max-width: 1200px;
  margin: 0 auto;
}

.post-content div.mview--list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0;
  margin: 0;
}

/* ===== 卡片 ===== */
.post-content div.mview--item {
  position: relative;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.post-content div.mview--item:hover {
  transform: translateY(-2px);
}

.post-content div.mview--item > a {
  display: flex;
  flex-direction: row;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
  height: 100%;
  padding: 12px;
  gap: 12px;
}

.post-content div.mview--item > a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== 封面区域 ===== */
.mview--cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  flex-shrink: 0;
  width: 100px;
  border-radius: 4px;
}

.mview--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  border-radius: 4px;
}

.post-content div.mview--item:hover .mview--cover img {
  transform: scale(1.04);
}

/* ===== 信息区域 ===== */
.mview--info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  gap: 6px;
  padding-top: 4px;
}

.mview--header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.mview--title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.mview--date {
  font-size: 13px;
  color: #c17f59;
  white-space: nowrap;
  flex-shrink: 0;
}

.mview--creators {
  font-size: 14px;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.mview--meta {
  font-size: 13px;
  color: #888;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* 评分展示 */
.movie-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.rating-star-bg {
  display: inline-block;
  width: 75px;
  height: 15px;
  background-repeat: no-repeat;
  background-image: url("https://www.haohaitao.cn/wp-content/themes/begin/template/db_api/include/db_star.png");
  background-position: 0 0;
}

.rating-score {
  font-size: 14px;
  font-weight: 600;
  color: #c17f59;
}

.rating-count {
  font-size: 13px;
  color: #888;
}

/* ===== 加载更多按钮 ===== */
#items_more {
  margin: 40px auto 20px;
  padding: 14px 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  display: block;
  text-align: center;
  max-width: 280px;
}

#items_more:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* 加载中动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== 返回顶部按钮 ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* ===== 页脚 ===== */
.site-footer-db {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 40px;
}

/* ===== 响应式设计 ===== */
@media screen and (max-width: 768px) {
  .nav-tab {
    padding: 14px 4px;
    font-size: 12px;
  }

  .tab-icon {
    font-size: 21px;
  }

  .post-content div.mview--list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .mview--cover {
    width: 90px;
  }

  .mview--title {
    font-size: 15px;
  }

  .mview--date {
    font-size: 12px;
  }

  .mview--creators {
    font-size: 13px;
  }

  .mview--meta {
    font-size: 12px;
  }

  .rating-score {
    font-size: 13px;
  }

  .rating-count {
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .category-nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .nav-tab {
    padding: 12px 4px;
    font-size: 11px;
  }

  .tab-icon {
    font-size: 19px;
  }

  .post-content div.mview--item > a {
    padding: 10px;
    gap: 10px;
  }

  .mview--cover {
    width: 80px;
  }

  .mview--info {
    gap: 4px;
  }

  .mview--title {
    font-size: 14px;
  }

  .mview--date {
    font-size: 11px;
  }

  .mview--creators {
    font-size: 12px;
  }

  .mview--meta {
    font-size: 11px;
  }

  .rating-score {
    font-size: 12px;
  }

  .rating-count {
    font-size: 11px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 16px;
    right: 16px;
  }
}
