@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&display=swap");
body {
  padding: 0;
  margin: 0;
}

#full-area {
  width: 100%;
  height: 100vh;
  background: #000;
  position: absolute;
  overflow: hidden;
  user-select: none;
}

#game-area {
  position: absolute;
  width: 1280px;
  height: 720px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
}

.overrideResize {
  transform: translate(-50%, -50%) scale(1) !important;
}

#home-section {
  width: 1280px;
  height: 720px;
  position: absolute;
  z-index: 40;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#home-right {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
}

#logo {
  height: 470px;
  justify-content: center;
  display: flex;
  animation: logoAnim 1.3s infinite;
}

#gameContainer {
  width: 1280px;
  height: 720px;
  position: absolute;
  overflow: hidden;
  margin: 0 auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
}

#renderCanvas {
  position: relative;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
  z-index: 20;
  background: transparent !important;
}

.game-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  opacity: 0;
  transition: opacity 250ms ease-out;
}

.game-ui.is-live {
  opacity: 1;
}

.hud-box {
  box-sizing: border-box;
  width: 220px;
  height: 80px;
  border: 3px solid #ffd23f;
  border-radius: 18px;
  background: #3a1152;
  opacity: 0.95;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-box__header {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  border-radius: 17px;
  border: 2px solid #ffeeb0;
  background: #cc2525;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.hud-box__label {
  color: #fff;
  font-size: 20px;
  font-family: "Fredoka", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  margin-top: 2px;
}

.hud-box__value {
  color: #fff;
  font-size: 42px;
  font-family: "Fredoka", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  margin-top: 22px;
}

.hud-box--timer {
  transform: scale(0);
}

.hud-box--timer .hud-box__header {
  background: #1f8f3d;
  border-color: #cdf5d8;
}

#timer {
  font-variant-numeric: tabular-nums;
}

#end-section {
  width: 1280px;
  height: 720px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 999999999 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: rgba(0, 0, 0, 0.2666666667);
  backdrop-filter: blur(3px);
}

.content {
  position: absolute;
  width: 1280px;
  height: 720px;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  transform: scale(0);
}

.end-modal-image {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 560px;
  height: 437px;
  padding-top: 104px;
  padding-bottom: 52px;
  margin-top: 25px;
  z-index: 1;
  background: url("/media/games/voice-through/images/panel.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#end-title {
  position: absolute;
  top: 43px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  color: #4a0d6b;
  font-family: Fredoka;
  font-weight: bold;
  font-size: 40px;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
  z-index: 3;
}

#end-score {
  position: relative;
  top: -6px;
  display: flex;
  gap: 54px;
  align-items: flex-start;
  justify-content: center;
  color: white;
  font-family: Fredoka;
  font-weight: bold;
  margin-top: 0;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

.end-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.end-stat__label {
  font-size: 24px;
  letter-spacing: 2px;
  color: #ffd23f;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.end-stat__value {
  font-size: 72px;
  line-height: 1;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

.end-btns {
  background: none;
  border: none;
  box-shadow: none;
  width: 80%;
  margin-left: 10px;
  margin-top: 10px;
  max-width: 400px;
  text-align: center;
  display: flex;
  gap: 15px;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.end-btns img {
  cursor: pointer;
  transition: all 0.3s;
  width: 300px;
  height: auto;
}

.end-btns span {
  position: absolute;
  color: white;
  font-family: Fredoka;
  font-weight: bold;
  font-size: 38px;
  margin-top: 5px;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #0f7a00, 0 4px 0 #0b5f00, 0 6px 6px rgba(0, 0, 0, 0.35);
}

#endGameBtn {
  text-align: center;
  display: flex;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 600px) {
  #gameContainer {
    width: 800px;
    height: 1180px;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  #home-section {
    width: 800px;
    height: 1180px;
  }
  #logo {
    height: 420px;
    margin-top: 0;
  }
  #end-section {
    width: 800px;
    height: 1180px;
    z-index: 999999999999;
  }
  .content {
    width: 800px;
    height: 1180px;
  }
  .end-modal-image {
    margin-top: 0;
  }
}