body {
  background-image: url("https://resources.iostream.vn/content/article/tao-scrolling-background-voi-unity/thumbnail-hd/blob-1597804123133@2x.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  font-family: "Alumni Sans Inline One", cursive;
  height: auto;
  position: relative;
  min-height: 100vh;
}
:root {
  --btn--color: #ff7e00;
  --primary: #241732;
  --text-clor: #fff;
}
.gameheader {
  display: flex;
  align-items: center;
  color: var(--text-clor);
  text-align: center;
  cursor: pointer;
}
.text-animation {
  animation: textDanger 1s linear infinite;
}

@keyframes textDanger {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}
.gameheader__item {
  position: relative;
}
.gameheader__item:hover .des {
  visibility: visible;
}
.gameheader__item .des {
  position: absolute;
  top: 130%;
  left: 10%;

  background-color: #333;
  padding: 4px 12px;
  border-radius: 12px;
  width: 80%;
  min-width: 100px;
  visibility: hidden;
  transition: 0.1s linear;
  text-align: center;
  color: white;
  z-index: 2;
}
.gameheader__item .des::after {
  content: "";
  position: absolute;
  top: -20px;
  left: 40%;
  width: 10px;
  height: 10px;
  border-color: transparent transparent #333 transparent;
  border-width: 10px;
  border-style: solid;
}
.levelup {
  width: 40px;
}
.gameheader img {
  width: 30px;
  height: 30px;
  object-fit: cover;
}
.gameheader input {
  background-color: var(--primary);
  color: var(--text-clor);
  padding: 4px;
  min-width: 20px;
  max-width: 100px;
  border-radius: 999px;
  border: none;
  pointer-events: none;
  font-size: 18px;
  text-align: center;
  margin-right: 12px;
}
.logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login {
  order: 3;
}

.login input {
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #333;
  outline: none;
  color: var(--text-clor);
  background-color: var(--primary);
}
.login button {
  padding: 9px 16px;
  border: none;
  background-color: var(--btn--color);
  border-radius: 8px;
  color: var(--text-clor);
  font-size: 20px;
}
.settings {
  text-align: right;
  width: 30%;
}

.login {
  position: fixed;
  top: 50%;
  display: flex;
  flex-direction: column;
  left: 50%;
  transform: translate(-50%, -50%);
}
.login button {
  margin: 12px;
}
.login input {
  margin-bottom: 12px;
}
.login h1 {
  font-size: 60px;
  margin-bottom: 20px;
  font-family: fantasy;
  background: -webkit-linear-gradient(#ffa038, #d29d89);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media screen and (max-width: 768px) {
  .settings {
    width: 50% !important;
  }
  .login {
    text-align: center;
    width: 80% !important;
    left: 10%;
    display: block;
    transform: translate(0%, -50%);
  }
  .login input {
    width: 80%;
  }
  .login button {
    width: 80%;
  }
  .login h1 {
    font-size: 50px;
  }
}
.settings img {
  width: 50px;
  height: 50px;
  cursor: pointer;
}

.level__container {
  margin-top: 12px;
  text-align: center;
  color: var(--btn--color);
}
.level__content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  text-align: right;
}
.level__content button {
  width: 300px;
  height: 100px;
  text-align: center;
  font-size: 30px;
  margin-top: 20px;
  background-color: #80006a;
  color: var(--text-clor);
  border: none;
  outline: none;
  border-radius: 8px;
}
.level__content button:hover {
  background-color: var(--btn--color);
}

.hidden {
  display: none !important;
}
#level__container {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
}
@media screen and (max-width: 992px) {
  #level__container {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media screen and (max-width: 400px) {
  #level__container {
    grid-template-columns: repeat(2, 1fr);
  }
  .settings {
    display: none;
    width: 0%;
  }
  body {
    overflow-x: hidden;
    margin-top: 4px;
    margin-bottom: 30px;
  }
  .login {
    width: 96% !important;
    left: 2%;
    transform: translate(0%, 0%);
    top: 20%;
  }
  .login h1 {
    font-size: 35px;
  }
  .login input,
  .login button {
    width: 96% !important;
  }
}
.scene {
  height: 100px;
  perspective: 600px;
  transform: translateX(-30px);
  animation: showcartEffect 0.4s ease forwards;
  opacity: 0;
}
@keyframes showcartEffect {
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transform-style: preserve-3d;
  transform-origin: center right;
  transition: transform 1s;
  border: 1px solid transparent;
}

.card.is-flipped {
  transform: translateX(-100%) rotateY(-180deg);
}

.card__face {
  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  text-align: center;
  font-weight: bold;
  font-size: 40px;
  backface-visibility: hidden;
}

.card__face--front {
  background-color: var(--btn--color);
  display: flex;
  justify-content: center;
  align-items: center;
}

.card__face--back {
  transform: rotateY(180deg);
}
.card__face--back img {
  width: 100%;
  height: 100%;
}

.scene.scene-hidden {
  visibility: hidden;
}
.modal_toast {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  transition: 0.5s linear;
  text-align: center;
  z-index: 999;
}
.modal_toast.show {
  top: 20px;
}

.toast__content {
  background-image: url("/image/khungchat.jpg");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  min-width: 400px;
  padding: 8px 24px;
  border-radius: 999px;
  color: var(--text-clor);
}
.history {
  padding: 12px 4px;
  position: fixed;
  top: 10%;
  left: 10%;
  color: white;
  width: 80%;

  background-color: #231013;
  text-align: center;
  font-size: 18px;
  border-radius: 8px;
  height: 80vh;
  z-index: 4;
}

@media screen and (max-width: 768px) {
  .history {
    left: 1%;
    width: 98%;
  }
}
.cotainer__history--header {
  position: relative;
  padding: 12px 0;
  font-family: sans-serif;
}
#btn_history_close {
  background-color: red;
  position: absolute;
  top: 0;
  right: 0;
  color: white;
}
#btn_history_close :hover {
  background-color: rgb(231, 31, 31);
}
.cotainer__history--title {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: 50px;
  border-bottom: 1px solid #cac4c4;
}
.cotainer__history--title div:last-child {
  grid-column: 6/8;
}
.cotainer__history--list {
  height: 55vh;
  overflow: auto;
  padding-top: 12px;
}
.cotainer__history--body:hover {
  cursor: pointer;
  background-color: #4b4845;
}
.cotainer__history--list::-webkit-scrollbar {
  width: 5px;
}
.cotainer__history--list::-webkit-scrollbar-thumb {
  background-color: yellow;
}
.cotainer__history--list::-webkit-scrollbar-track {
  background-color: rgb(238, 238, 230);
  border-radius: 18px;
}
.cotainer__history--body {
  list-style: none;
}
.cotainer__history--body {
  display: flex;
  justify-content: space-between;
  padding: 0;
}
.cotainer__history--body li:last-child {
  font-size: 18px;
  width: 28%;
}
.cotainer__history--body img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.cotainer__history--body li {
  width: 14%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#btn_history_close:hover {
  opacity: 0.9;
}
