:root {
  --tools-icon-size: 5rem;
  --hot-guides-color: #9fcfe6;
  --hot-guides-dark-color: #4587a7;
  --hot-games-color: #ffecb3;
  --hot-games-dark-color: #d29c39;
  --ad-background-color: #ddd4ff;
  --pwGray: #333333;
  --pwLightGray: #f2f4f6;
}

body {
  overflow: hidden;
}

/* swiper */
.swiper.main_banner .swiper-slide {
  height: auto;
  overflow: hidden;
}

.swiper.main_banner .swiper-slide img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3/1;
  object-fit: cover;
  max-width: 100%;
}

.swiper-button-prev.main:after,
.swiper-button-next.main:after {
  content: '' !important;
}

.swiper-button-prev.main {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%234c71ae'%2F%3E%3C%2Fsvg%3E") !important;
  filter: grayscale(1) brightness(0.8);
  transition: 0.2s all ease-out;
}

.swiper-button-next.main {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%234c71ae'%2F%3E%3C%2Fsvg%3E") !important;
  filter: grayscale(1) brightness(0.8);
  transition: 0.2s all ease-out;
}

.swiper-button-prev.main:hover,
.swiper-button-next.main:hover {
  opacity: 0.6;
  transition: 0.2s all ease-out;
}

.sub_left_banner,
.sub_right_banner {
  width: 50vw;
  height: 60%;
}

.swiper.sub_right_banner {
  position: absolute;
  top: 0;
  overflow: hidden;
}

.swiper.sub_left_banner {
  position: absolute;
  right: 1rem;
  bottom: 0;
  overflow: hidden;
}

.swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
  height: auto;
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  bottom: auto;
  top: 2rem;
  left: -1rem;
  z-index: 1;
}

.swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal
  span {
  margin: 4px 0;
  width: 1vw;
  max-width: 10px;
  max-height: 10px;
  height: 1vw;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active {
  background-color: var(--pwGray);
}

section.banner {
  position: relative;
  overflow: hidden;
}

.scroll_text_hint {
  font-size: 10px;
  position: absolute;
  right: 3%;
  writing-mode: vertical-rl;
  bottom: 3rem;
}

.slider_progress_bar {
  position: absolute;
  right: auto;
  left: 0.5rem;
  bottom: auto;
  top: 2rem;
  height: 7vw;
  width: 2px;
  background-color: #e6e6e6;
  z-index: 1;
}

.slider_progress_bar span.active {
  position: absolute;
  display: inline-block;
  width: 100%;
  height: 100%;
  background: #353535;
  transform: scaleY(0);
  transform-origin: left top;
  animation-name: prograssBar;
  transition-timing-function: linear;
}

.swiper-button-next.main {
  color: var(--pwGray);
  transform: scale(0.8);
  bottom: 5%;
  top: auto;
  left: 0;
}

.swiper-button-prev.main {
  color: var(--pwGray);
  transform: scale(0.8);
  bottom: 5%;
  left: auto;
  top: auto;
  right: 0;
}

@keyframes prograssBar {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

.linkable {
  cursor: pointer;
}

/* tools */

.tools {
  position: relative;
  background-color: #fff;
  padding-top: 2.5rem;
}

.tools_search .search_inputs {
  display: flex;
  border: solid 1px #ccc;
}

.search-with-tags {
  flex: 1 0 auto;
  padding: 0.5rem 0;
}

.tools_search .search_inputs input {
  flex: 1 0 auto;
  display: block;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: none;
}

.tools_search .search_inputs input:focus {
  outline: none;
}

.tools_search .search_inputs > button {
  flex: 0 0 auto;
  color: #2ca6e0;
}

/* tools */

.tools_search_div {
  position: relative;
  width: 600px;
  margin: auto;
}

.tools_search_div select {
  cursor: pointer;
  border: none;
  outline: none;
  margin: 0.5rem;
  width: 70px;
  -webkit-appearance: none; /* 用於移除 iOS 和 Safari 的默認樣式 */
  appearance: none;
  background-color: transparent; /* 移除背景色 */
  /* 添加自定義下拉箭頭 */
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem;
}

.tools_search {
  position: relative;
  margin: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid #e2e2e2;
  border-radius: 3rem;
  background-color: #fff;
  padding: 0px 0.5rem;
  transition: all 0.2s ease-out;
}

.tools_search:hover {
  border: 1px solid gray;
  transition: all 0.2s ease-out;
}

.tools_search .search_inputs {
  flex: 1 0 auto;
  border: none;
  outline: none;
  padding-left: 1rem;
}

.tools_search .search_inputs input {
  border-left: solid 1px #ccc;
  padding: 0.3rem 0.7rem;
  margin: 0.375rem 0;
  transition: all 0.2s ease-out;
}

.tools_search .search_inputs input:focus + {
  transition: all 0.2s ease-out;
}

.search_icon_wrap {
  cursor: pointer;
  position: relative;
  right: 0;
  top: 0;
  height: 3rem;
  width: 3rem;
  background-color: var(--pwGray);
  color: white;
  border-radius: 50%;
  transition: all 0.2s ease-out;
}

.search_icon_wrap svg {
  position: absolute;
  font-size: 1.5rem;
  left: 50%;
  top: 50%;
  transform-origin: center;
  transform: translate(-50%, -50%);
}

.search_icon_wrap:hover {
  animation: pulse 1s ease-out 1;
  background-color: var(--active-color);
  transition: all 0.2s ease-out;
}

@keyframes pulse {
  0%,
  100% {
    scale: (1);
  }
  50% {
    scale: (1.2);
  }
}

/* category */

section.category {
  position: relative;
  margin: 1rem auto 2rem;
  display: flex;
  width: 100%;
  flex-direction: column;
  padding: 0.5rem 8.333333% 0.5rem 8.333333%;
  height: auto;
  transition: all 0.2s ease-out;
}

section.category .category_content {
  position: relative;
  width: 130%;
  height: auto;
  overflow: visible;
}

section.category .swiper.category_guide {
  width: 100%;
  height: auto;
  top: 0;
}

section.category .head_content {
  width: 100%;
  display: flex;
  margin-bottom: 1rem;
}

section.category .head_content .info {
  width: 80%;
}

section.category .head_content .control_wrap {
  width: 40%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
}

section.category .control_panel {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 1rem;
}

section.category .control_panel a.btn_guide_more {
  color: var(--pwGray);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  width: auto;
  border-radius: 2rem;
  height: 100%;
  border: 1px solid lightgray;
  transition: all 0.2s ease-out;
}

section.category .control_panel a.btn_guide_more:hover {
  transition: all 0.2s ease-out;
  color: white;
  background-color: var(--pwGray);
}

section.category .control_panel a.btn_guide_more span {
  line-height: 2rem;
}

section.category .btn_link {
  color: var(--pwGray);
  padding: 0.5rem 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: auto;
  margin: auto 0 1rem 0;
  border-radius: 2rem;
  height: fit-content;
  border: 1px solid lightgray;
  transition: all 0.2s ease-out;
}

section.category .btn_link img {
  filter: invert(1);
  width: 48px;
  margin-right: 5px;
  transition: all 0.2s ease-out;
}

section.category .btn_link:hover {
  transition: all 0.2s ease-out;
  color: white;
  background-color: var(--pwGray);
}

section.category .btn_link:hover img  {
  filter: invert(0);
  transition: all 0.2s ease-out;
}


section.category .btn_link span {
  font-size: clamp(1rem, 3vw, 1.2rem);
}

section.category .info .category_title {
  display: inline-block;
  margin: 0;
}

.category_title > * {
  display: inline;
}

.category_title h1 {
  font-size: 1.75rem;
  font-weight: 400;
  margin-right: 1rem;
}

.category_title h2 {
  margin: 0;
  margin-right: 1rem;
  font-size: 5vw;
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: 100;
  line-height: initial;
}

.category_title span {
  font-weight: 300;
  font-size: clamp(1rem, 3vw, 1.5rem);
  line-height: initial;
  letter-spacing: 1px;
  margin-top: auto;
  margin-bottom: 0.5rem;
}

.category_title span.append {
  font-size: clamp(12px, 3vw, 18px);
  color: var(--gray);
  font-weight: 400;
  opacity: 0.8;
}

.category_title span.num {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 1px;
}

.category_subtitle span {
  font-weight: 400;
  color: var(--gray);
  font-size: clamp(10px, 3vw, 14px);
  line-height: initial;
  letter-spacing: 1px;
  margin-top: auto;
}

section.category .category_tab {
  display: flex;
  margin: 1rem 0;
  padding: 0;
}

section.category .category_tab a {
  all: unset;
}

section.category .category_tab a {
  text-align: center;
  cursor: pointer;
  padding: 0.5rem;
  max-width: 183px;
  width: 100%;
  color: var(--pwGray);
  background-color: white;
  transition: all 0.2s ease-out;
  border-bottom: 1px solid var(--pwGray);
}

section.category .category_tab a.active,
section.category .category_tab a:hover {
  color: white;
  background-color: var(--pwGray);
  transition: all 0.2s ease-out;
}

section.category .swiper-button-prev,
section.category .swiper-button-next {
  all: unset;
  cursor: pointer;
  display: flex;
  margin: 0 0.5rem;
  justify-content: center;
  align-items: center;
  position: relative;
  color: var(--pwGray);
  width: 3rem;
  height: 3rem;
  border: 1px solid lightgray;
  border-radius: 50%;
  transition: all 0.2s ease-out;
}

section.category .swiper-button-prev {
  margin-left: 1rem;
}

section.category .swiper-button-next::after,
section.category .swiper-button-prev::after {
  font-size: 20px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

section.category .swiper-button-prev:hover,
section.category .swiper-button-next:hover {
  transition: all 0.2s ease-out;
  color: white;
  background-color: var(--pwGray);
}

section.category .control_panel .swiper-button-disabled {
  opacity: 0.35;
}

section.category .control_panel .swiper-button-disabled:hover {
  color: var(--pwGray);
  border: 1px solid lightgray;
  animation: unset;
}

section.category a.btn_guide_empty {
  margin-top: 10px;
  display: flex;
  align-items: center;
  color: var(--pwGray);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  width: fit-content;
  border-radius: 2rem;
  height: 100%;
  border: 1px solid lightgray;
  transition: all 0.2s ease-out;
}

section.category a.btn_guide_empty img {
  filter: grayscale(1);
  transition: all 0.2s ease-out;
}

section.category a.btn_guide_empty:hover {
  border-color: var(--active-color);
  transition: all 0.2s ease-out;
  color: var(--active-color);
}

section.category a.btn_guide_empty span {
  line-height: 2;
  transition: all 0.2s ease-out;
}

section.category a.btn_guide_empty:hover img {
  filter: grayscale(0);
  transition: all 0.2s ease-out;
}

/* theme category */

.h-2col-ad .ad-content,
.h-1col-ad .ad-content {
  height: 400px;
}

.theme_guide_category .more-btn {
  position: absolute;
  right: 0;
  top: 0;
}

.theme_guide_category .btn-index.btn-index-category-more {
  border-width: 0;
  padding: 1rem 3rem 0 0;
}

section.category.theme .category_title {
  display: block;
  width: 100%;
  margin: 1rem 0;
}

section.category.theme .category_title h6 {
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1.3;
}

section.category.theme .control_panel {
  top: 2.3rem;
}

section.category.theme {
  min-height: 470px;
}

/******* tools ******/

.guide-tags {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.guide-tag {
  margin-top: 0.5rem;
  font-size: 16px;
  border-width: 1.1px;
  border-style: solid;
  border-radius: 25px;
  padding: 0.3rem 1rem;
  margin-left: 0.25rem;
  margin-right: 0.25rem;
  cursor: pointer;
}

.guide-custom-tags {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.guide-custom-tags .guide-tag {
  font-size: 0.8em;
  border-color: gray;
  color: gray;
}

.guide-custom-tags .guide-tag:hover {
  font-size: 0.8em;
  border-color: var(--active-color);
  color: var(--active-color);
}

.btn-index {
  border-radius: 15px;
  border-width: 2px;
  padding: 0.5rem 3rem;
  position: relative;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.btn-index.btn-index-guides {
  border-color: var(--hot-guides-color);
  color: var(--hot-guides-dark-color);
}

.btn-index.btn-index-guides:hover,
.btn-index.btn-index-guides:active {
  border-color: var(--hot-guides-dark-color);
}

.btn-index.btn-index-games {
  border-color: var(--hot-games-color);
  color: var(--hot-games-dark-color);
}

.btn-index.btn-index-games:hover,
.btn-index.btn-index-games:active {
  border-color: var(--hot-games-dark-color);
}

.btn-index .btn-right {
  right: 15px;
  position: absolute;
}

.hot-guides {
  position: relative;
}

.hot-games {
  position: relative;
}

.hot-guides .carousel-cell,
.hot-games .carousel-cell {
  width: 80%;
}

/* ad */
.h-2col-ad {
  padding: 5rem 0 0rem 0;
  opacity: 0.9;
}

.h-2col-ad .ad-content,
.h-1col-ad .ad-content {
  background-color: var(--ad-background-color);
  border-radius: 20px;
  height: 200px;
  margin-bottom: 0.5rem;
}

/* tag list */
.tag-list {
}

.tag-list .tag-list-title {
  color: var(--active-color);
}

.tag-list a.tag-list-link {
  color: #666;
  transition: color 0.4s ease;
}

.tag-list a.tag-list-link {
}

/* index loading */
.index-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: #fff;
  color: var(--active-color);
}

.index-loading span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40%;
  /* height: 50%; */
  transform: translate(-50%, -50%);
}

@keyframes Opacity {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 5s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* RWD--------------------------------- */

@media screen and (max-width: 1200px) {
  section.category .control_panel {
    top: 7rem;
  }
}

@media screen and (max-width: 992px) {
  .tools {
    padding: 1rem;
    max-width: 500px;
    margin: 0 auto;
  }
  .swiper.main_banner {
    width: 100%;
    height: 51vw;
    min-height: 350px;
    max-width: 100%;
  }

  .swiper.main_banner .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: fill;
  }

  /* tools */
  .tools-search {
    /* width: 90%; */
    top: 0;
    /* left: 50%; */
    /* transform: translate(-50%, -50%); */
    position: relative;
    /* margin: 0 auto; */
    /* background: #fff; */
    padding: 1.5rem 0.5rem 0.5rem;
  }

  .tools-bg {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
  }

  .tools-container {
    width: calc(100% + 30px);
    margin-left: -15px;
    margin-right: -15px;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
  }

  /* guide category */
  .guide-category .col-6 {
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }

  .swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: center;
    top: unset;
    left: unset;
    right: unset;
    bottom: unset;
    margin-top: 5px;
  }

  .swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal
    span {
    width: 1rem;
    height: 1rem;
    margin: 7px;
  }

  section.tools .tools_search_div {
    width: 100%;
  }

  h3,
  h4 {
    font-size: 19px;
  }
  h6 {
    font-size: 14px;
  }

  .swiper.main_banner {
    width: 100%;
    height: 51vw;
    min-height: unset;
    max-width: 100%;
  }

  .swiper.main_banner .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tools {
    padding: 1rem;
  }
  .tools_search #searchTypeSelect {
    display: none;
  }
  .tools_search .search_inputs input {
    border: none;
  }

  .search-with-tags {
    flex: 1 0 auto;
    padding: 5px 0;
  }

  .search_icon_wrap {
    height: 45px;
    width: 45px;
  }

  section.category.theme {
    height: auto;
  }

  section.category.theme .category_title {
    width: 100%;
  }

  .h-2col-ad {
    padding-top: 0;
    margin-top: 1rem;
  }
}

@media screen and (max-width: 768px) {
  section.category {
    padding: 0.5rem 1rem;
    margin: 0 auto;
  }
  .category_title span {
    font-size: 14px;
  }

  .category_title h3,
  .category_title h2 {
    margin-right: .5rem;
  }

  section.category .head_content .info {
    width: 100%;
  }

  section.category a.btn_guide_empty h4 {
    font-size: 1rem;
    margin-left: 2px;
  }

  section.category .control_panel {
    position: relative;
    margin-top: 2rem;
    width: 100%;
    top: auto;
    left: 0;
    bottom: 0;
  }
  section.category.theme .control_panel {
    top: unset;
    margin-bottom: auto;
    margin-top: 1rem;
  }
  section.category .control_panel a.btn_guide_more {
    margin-right: auto;
  }

  section.category .control_wrap {
    display: flex;
    flex-flow: column-reverse;
  }

  section.category .control_panel {
    margin-top: 1rem;
  }

  section.category .control_wrap .btn_link {
    justify-content: center;
  }
  .tools_search {
    width: max-content;
  }

}
