.filter-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: 4.15rem;
  height: 100%;
  padding: 0.16rem;
}

@media only screen and (max-width: 900px) and (max-aspect-ratio: 13 / 9) and (max-device-width: 920px) {
  .filter-panel {
    padding: 0;
    width: 100%;
    height: 45%;
    bottom: 0;
    top: auto;
    margin-top: 0.6rem;
  }
}

@media only screen and (max-width: 900px) and (min-aspect-ratio: 13 / 9) and (max-device-width: 920px) {
  .filter-panel {
    padding: 0.06rem;
    width: 3.6rem;
  }
}

.filter-panel--hidden {
  width: 0;
  height: 0;
}

.filter-panel--hidden .filter-panel-content {
  border: none;
}

.filter-panel--hidden .filter-panel-body,
.filter-panel--hidden .filter-panel-header,
.filter-panel--hidden .filter-panel-footer {
  visibility: hidden;
}

.filter-panel-content {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  background: url("../../assets/backgrounds/shenhu.jpg");
  background-repeat: no-repeat; /* 防止图片重复 */
  background-position: center; /* 图片居中显示 */
  background-size: cover;
  width: 100%;
  height: 100%;
  border-radius: 0.12rem 0.12rem 0.12rem 0.12rem;
  border: 2px ridge #d3bc8e92;
  visibility: visible;
  z-index: 2;
}

.filter-panel-header-img {
  height: 1.2rem;
  background: url("../../assets/backgrounds/wxnn-logo5.png");
  background-size: 70%;
  margin: 0.1rem;
  background-position: center; /* 图片居中显示 */
  background-repeat: no-repeat; /* 防止图片重复 */
}

.filter-panel-header-toolbar {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex: 1;
  margin: 6px;
}

.filter-panel-header-toolbar-btn {
  font-size: 14px;
  color: rgb(209, 207, 184);
  cursor: pointer;
  padding: 5px 10px;
  border: none;
  border-radius: 0.12rem;
}

.filter-panel-header-toolbar-btn:hover {
  background: rgb(88, 110, 108);
}

.filter-panel-body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  overflow: hidden;
  -webkit-box-align: stretch;
  -ms-flex-align: stretch;
  overflow-y: auto;
  align-items: stretch;
  border-radius: 0 0 0.12rem 0.12rem;
  min-width: 0.97rem;
  scrollbar-width: none;
}

.filter-panel-body::-webkit-scrollbar {
  display: none;
}

.filter-panel-body::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.5); /* 滚动条颜色 */
  border-radius: 6px; /* 滚动条圆角 */
}

.filter-panel-body::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.1); /* 滚动条轨道颜色 */
  border-radius: 6px;
}

.filter-panel-groups {
  width: 100%;
  padding: 0.05rem 0.05rem 0.05rem 0.05rem;
}

.filter-panel-group {
  margin-bottom: 0.2rem;
}

.filter-panel-group-title {
  font-size: 0.18rem;
  font-weight: bold;
  color: rgb(209, 207, 184);
  margin-bottom: 0.03rem;
  cursor: pointer;
}

.filter-panel-categories {
  display: flex;
  flex-wrap: wrap;
}

.filter-panel-categories.active {
  display: block;
}

.filter-panel-category {
  opacity: 0.3;
  /* 添加固定宽度，使每行显示两个 */
  flex: 0 0 calc(50% - 0.1rem); /* 50%减去间隔的一半 */
  display: flex;
  align-items: center;
  padding: 0.04rem;
  background: rgb(89, 111, 109);
  justify-content: space-between;
  border-radius: 0.06rem;
  border: 1px ridge #d3bc8e;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
  box-sizing: border-box;
  transition: opacity 0.3s;
  margin: 0.02rem 0.05rem 0.02rem 0.05rem;
}

.filter-panel-category.active {
  opacity: 1;
}

.filter-panel-category:hover {
  background: rgba(26, 26, 26, 0.414);
}

.filter-panel-category-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.14rem;
  color: rgb(219, 218, 198);
}

.filter-panel-category-icon {
  width: 0.2rem;
  height: 0.2rem;
  margin-right: 0.06rem;
}

.filter-panel-category-count {
  color: rgb(219, 218, 198);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  min-width: 20px;
  text-align: center;
}

.filter-panel-footer {
  bottom: 0;
  width: 100%;
  height: 0.56rem;
  line-height: 0.16rem;
  display: flex;
  justify-content: space-between;
  flex-flow: wrap;
  align-items: center; /* 垂直居中 */
  padding: 10px;
  z-index: 2;
}

.filter-panel-footer-left {
  display: flex;
  gap: 8px;
  flex: 1;
}

.filter-footer-control {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 5px;
  border-radius: 6px;
  cursor: pointer;
}

.filter-footer-control:hover {
  background: rgba(211, 188, 142, 0.1);
  border-color: rgba(211, 188, 142, 0.5);
}

/* 复选框样式 */
.filter-footer-control-checkbox {
  margin: 0;
  cursor: pointer;
  accent-color: #d3bc8e;
}

/* 文本样式 */
.filter-footer-control span {
  color: rgb(209, 207, 184);
  font-size: 14px;
  user-select: none;
}

/* 选中状态 */
.filter-footer-control input:checked + span {
  color: #d3bc8e;
}

.filter-footer-develop-btn {
  background-image: url("../../assets/icons/nikki.png");
  width: 24px;
  height: 24px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.2s;
  cursor: pointer;
}

.filter-footer-develop-btn:hover {
  transform: scale(1.1);
}

.filter-panel-icon {
  display: none;
  width: 0.67rem;
  height: 0.67rem;
  position: absolute;
  background-image: url("../../assets/icons/nikki.png");
  background-size: contain;
  z-index: 15;
}

.filter-panel-icon--active {
  display: inline-block;
  top: 0.12rem;
}

.filter-panel-sider {
  position: absolute;
  right: -0.4rem;
  width: 0.6rem;
  height: 0.4rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  flex-direction: column;
  gap: 15px; /* 元素之间的间距 */
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  top: 0.3rem;
  z-index: 10;
}

@media only screen and (max-width: 900px) and (min-aspect-ratio: 13 / 9) and (max-device-width: 920px) {
  .filter-panel-sider {
    right: -0.5rem;
  }
}

.filter-panel__fold {
  width: 0.53rem;
  height: 0.4rem;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  cursor: pointer;
  background: linear-gradient(to right, rgb(89, 111, 109), #878787b2);
  padding: 0.1rem;
  border-radius: 0rem 0.12rem 0.12rem 0rem;
}
.filter-panel__fold-icon {
  width: 0.3rem;
  height: 0.25rem;
  background-image: url("../../assets/icons/arrow-left.png");
  background-position: 20%;
  background-repeat: no-repeat;
  background-size: contain;
  margin-left: 0.03rem;
}

.filter-panel__fold--active {
  position: absolute;
  left: 0.5rem;
  right: auto;
}

.filter-panel__fold--active .filter-panel__fold-icon {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

.filter-sider-container {
  position: relative;
  margin-left: 0.05rem;
  z-index: 2;
}

.filter-sider-container--folded {
  display: none;
}

.filter-sider-icon {
  width: 0.4rem;
  height: 0.4rem;
  background-color: rgba(89, 111, 109, 0.884);
  border-radius: 8px;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.filter-sider-icon-img {
  width: 0.25rem;
  height: 0.25rem;
}

.filter-sider-popup {
  position: absolute;
  top: 0;
  left: 100%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: none;
  padding-left: 0.15rem;
  z-index: 10;
}

@media only screen and (min-width: 900px) {
  .filter-sider-popup {
    padding-left: 0.12rem;
  }
}

.filter-sider-popup-list {
  background: rgb(66, 77, 76);
  border-radius: 0.12rem;
  box-shadow: 0 0.06rem 0.12rem rgba(0, 0, 0, 0.1);
  padding: 0.1rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.filter-sider-popup-list-title {
  font-size: 0.14rem;
  color: rgb(209, 207, 184);
  padding-bottom: 0.05rem;
  padding-left: 0.05rem;
  border-bottom: 1px solid rgb(209, 207, 184);
  margin-bottom: 0.1rem;
}

@media only screen and (min-width: 900px) {
  .filter-sider-popup-list-title {
    font-size: 0.16rem;
  }

  .filter-sider-container:hover .filter-sider-popup {
    display: block;
  }
}

.filter-sider-popup-list-item-container {
  position: relative;
  z-index: 10;
  font-size: 0.14rem;
  line-height: 0.16rem;
  color: #d3bc8e;
  width: 1.5rem; /* 固定宽度 */
  max-height: 400px; /* 最大高度 */
  overflow-y: auto;
  scrollbar-width: thin;
  -ms-overflow-style: none;
  scrollbar-color: #d3bc8e rgba(0, 0, 0, 0);
}

/* 美化滚动条 */
.filter-sider-popup-list-item-container::-webkit-scrollbar {
  width: 4px;
}

.filter-sider-popup-list-item-container::-webkit-scrollbar-track {
  background: transparent;
}

.filter-sider-popup-list-item-container::-webkit-scrollbar-thumb {
  background-color: #d3bc8e;
  border-radius: 0.12rem;
}

/* 列表项样式 */
.filter-sider-popup-list-item {
  color: rgb(209, 207, 184);
  padding: 12px 12px;
  white-space: nowrap; /* 文本不换行 */
  overflow: hidden; /* 溢出隐藏 */
  text-overflow: ellipsis; /* 显示省略号 */
  cursor: pointer;
  border-radius: 6px;
}

.filter-sider-popup-list-item:hover {
  background: rgba(211, 188, 142, 0.1);
}

/* 手机竖屏 */
@media only screen and (max-width: 900px) and (max-aspect-ratio: 13 / 9) and (max-device-width: 920px) {
  .filter-panel-sider {
    position: fixed;
    right: auto;
    top: 0.1rem;
    left: 0.1rem;
    gap: 0;
    width: auto;
    height: auto;
    border-radius: 0.2rem;
    background-color: rgba(235, 233, 213, 0.9);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  }

  .filter-panel__fold {
    display: none;
  }

  .filter-panel-icon {
    display: none;
  }

  .filter-sider-icon {
    background: none;
  }

  .filter-sider-container {
    margin: 0.07rem;
  }

  .filter-sider-container--folded {
    display: block;
  }

  .filter-sider-icon-img {
    width: 0.3rem;
    height: 0.3rem;
  }

  .filter-panel-sider-mobile-btn-active .filter-sider-icon {
    filter: brightness(75%);
  }

  .filter-panel-sider-mobile-popup-btn-active .filter-sider-icon {
    filter: brightness(75%);
  }

  .filter-panel-sider-mobile-popup-btn-active .filter-sider-popup {
    display: block;
  }


}

/* 适配手机横屏 */
@media only screen and (max-width: 900px) and (min-aspect-ratio: 13 / 9) and (max-device-width: 920px) {
  .filter-panel-sider-mobile-filter {
    display: none;
  }

  .filter-sider-popup-list {
    max-height: 1.9rem;
  }

  .filter-sider-popup {
    top: -0.25rem;
  }

  .filter-sider-container:hover .filter-sider-popup {
    display: block;
  }
}

@media only screen and (max-width: 900px) {
  .filter-panel-header-img {
    display: none;
  }

  .filter-sider-popup-list-item-container {
    scrollbar-width: thin;
  }
}


.filter-panel-header-area {
  font-size: 14px;
  display: flex;
  align-items: center;
  margin-right: 10px;
  color: #e1d0bc;
}

.area-selector {
  position: relative;
  cursor: pointer;
}

.selected-area {
  padding: 2px 20px 2px 8px;
  background: rgba(96, 77, 63, 0.8);
  border-radius: 4px;
  position: relative;
}

.dropdown-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
}

.area-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(50, 57, 71, 0.9);
  border: 1px solid #604d3f;
  border-radius: 4px;
  margin-top: 4px;
  display: none;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  /* 自定义滚动条样式 */
  scrollbar-width: thin;
  scrollbar-color: #604d3f rgba(50, 57, 71, 0.9);
}

/* WebKit浏览器的滚动条样式 */
.area-dropdown::-webkit-scrollbar {
  width: 6px;
}

.area-dropdown::-webkit-scrollbar-track {
  background: rgba(50, 57, 71, 0.9);
}

.area-dropdown::-webkit-scrollbar-thumb {
  background-color: #604d3f;
  border-radius: 3px;
}

.area-option {
  padding: 4px 8px;
  white-space: nowrap;
}

.area-option:hover {
  background: rgba(96, 77, 63, 0.8);
}

.area-selector.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}