:root {
  --logo: #a486db;
  --font: #333;
  --a: #333;
}

* {
  box-sizing: border-box;
}

body {
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  margin: 0;
  color: var(--font);
  background: #fff;
  background-size: contain;
}
html {
  font-size: 16px;
}
a {
  line-height: 20px;
  text-decoration: none;
  color: var(--a);
}

a:hover,
a:active {
  text-decoration: none;
}

strong {
  font-weight: bolder;
}

.fx-r {
  display: flex;
  flex-direction: row;
}

.fx-h {
  display: flex;
  flex-direction: column;
}

.fx-ac {
  justify-content: center;
}

.fx-bc {
  align-items: center;
}

/* 定义全局滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  border-radius: 4px;
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #c1c1c1;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 回到顶部按钮样式 */
#back-to-top {
  font-size: 24px;
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: opacity 0.3s;
  color: white;
  border: none;
  border-radius: 50%;
  background-color: #007bff;
}

#back-to-top:hover {
  opacity: 0.8;
}

.logo_top {
  width: 30%;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 15px;
  background-color: var(--logo);
  position: relative;
}
.logo_top_allList {
  width: 60%;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 15px;
  background-color: var(--logo);
  position: relative;
}

.logo_top_home_container {
  overflow-x: hidden;
  width: 50%;
  margin-top: 20px;
  margin-bottom: 20px;
}

.logo_top_home {
  padding: 12px;
  border-radius: 15px;
  background-color: var(--logo);
}

logo_top_card_container {
  flex: 1;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  flex: 1;
  padding: 12px;
  border-radius: 15px;
  background-color: var(--logo);
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  background-color: var(--logo);
  touch-action: pan-y;
  user-select: none;
}

.carousel-item {
  flex: 0 0 auto;
  margin-right: 10px;
}

.logo_top_card {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  cursor: pointer;
}

.logo_top_card img {
  width: 60px;
  border-radius: 10px;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.logo_top_image {
  width: 60px;
  cursor: pointer;
  aspect-ratio: 1/1;
}

.game_container {
  display: grid;
  width: 25%;
  padding: 10px;
  margin: 15px 5px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  gap: 10px;
}

.game_container .third {
  width: 30%;
}

.game_container2 {
  width: 50%;
  margin: 15px auto;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

.game_container2 .game-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.game-item {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  aspect-ratio: 1/1;
}

.game-item img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}
.large-item {
  grid-column: span 2;
  grid-row: span 2;
}

.game-item:hover {
  transition: transform 0.3s ease;
  transform: scale(1.05);
}
.game-row {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 10px;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); */
  border-bottom: 1px solid #dedefe;
  /* justify-content: space-between; */
}

.game-title {
  margin: 0 10px;
  flex: 1;
  font-weight: bold;
}

.game-description {
  margin: 0 10px;
  flex: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-button {
  margin-left: 10px;
  padding: 8px 16px;
  cursor: pointer;
  color: white;
  border: none;
  border-radius: 20px;
  background-color: var(--logo);
  justify-content: end;
}

.play-button:hover {
  opacity: 0.8;
}
.gamecard,
.gamecard_allList {
  display: flex;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 15px;
  position: relative;
  width: 28%;
  background-image: url("./assets/logo.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: multiply;
  img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 10px;
    object-fit: cover;
  }
  &:hover {
    transition: transform 0.3s ease;
    transform: scale(1.05);
  }
}
.gamecard_allList {
  width: 100%;
}
.more_btn {
  width: 28%;
  margin-top: 20px;
  margin-bottom: 35px;
  padding: 10px;
  cursor: pointer;
  color: white;
  border-radius: 20px;
  background-color: var(--logo);
}

.more_btn:hover {
  transition: transform 0.3s ease;
  transform: scale(1.05);
  opacity: 0.8;
}
.detail_top {
  margin: 10px;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
}
.detail_title {
  justify-content: space-between;
  position: absolute;
  bottom: 10px;
  padding: auto 8px;
  left: 0;
  background-color: rgba(0, 0, 0, 0.4);
  width: 100%;
  color: #fff;
  border-radius: 10px;
}
.detail_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}
.game {
  z-index: 1;
  position: absolute;
  width: 100%;
  height: 100vh;
  top: 0;
  background-color: rgba(0, 0, 0, 1);

  iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
}

.back {
  z-index: 2;
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 4px 10px;
  background-color: #fff;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;

  img {
    width: 10px;
    height: 10px;
    cursor: pointer;
    background-size: 100% 100%;
  }
}
.detail_recommended_name {
  font-weight: bold;
  font-size: 1.2rem;
}
.detail_recommended {
  border: none;
  box-shadow: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
.detail_tags {
  padding: 10px;
  border-radius: 10px;
  background-color: var(--logo);
  color: white;
  cursor: pointer;
}
.detail_tags:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.footer {
  width: 100%;
  /* border-top: 1px solid var(--a); */
  padding: 20px 0 20px 0;
  box-shadow: -1px -3px 20px 5px rgba(0, 0, 0, 0.2);
  gap: 10px;
}

.footer_link {
  margin-right: 10px;
}

.footer_link a {
  margin-right: 5%;
  text-wrap: nowrap;
}
.gamecard_allList_container {
  width: 60%;
}
.input_container {
  width: calc(60vw - 10px);
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .logo_top,
  .logo_top_allList,
  .logo_top_home_container {
    width: calc(100vw - 10px);
  }
  .gamecard_allList_container {
    width: calc(100vw - 20px);
  }
  .input_container {
    width: calc(100vw - 10px);
  }
  .gamecard_allList {
    width: 100%;
  }
  .gamecard {
    width: calc(100vw - 20px);
  }
  .detail_top {
    width: calc(100% - 20px);
  }
  .game_container,
  .game_container2 {
    width: calc(100vw - 25px);
    margin: 15px auto;
  }
  .game_container .detail_recommended {
    width: 100%;
  }
  .more_btn {
    width: calc(100vw - 20px);
    margin-top: 12px;
    padding: 15px;
  }

  .footer {
    gap: 18px;
  }
}
