@import url('font.css');

* {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
}

:root {
  font-weight: bold;
  --font: 'Roboto', sans-serif;
  --logo-font: 'Pacifico', cursive;
  --roundness: 0.5rem;
  --bg-color: #db8917;
  /* --bg-color: linear-gradient(to bottom, #c36e13, #bc6917); */
  --main-color: #eee;
  --caret-color: #eee;
  --sub-color: #444;
  --text-color: #eee;
}

body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font);
  display: flex;
  justify-content: center;
  min-width: 650px;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.textButton {
  display: flex;
  align-content: center;
  color: var(--sub-color);
  border: none;
  border-radius: var(--roundness);
  cursor: pointer;
  height: min-content;
  width: min-content;
  text-align: center;
  padding: 0.5rem;
  font-size: 1rem;
  transition: 0.125s;
}

.textButton .text {
  margin-left: 0.4rem;
}

.centerContent {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 4.5rem;
}

#top {
  display: flex;
  flex-direction: column;
}

#top .logo {
  display: flex;
  align-items: center;
  font-size: 2.5rem;
  font-family: var(--logo-font);
  font-weight: normal;
  cursor: pointer;
}

#top .logo .text {
  position: relative;
  margin-left: 0.7rem;
}

#center {
  display: flex;
  flex: 1;
  align-items: center;
}

.score {
  font-family: var(--logo-font);
  text-align: center;
  width: 100%;
  z-index: 10;
}

.score .count {
  width: min-content;
  transition: all 0.1s cubic-bezier(0.5, 0.35, 0.15, 1.4);
  transform: scale(1);
  margin: 0 auto;
  font-size: 5rem;
  line-height: 5rem;
}

.score .subtitle {
  font-size: 2rem;
  color: var(--sub-color);
  height: 4rem;
  line-height: 4rem;
}

#center {
  display: flex;
  justify-content: center;
  /* background-image: url('../image/cat-hat-4.png'); */
  background-size: 115%;
  background-position: 0.4rem 1rem;
  background-repeat: no-repeat;
  width: 500px;
  margin: auto;
}

#center .my-fish {
  /* display: flex;
  align-items: center;
  justify-content: center; */
  cursor: pointer;
  transition: all 0.1s cubic-bezier(0.5, 0.35, 0.15, 1.4);
  transform: scale(1);
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
}

.centerContent #center {
  position: relative;
}

.my-fish {
  width: 100%;
  /* height: 30%; */
  position: relative;
}

.my-fish img {
  /* width: 100%; */
  height: 100%;
}

.my-fish img.club {
  height: 30%;
  position: absolute;
  bottom: calc(0% + 6.8%);
  left: calc(50% - 0.8%);
  z-index: 20;
}

.my-fish img.fish {
  height: 40%;
  position: absolute;
  bottom: calc(0% - 4%);
  left: 50%;
  transform: translateX(-50%) scaleX(-1);
  z-index: 15;
}

.my-fish img.cat {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.my-fish img.han {
  height: 48%;
  position: absolute;
  bottom: 60%;
  left: 18%;
  z-index: 25;
}

.my-fish img.lingpai {
  height: 38%;
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-45%);
  z-index: 25;
  opacity: 0;
}

#bottom {
  color: var(--sub-color);
  font-size: 0.9rem;
  line-height: 0.9rem;
  padding: 5px 5px;
  position: relative;
  text-align: center;
}

#bottom .keyTips {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
}

#bottom .keyTips key {
  color: var(--bg-color);
  background-color: var(--sub-color);
  margin: 0.3rem 0.45rem;
  border-radius: 0.3rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  line-height: 0.7rem;
}

#bottom .leftRight {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

#bottom .left {
  font-size: 14px;
  color: var(--text-color);
}

#bottom .right {
  width: 100px;
}

#bottom .right a {
  width: 100%;
}

#bottom .textButton:hover {
  color: var(--text-color);
}

/* @media only screen and (max-width: 700px) {
  .centerContent {
    padding: 1rem 1rem;
  }
  #top {
    align-items: center;
  }
  #top .text {
    font-size: 2rem;
  }
  #bottom .leftRight {
    margin-top: 2rem;
  }
} */

.autoClick,
.resetCount {
  margin-left: 10px;
  text-decoration: underline;
  padding: 5px;
  border: 1px solid transparent;
  cursor: pointer;
}

.autoClick.confirm {
  text-decoration: none;
  color: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 3px;
}

.subtitleCountTip {
  height: 35px;
  line-height: 35px;
  color: #ffffff;
  position: absolute;
  left: 50%;
  bottom: -2rem;
  font-size: 16px;
  animation: mymove 2s;
  opacity: 0;
  z-index: 22;
}

.fortuneCountTip {
  height: 35px;
  line-height: 35px;
  color: #ffffff;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  animation: fortuneMove 4s;
  opacity: 1;
  top: 0rem;
  width: 100%;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #ffd700;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
  backdrop-filter: blur(5px);
  height: auto;
  max-width: 70%;
  margin: 0 auto;
  transform: translateX(-50%) translateY(-100%);
}

@keyframes mymove {
  from {
    top: -40px;
    opacity: 1;
  }
  50% {
    top: -60px;
    opacity: 1;
  }
  to {
    top: -80px;
    opacity: 0;
  }
}

@keyframes fortuneMove {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.1);
  }
  30% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0.9);
  }
}

#soundState {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 100;
}

#soundState:hover {
  transform: scale(1.1);
}

@keyframes showLingpai {
  0% {
    opacity: 0;
    transform: translateX(-45%) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translateX(-45%) rotate(360deg);
  }
  80% {
    opacity: 1;
    transform: translateX(-45%) rotate(360deg);
  }
  100% {
    opacity: 0;
    transform: translateX(-45%) rotate(360deg);
  }
}

.my-fish img.lingpai.show {
  animation: showLingpai 4s ease-in-out forwards;
}
