/* 顶部导航栏样式 */
.header {
  background-color: #000000;
}

.search-container {
  background-color: #000000;
  padding: 5px 0;
  border-bottom: 1px solid #1a2733;
}

.header-top-bar {
  display: flex;
  align-items: center;
}

/* LOGO样式 */
.header-logo {
  width: 45px;
  height: 45px;
}

.header-logo a {
  display: block;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* 搜索框样式 */
.header-search-bar {
  flex: 1;
  margin: 0;
  padding: 0;
}

.search-form {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.search-input {
  width: 100%;
  height: 36px;
  background-color: #1a2733;
  border: 1px solid #2a3744;
  border-radius: 5px;
  padding: 0 40px 0 15px;
  font-size: 14px;
  color: #fff;
  margin: 0;
}

.search-input::placeholder {
  color: #6c7680;
}

.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 36px;
  width: 36px;
  background: transparent;
  border: none;
  color: #6c7680;
  font-size: 16px;
  cursor: pointer;
}

/* 右侧图标样式 */
.header-icons {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.icon-item {
  margin: 0;
  padding: 0;
}

.icon-item a {
  display: block;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.3s;
}

.register-icon a {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.register-icon a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-icon a {
  background-color: #4e92df;
}

.user-icon a:hover {
  background-color: #3a7cc9;
}

/* 分类导航栏样式 */
.category-nav {
  background-color: #000000;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-nav-inner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  text-align: center;
}

.category-nav-inner a {
  display: inline-block;
  color: #fff;
  font-size: 15px;
  padding: 8px 0;
  text-decoration: none;
  position: relative;
}

.category-nav-inner a.active {
  font-weight: bold;
  color: #4e92df !important; /* 高亮蓝色 */
  position: relative;
}

/* 确保横线在所有场景下显示 */
.category-nav-inner a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background-color: #4e92df;
  box-shadow: 0 0 5px rgba(78, 146, 223, 0.7);
  transition: all 0.3s ease;
  display: block !important; /* 确保显示 */
  z-index: 10; /* 确保在顶层 */
}

/* 添加悬停效果 */
.category-nav-inner a:hover {
  color: #4e92df;
}

.category-nav-inner a:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px; /* 比激活状态下短一些 */
  height: 2px;
  background-color: #4e92df;
  opacity: 0.7;
}

/* 分类页面导航栏与内容之间保持适当间距 */
.category-nav + .container {
  margin-top: 2px !important;
}

/* 减少头部和内容之间的空白 */
.head-placeholder-home {
  margin: 0;
  padding: 0;
  height: 0px; /* 从1px改为0px，完全消除间隔 */
  display: none; /* 添加display:none确保元素不占用空间 */
}

.head-placeholder-small {
  margin: 0;
  padding: 0;
  height: 5px;
}

/* 调整banner的间距 - 使其上下间距均等 */
.banner {
  margin-top: 15px;
  margin-bottom: 0;
  padding: 0;
}

.banner-box {
  margin: 0;
  padding: 0;
}

.no-gap {
  margin: 0 !important;
  padding: 0 !important;
}

.no-top-gap {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 减少内容区域间距 */
.container {
  padding-top: 5px;
}

.gap {
  margin-bottom: 15px;
}

/* 首页布局调整 */
#index-box {
  margin-top: 15px;
}

/* 修复内容与导航间的空白 */
.category-nav + div {
  margin-top: 0;
  padding-top: 0;
}

/* 底部移动导航栏样式 */
.mobile-footer-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 55px;
  background-color: #0a141f;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  border-top: none !important;
  border: none !important;
}

.mobile-footer-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6c7680;
  text-decoration: none;
  padding: 5px 0;
  width: 20%;
}

.mobile-footer-nav .nav-item.active {
  color: #4e92df;
}

.mobile-footer-nav .nav-item i {
  font-size: 20px;
  margin-bottom: 3px;
}

.mobile-footer-nav .nav-item span {
  font-size: 12px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .header-search-bar {
    max-width: none !important;
    width: 100% !important;
    flex: 1 !important;
    padding: 0 5px !important;
  }
  
  .header-top-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .header-logo {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .category-nav-inner a {
    font-size: 14px;
  }
  
  .bottom {
    padding-bottom: 55px; /* 为底部导航腾出空间 */
  }
}

@media (max-width: 480px) {
  .header-search-bar {
    max-width: none !important;
    width: 100% !important;
  }
  
  .search-form {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .search-input {
    padding: 0 35px 0 10px !important;
  }
  
  .category-nav-inner a {
    font-size: 20px;
    padding: 5px 0;
  }
}

/* 底部安全间距 - 防止内容被底部导航栏遮挡 */
.bottom-safe-area {
  height: 10px;
  width: 100%;
  clear: both;
  margin-bottom: 55px;
}

/* 调整轮播区域与分类导航栏的间距 - 完全移除间距 */
.category-nav + .banner,
.header + .banner,
body .banner {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 确保完全没有间距 */
.container-fluid.p-0 {
  margin-top: 0 !important;
}

/* 隐藏搜索占位符，消除可能导致的间距 */
.search-placeholder {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 页面间距调整 */
.no-spacing .head-placeholder-home,
.no-spacing .head-placeholder-small {
  display: none;
}

.no-spacing .hot-category-nav {
  margin-top: 0;
}

/* 热点页面顶部分类导航栏 */
.hot-category-nav {
  background-color: #0a141f;
  padding: 0 0 4px 0; /* 减少底部内边距 */
  margin-bottom: 10px; /* 减少底部外边距 */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hot-category-nav-inner {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  padding-left: 0; /* 让热门紧贴左侧 */
}

.hot-category-nav-inner a {
  display: inline-block;
  color: #fff;
  font-size: 20px; /* 保持字体大小不变 */
  padding: 3px 10px 3px 0; /* 减少上下内边距 */
  text-decoration: none;
  position: relative;
  margin-right: 5px; /* 热门和人气榜间距为5px */
}

.hot-category-nav-inner a:first-child {
  padding-left: 0; /* 确保第一个元素（热门）左侧间距为0 */
}

.hot-category-nav-inner a.active {
  font-weight: bold;
  color: #4e92df;
  text-decoration: none;
}

.hot-category-nav-inner a.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #4e92df;
}

/* 热点页面文章内容样式 */
.hot-article {
  background-color: #0a141f;
  border-radius: 4px;
  margin-bottom: 15px;
  padding: 15px;
  color: #fff;
}

.hot-article-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.hot-article-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
}

.hot-article-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-article-info {
  flex: 1;
}

.hot-article-author {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 2px;
}

.hot-article-time {
  font-size: 14px;
  color: #9aa2ab;
}

.hot-article-title {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 15px;
}

.hot-article-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.hot-article-image {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
  border-radius: 4px;
}

.hot-article-image img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-article-image-count {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 24px;
  padding: 8px 16px;
  border-radius: 4px;
}

.hot-article-stats {
  display: flex;
  align-items: center;
  color: #9aa2ab;
}

.hot-article-stat {
  display: flex;
  align-items: center;
  margin-right: 20px;
  font-size: 14px;
}

.hot-article-stat i {
  margin-right: 5px;
  font-size: 18px;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .hot-article-images {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  
  .hot-article-title {
    font-size: 18px;
  }
}

/* 文章列表样式 */
.article-list {
  padding: 0 15px;
}

.article-item {
  background-color: #0a141f;
  margin-bottom: 15px;
  border-radius: 4px;
  overflow: hidden;
}

.article-item a {
  display: flex;
  color: #fff;
  text-decoration: none;
  padding: 15px;
}

.article-pic {
  width: 120px;
  height: 80px;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 15px;
}

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

.article-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.article-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-stats {
  display: flex;
  color: #9aa2ab;
  font-size: 14px;
}

.article-stats span {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.article-stats i {
  margin-right: 5px;
}

/* 分页样式 */
.page {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  margin: 15px 0;
}

.page a {
  display: inline-block;
  padding: 8px 15px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
}

.page .num {
  display: inline-block;
  padding: 8px 15px;
  background-color: #ff3e7f;
  color: #fff;
  border-radius: 4px;
}

/* 文章动态流样式 */
.article-feed {
  padding: 0;
  background-color: #0a141f;
}

.article-card {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
}

.article-user {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
  background-color: #1a2733;
}

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

.user-info {
  flex: 1;
}

.user-name {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 2px;
}

.post-time {
  font-size: 14px;
  color: #9aa2ab;
}

.article-title {
  font-size: 16px;
  color: #fff;
  margin-bottom: 15px;
  line-height: 1.4;
}

.article-images {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.article-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.article-image::before {
  content: "";
  display: block;
  padding-top: 100%; /* 1:1 aspect ratio */
}

.article-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-more {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.article-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  align-items: center;
  color: #9aa2ab;
}

.stat-item i {
  margin-right: 5px;
  font-size: 18px;
}

.stat-item.comment {
  flex: 1;
  justify-content: center;
}

/* 分类导航栏 */
.category-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 15px;
  margin-bottom: 0;
}

.category-tabs a {
  font-size: 16px;
  color: #9aa2ab;
  padding: 5px 15px 5px 0;
  position: relative;
  text-decoration: none;
}

.category-tabs a.active {
  color: #fff;
  font-weight: 500;
}

.category-tabs a.active::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: #4e92df;
}

/* 动态流样式 */
.dynamics-container {
  background-color: #0a141f;
  color: #fff;
}

.top-tabs {
  display: flex;
  padding: 10px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-tabs a {
  color: #fff;
  font-size: 18px;
  margin-right: 25px;
  text-decoration: none;
  position: relative;
  opacity: 0.7;
}

.top-tabs a.active {
  opacity: 1;
  font-weight: 500;
}

.top-tabs a.active:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #4e92df;
}

/* 动态卡片 */
.dynamic-post {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
}

.post-header {
  display: flex;
  align-items: center;
  padding: 15px 15px 10px;
}

.user-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 10px;
}

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

.user-info {
  flex: 1;
}

.username {
  font-size: 16px;
  color: #fff;
  margin-bottom: 4px;
}

.post-time {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.follow-btn {
  background-color: transparent;
  border: 1px solid #4e92df;
  border-radius: 4px;
  color: #4e92df;
  padding: 6px 15px;
  font-size: 14px;
}

.post-title {
  padding: 0 15px 15px;
  font-size: 18px;
  color: #fff;
}

.post-images {
  display: flex;
  gap: 3px;
  margin-bottom: 15px;
}

.post-image {
  flex: 1;
  position: relative;
}

.post-image img {
  width: 100%;
  display: block;
}

.more-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.post-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.stat-item {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
}

.stat-item i {
  margin-right: 8px;
  font-size: 20px;
}

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  margin-bottom: 15px;
}

.video-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-duration {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 12px;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: #0a141f;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: none !important;
  border: none !important;
  z-index: 999;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9aa2ab;
  text-decoration: none;
  font-size: 12px;
}

.bottom-nav .nav-item.active {
  color: #4e92df;
}

.bottom-nav .nav-item i {
  font-size: 18px;
  margin-bottom: 3px;
}

/* 热门页面样式 */
.content-page {
  background-color: #0a141f;
  padding-bottom: 60px; /* 为底部导航预留空间 */
  max-width: 650px;
  margin: 0 auto;
}

.content-header {
  padding: 15px;
  text-align: center;
}

.content-header h1 {
  color: #fff;
  font-size: 22px;
  margin: 0;
  font-weight: normal;
}

/* 内容区块 */
.content-block {
  background-color: #1a2733;
  border-radius: 8px;
  margin: 15px;
  padding: 15px 0;
  overflow: hidden;
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px 10px;
}

.block-title {
  font-size: 18px;
  color: #fff;
  font-weight: 500;
}

.more-link {
  color: #9aa2ab;
  font-size: 14px;
  text-decoration: none;
}

/* 横向滚动内容 */
.scroll-container {
  overflow-x: auto;
  white-space: nowrap;
  padding: 0 15px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.scroll-items {
  display: inline-flex;
  gap: 10px;
}

.video-item {
  width: 120px;
  position: relative;
}

.video-cover {
  width: 120px;
  height: 160px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

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

.video-title {
  white-space: normal;
  font-size: 13px;
  color: #fff;
  margin-top: 5px;
  height: 36px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 单张大图块 */
.image-block {
  padding: 0 15px;
}

.image-content {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.image-content img {
  width: 100%;
  display: block;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
}

.pagination .prev,
.pagination .next {
  background-color: #1a2733;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
  text-decoration: none;
}

.pagination .current {
  background-color: #ff3e7f;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 14px;
} 