@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: #111;
  --main-color: #eee;
  --caret-color: #eee;
  --sub-color: #444;
  --text-color: #eee;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font);
  display: flex;
  justify-content: center;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
}

.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.3;
}

.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%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 4.5rem;
  box-sizing: border-box;
}

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

.topBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1rem;
}

.languageSwitch {
  display: flex;
  gap: 0.5rem;
}

.langBtn {
  background: var(--sub-color);
  color: var(--text-color);
  border: none;
  border-radius: var(--roundness);
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.langBtn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.langBtn.active {
  background: var(--text-color);
  color: var(--bg-color);
}

#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;
  align-items: center;
}

.score {
  font-family: var(--logo-font);
  text-align: center;
  width: 100%;
  font-size: 10rem;
  line-height: 10rem;
  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;
}

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

#center {
  display: flex;
  justify-content: center;
}

#center .myFish {
  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: 120px;
  height: auto;
}

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

#bottom .keyTips {
  display: flex;
  justify-content: center;
  align-items: center;
}

#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: space-between;
  align-items: center;
}

#bottom .left {
  font-size: 12px;
}

#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: 0.5rem 1rem;
  }

  #top {
    align-items: center;
  }

  #top .logo {
    font-size: 2rem;
  }

  #top .logo .text {
    font-size: 2rem;
    margin-left: 0.5rem;
  }

  .languageSwitch {
    gap: 0.3rem;
  }

  .langBtn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .score {
    font-size: 6rem;
    line-height: 6rem;
  }

  .score .subtitle {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  #center .myFish {
    width: 90px;
    height: auto;
  }

  .pepe {
    width: 100px;
    height: auto;
    right: 5px;
    bottom: 48%;
  }

  .interaction-container {
    gap: 15px;
    max-width: 100%;
    overflow: visible;
  }

  #bottom {
    font-size: 0.8rem;
    padding: 0 10px;
  }

  #bottom .keyTips {
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
  }

  #bottom .keyTips key {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
    margin: 0.1rem 0.2rem;
  }

  .footerCenter {
    margin-top: 1rem;
  }

  .textButton {
    padding: 0.4rem;
    font-size: 0.85rem;
  }

  .textButton svg {
    width: 16px;
    height: 16px;
  }
}

/* Extra small mobile devices */
@media only screen and (max-width: 480px) {
  .centerContent {
    padding: 0.3rem 0.8rem;
  }

  #top .logo {
    font-size: 1.6rem;
  }

  #top .logo .text {
    font-size: 1.6rem;
    margin-left: 0.3rem;
  }

  .topBar {
    margin-bottom: 0.5rem;
  }

  .languageSwitch {
    gap: 0.25rem;
  }

  .langBtn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .score {
    font-size: 4.5rem;
    line-height: 4.5rem;
  }

  .score .subtitle {
    font-size: 1.2rem;
    line-height: 1.6rem;
  }

  #center .myFish {
    width: 75px;
  }

  .pepe {
    width: 85px;
    right: 0;
    bottom: 46%;
  }

  .interaction-container {
    gap: 12px;
  }

  #bottom {
    font-size: 0.7rem;
  }

  #bottom .keyTips key {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
  }

  .textButton {
    padding: 0.3rem;
    font-size: 0.75rem;
  }

  .textButton svg {
    width: 14px;
    height: 14px;
  }
}

.autoClick {
  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%;
  font-size: 16px;
  animation: mymove 1s;
  opacity: 0;
}

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

.centerContent #center {
  position: relative;
}

.footerCenter {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}

.pepe-container {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 1;
}

.interaction-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.pepe {
  position: absolute;
  right: -5px;
  bottom: 50%;
  transform: translateY(50%);
  width: 180px;
  height: auto;
  transition: all 0.2s;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.1));
  user-select: none;
  -webkit-user-drag: none;
}

.pepe-reaction {
  animation: pepeReaction 0.5s ease;
}

@keyframes pepeReaction {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.2) rotate(-10deg);
  }
  50% {
    transform: scale(1.1) rotate(10deg);
  }
  75% {
    transform: scale(1.2) rotate(-5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.pepe:active {
  transform: scale(0.95);
}

.pepe-happy {
  animation: pepeHappy 0.5s ease;
}

@keyframes pepeHappy {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1);
  }
}