/* 新的CSS文件，专门用于index_new.html，避免与index.html冲突 */

/* 固定底部footer效果 */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* 内容主体区 - 覆盖主样式文件中的flex-direction，并设置flex-grow填充剩余空间 */
.main-content {
  flex-grow: 1;
}

/* 移动端头部默认隐藏 - 只在移动端显示 */
.wap-header,
.wap-search {
  display: none;
}

/* 桌面端头部默认显示 - 在移动端隐藏 */
.desktop-header,
.desktop-search {
  display: block;
}

/* 覆盖主样式文件中的容器固定宽度，解决浏览器窗口控制问题 */
.container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

/* 响应式调整 - 移除固定宽度限制 */
@media (max-width: 1200px) {
  .container {
    width: 100% !important;
    padding: 0 20px !important;
  }
}

/* 内容主体区 - 覆盖主样式文件中的flex-direction */
.main-content .container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0vh !important;
}

/* 大分类标签导航 */
.category-tag-nav {
  background-color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 0px;
}

.category-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}

.group-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
  min-width: 65px;
}

.sub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.category-tag {
  display: inline-block;
  padding: 4px 14px;
  background-color: #f5f5f5;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #333;
  border: 1px solid transparent;
  white-space: nowrap;
}

.category-tag:hover {
  background-color: #e8f0fe;
  border-color: #4e6ef2;
}

.category-tag.active {
  background-color: #4e6ef2;
  color: #fff;
  border-color: #4e6ef2;
}

.website-categories {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
}

.category-section {
  margin-bottom: 30px;
}

.category-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #03A9F4;
}

.category-title .count {
    font-weight: normal;
    color: #999;
}

.website-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding-bottom: 30px;
}

.website-links a {
  display: inline-block;
  padding: 8px 16px;
  background-color: #f5f5f5;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
}

.website-links a:hover {
  background-color: #4e6ef2;
  color: #fff;
}

/* 响应式设计 - 适配移动端 */
@media (max-width: 768px) {
  /* 显示移动端头部，隐藏桌面端头部 */
  .wap-header,
  .wap-search {
    display: block;
  }
  
  .desktop-header,
  .desktop-search {
    display: none;
  }
  
  .container {
    width: 100%;
    padding: 0 15px;
  }
  
  /* 进一步减少分类标签区域的垂直空间 */
  .category-tag-nav {
    padding: 10px 15px;
  }
  
  .category-tags {
    gap: 16px;
  }
  
  /* 顶部栏适配 */
  .top-bar .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .top-left {
    width: 100%;
  }
  
  .top-center {
    justify-content: flex-start;
    padding-right: 0;
    width: 100%;
  }
  
  .top-right {
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }
  
  /* 搜索栏适配 */
  .search-wrapper {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-left, .search-right {
    display: none;
  }
  
  .search-center {
    width: 100%;
    justify-content: center;
  }
  
  .search-box input {
    width: 250px;
    padding: 10px 12px;
  }
  
  .search-btn {
    padding: 10px 20px;
  }
  
  /* 分类标签适配 */
  .category-tag-nav {
    padding: 10px;
  }
  
  .category-group {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    align-items: flex-start;
  }
  
  .group-title {
    min-width: 65px;
    margin-bottom: 0;
    font-size: 13px;
  }
  
  .sub-tags {
    width: 100%;
    gap: 6px;
  }
  
  .category-tag {
    padding: 2px 10px;
    font-size: 13px;
  }
  
  /* 网站链接适配 */
  .website-categories {
    padding: 15px;
  }
  
  .category-section {
    margin-bottom: 0px;
  }
  
  .category-title {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .website-links {
    gap: 8px;
    padding-bottom: 20px;
  }
  
  .website-links a {
    font-size: 14px;
    padding: 6px 12px;
    /* flex: 1 1 calc(50% - 4px); */
    text-align: center;
  }
}

/* 适配小屏手机 */
@media (max-width: 480px) {
  .search-box input {
    width: 200px;
  }

  .website-links a {
    /* flex: 1 1 calc(100% - 4px); */
  }

  .container {
    width: 100% !important;
    padding: 0 10px !important;
  }
}

/* 移动端wap头部样式适配 */
@media (max-width: 768px) {
  /* 顶部栏移动端适配 */
  .wap-header {
    background-color: #fff;
    padding: 0px;
  }

  .wap-header .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
  }

  .wap-header .logo {
    width: 128px;
    height: 40px;
    margin: 15px 0px;
  }

  /* 搜索栏移动端适配 */
  .wap-search {
    background-color: #fff;
    padding: 10px 0px 20px 0px;
  }

  .wap-search .search-box {
    display: flex;
    align-items: center;
    width: 100%;
    height: 44px;
  }

  .wap-search .search-box input {
    flex: 1;
    height: 100%;
    padding: 0 12px;
    border: 2px solid #4e6ef2;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    outline: none;
  }

  .wap-search .search-btn {
    height: 100%;
    padding: 0 15px;
    background-color: #4e6ef2;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 新闻标题样式 */
  .wap-search .news-titles {
    margin-top: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
  }

  .wap-search .news-title-item {
    display: flex;
    align-items: center;
    flex: 1;
  }

  .wap-search .news-label {
    background-color: #ff4d4f;
    color: white;
    font-size: 11px;
    padding: 0px 4px;
    border-radius: 2px;
    margin-right: 5px;
  }

  .wap-search .news-content {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}