/* 配色參考 https://coolors.co/264653-2a9d8f-e9c46a-f4a261-e76f51 */

* {
  /* border: 1px black solid; */
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: "Noto Sans TC", sans-serif;
  font-family: "Aldrich", sans-serif;
  scroll-behavior: smooth;
}

body {
  background: #22c0c380; /* fallback for old browsers */
  background: -webkit-linear-gradient(
    to bottom,
    #6b705c,
    #b7b7a4
  ); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(
    to right,
    #f4a261,
    #e9c56ac2
  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  /* background-size: 100% 100%; */
  background-repeat: no-repeat;
  min-height: 100vh;
  max-width: 100vw;
  /* position: relative; */
}

p {
  letter-spacing: 2px;
  color: #264653;
}

.nav {
  min-height: 10vh;
  background-color: #264653;
  color: #e9c46a;
  justify-content: space-around;
  align-items: center;
  padding: 0 3rem;
  display: none;
  border-bottom: 0.3rem #2a9d8f solid;
  z-index: 1;
}

.nav a {
  color: #e9c46a;
  text-decoration: none;
  letter-spacing: 2px;
}

.nav a:hover {
  color: #2a9d8f;
}

.nav p {
  margin: 0.5rem 0;
  color: #e9c46a;
}

.nav-a {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  min-width: 70%;
}

.toTop {
  width: 5rem;
  height: 5rem;
  text-align: center;
  border-radius: 50%;
  background-color: #264653;
  color: #e9c46a;
  padding-top: 0.8rem;
  display: none;
  text-decoration: none;
}

.toTop:hover {
  border: 0.3rem #2a9d8f solid;
  cursor: pointer;
  padding-top: 0.5rem;
  text-decoration: none;
  color: #e9c46a;
}

h1 {
  font-size: 2rem;
  font-family: "Press Start 2P", cursive;
  /* margin: -5rem 0 3rem 0; */
  letter-spacing: 0.5rem;
  line-height: 5rem;
  text-align: center;
  color: #e76f51;
  /* text-shadow: 1px 1px white, -1px -1px #E76F51 */
  /* text-shadow: #2A9D8F 0.1em 0.1em 0.05em */
  text-shadow: -1px 2px #2a9d8f, 0 1px #2a9d8f, 1px 0 #2a9d8f, 0 -1px #2a9d8f;
}

.section {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

section {
  padding: 15vh 0 0 0;
  text-align: center;
  min-height: 80vh;
}
.section img {
  width: 30%;
  /* margin-top: 3rem; */
}

.catelogue {
  min-width: 60%;
}

.catelogue a {
  text-decoration: none;
}

.game-card {
  flex: 1 1 15%;
  min-height: 10rem;
  margin: 1rem;
  box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  border-radius: 5px;
  color: #264653;
  text-align: center;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 1.5rem;
  line-height: 10rem;
  letter-spacing: 2px;
}

.game-card:hover {
  box-shadow: #e76f51 0px 0px 0px 2px inset, #264653 10px 10px;
  color: #2a9d8f;
  cursor: pointer;
}

.top,
.bottom {
  display: flex;
}

@media screen and (max-width: 1000px) {
  h1 {
    font-size: 1.2rem;
    line-height: 3rem;
    margin: 1rem;
  }
  .section {
    display: block;
    text-align: center;
  }
  .section img {
    margin: 1rem;
  }

  .catelogue {
    margin: auto;
    width: fit-content;
    padding: 0;
  }

  .game-card {
    font-size: 1rem;
    line-height: normal;
    min-height: 0.8rem;
    padding: 1rem;
  }
}

@media screen and (max-width: 800px) {
  body {
    position: relative;
    overflow-x: hidden;
  }
  .nav {
    display: flex;
    justify-content: space-between;
  }

  .burger {
    cursor: pointer;
  }

  .burger div {
    width: 2rem;
    height: 0.25rem;
    border-radius: 2px;
    background-color: #e9c46a;
    margin: 4px;
    transition: ease all 0.5s;
  }

  .nav-a {
    background-color: #264653;
    min-width: 10rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    right: 0;
    top: 10vh;
    min-height: 60vh;
    padding: 2rem 0;
    transform: translateX(100%);
    overflow-x: hidden;
  }

  .nav-a li {
    opacity: 0;
  }

  .nav-a-active {
    transform: translateX(0);
  }

  /* nav的字一個一個陸續進場的動畫 */
  @keyframes navLiFade {
    from {
      opacity: 0;
      transform: translateX(50px);
    }
    to {
      opacity: 1;
      transform: translateX(0px);
    }
  }

  /* 漢堡從三條線變叉叉的動畫 */
  .burger-line-ani .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  .burger-line-ani .line2 {
    opacity: 0;
  }
  .burger-line-ani .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
  }
}

section h5 {
  font-size: 2rem;
  color: #264653;
  position: relative;
  letter-spacing: 5px;
  width: fit-content;
  margin: auto;
  margin-bottom: 5rem;
}
h5 div {
  z-index: -2;
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 90%;
  height: 40%;
  border-radius: 2px;
  background-color: #2a9d8f;
}

.fas {
  font-size: 80px;
  color: #2a9d8f;
}

section img {
  width: 30%;
}

.fist-user-img {
  transform: scaleX(-1);
  z-index: -1;
}

section h1 {
  margin-top: -150px;
}
#count-section h1 {
  margin-top: 70px;
}

#count h1 {
  cursor: pointer;
}

#count .btn {
  margin-top: 10px;
}

.btn {
  width: 100px;
  height: 100px;
  color: #264653;
  margin-top: -1rem;
  font-weight: 900;
  line-height: 100px;
  letter-spacing: 2px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffc67d, #dca769);
  box-shadow: 7px 7px 24px #7c5e3c, -7px -7px 24px #ffffae;
}

.btn:hover {
  border-radius: 50%;
  background: #f4b975;
  box-shadow: inset 20px 20px 60px #cf9d63, inset -20px -20px 60px #ffd587;
}

#count .btn {
  font-size: 30px;
}

.flip-card {
  background-color: transparent;
  width: 200px;
  height: 200px;
  perspective: 1000px;
  cursor: pointer;
  margin-top: 10rem;
  margin-right: 10rem;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  text-align: center;
  position: relative;
}

#answer {
  position: relative;
  top: 50%;
  font-size: 100px;
  /* line-height: 100px; */
}

.pwd-input {
  margin: auto 0;
}

.pwd-input input,
#addInput {
  width: 200px;
  height: 100px;
  margin-right: 30px;
  font-size: 50px;
  padding: 40px;
  border: 3px solid #264653;
  background-color: #2a9d8f;
  color: #e9c46a;
  border-radius: 5px;
}

#addInput {
  margin: 3rem;
}

.pwd-input p {
  margin-top: 10px;
  text-align: left;
  font-size: 20px;
}

#addNum-section h1 {
  margin: 0;
}
