@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap");
@supports (height: 100svh) {
  html, body,
  #feature-preview-screen,
  #fps-wrapper {
    height: 100svh !important;
    max-height: 100svh !important;
  }
}
html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.fpsOverlayShadow {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, rgba(21, 55, 91, 0.55) 0, rgba(21, 55, 91, 0) 100px), linear-gradient(to top, rgba(21, 55, 91, 0.7) 0, rgba(21, 55, 91, 0) 150px);
  z-index: 0;
  pointer-events: none;
}

#feature-preview-screen {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.background-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  overflow: hidden;
}

.background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

#sound-toggle {
  display: none;
}

#fps-wrapper {
  display: grid;
  position: relative;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100vh;
  max-height: 100%;
  grid-template-areas: "logo" "feature-block1" "feature-desc1" "start-button";
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  justify-items: center;
  align-items: center;
  box-sizing: border-box;
  padding: max(env(safe-area-inset-top, 0px), 2vh) 0 max(env(safe-area-inset-bottom, 0px), 4vh, 24px) 0;
  row-gap: 2vh;
}

#logo-placeholder {
  grid-area: logo;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

#feature-block1 {
  grid-area: feature-block1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  height: 100%;
  width: 100%;
  overflow: visible;
}

#game-desc1 {
  grid-area: feature-desc1;
  width: 85vw;
  text-align: center;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

#section-button {
  grid-area: start-button;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1vh;
  z-index: 10;
  width: 100%;
  min-height: 0;
}

.logo-image {
  height: 12vh;
  width: auto;
  max-width: 70vw;
  display: block;
  opacity: 0;
  animation: logoBounce 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.feature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: unset;
  overflow: visible;
  transform-origin: center;
}

.feature-image {
  display: block;
  object-fit: contain;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  mix-blend-mode: normal;
  opacity: 0;
  transform: scale(0);
  filter: drop-shadow(0 0 8px rgba(120, 220, 255, 0.8)) drop-shadow(0 0 20px rgba(180, 240, 255, 0.7));
}

.feature-image.character-entrance {
  animation: characterBurst 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, characterIdle 4s ease-in-out 1s infinite;
}

.stacked-block {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.crystal-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: auto;
  height: auto;
  max-width: 130%;
  max-height: 130%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(120, 220, 255, 0.8)) drop-shadow(0 0 20px rgba(180, 240, 255, 0.4));
}

.crystal-backdrop.ice-burst-active {
  animation: backdropBurst 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.subtext {
  display: block;
  text-align: center;
  font-size: clamp(0.6rem, 1.2vw + 1vh, 1.8rem);
  line-height: 1.5;
  font-weight: 900;
  margin: 0;
  padding: 4px 4vw;
  max-width: 85vw;
  width: 100%;
  box-sizing: border-box;
  z-index: 3;
  font-family: "Fredoka", "Nunito", sans-serif;
  text-transform: uppercase;
  word-break: keep-all;
  white-space: normal;
  color: #fff340;
  letter-spacing: 0.8px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 4px rgba(0, 0, 0, 0.4));
}

html:lang(ru) .subtext {
  max-width: 100vw;
}

html:lang(fr) .subtext {
  font-size: clamp(0.55rem, 1.1vw + 0.95vh, 1.6rem);
  letter-spacing: 0;
}

.ice-col-text {
  background: linear-gradient(0deg, #00C7FF 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(0, 199, 255, 0.6));
  font-weight: 900;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: nowrap;
  display: inline;
  vertical-align: baseline;
}

.stroke-ice {
  filter: url(#outer-stroke);
}

.start-fixed-portrait {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(40px, 5vh, 60px);
}

.loading-bar-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40vw;
  height: 20px;
  background: linear-gradient(270deg, #00C7FF 30.29%, #BDF0FF 100%);
  box-shadow: 0 4px 4px 0 #4758A9 inset, 0 4px 4px 0 rgba(48, 58, 105, 0.5);
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid #f8f8f8;
  z-index: 2;
}

.loading-bar {
  height: 90%;
  animation: shimmer 2s linear infinite;
  transition: width 0.3s ease;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFF 0%, #9FEAFF 100%);
  box-shadow: 0 2px 2px 0 #4758A9 inset, 0 2px 2px 0 rgba(48, 58, 105, 0.5);
}

.loading-percent {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: clamp(0.7rem, 0.7vw + 0.7vh, 1.2rem);
  color: #242269;
  font-weight: 800;
  pointer-events: none;
  font-family: "Fredoka", "Nunito", sans-serif;
}

/* START BUTTON */
.start-button {
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 500;
  width: 50vw;
  font-size: clamp(0.5rem, 1vw + 1vh, 1.2rem);
  text-transform: uppercase;
  padding: 2vh 5vw;
  bottom: 1vh;
  text-align: center;
  letter-spacing: 0.05em;
  background: linear-gradient(to right, #99d9ff, #00C7FF, #94e6fa, #00C7FF, #99d9ff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0px rgba(255, 255, 255, 0.5));
  border: none;
  color: white;
  cursor: pointer;
  position: static;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.4s ease;
  animation: shimmerMetallic 6s linear infinite, pulseZoom 4s ease-in-out infinite;
  white-space: nowrap;
  z-index: 5;
}

@keyframes shimmerMetallic {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}
.start-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.start-button:hover {
  transform: scale(1.05);
  filter: brightness(1.2) drop-shadow(0 0 5px rgba(0, 199, 255, 0.5));
}

.glow-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 130%;
  height: 130%;
  max-width: 130%;
  max-height: 130%;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: lighten;
  overflow: visible;
  opacity: 0;
}

.iceberg-deco {
  position: absolute;
  bottom: -15%;
  pointer-events: none;
  z-index: 1;
  animation: icebergFloat 4s ease-in-out infinite;
  mix-blend-mode: lighten;
}
@media (orientation: portrait) {
  .iceberg-deco {
    bottom: -8%;
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .iceberg-deco {
    bottom: -20%;
  }
}

.iceberg-left {
  left: -14%;
  width: clamp(260px, 46vw, 860px);
  animation-delay: 0s;
}
@media (orientation: portrait) {
  .iceberg-left {
    left: -34%;
    width: 90vw;
  }
}

.iceberg-right {
  right: -10%;
  width: clamp(220px, 38vw, 680px);
  animation-delay: 2s;
}
@media (orientation: portrait) {
  .iceberg-right {
    right: -20%;
    width: 60vw;
  }
}

@keyframes icebergFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}
.glow-svg.ice-burst-active {
  animation: backdropBurst 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes shimmerMetallic {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}
@keyframes pulseZoom {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
@keyframes logoBounce {
  0% {
    opacity: 0;
    transform: translateY(-80px);
  }
  40% {
    opacity: 1;
    transform: translateY(0);
  }
  55% {
    transform: translateY(-12px);
  }
  70% {
    transform: translateY(0);
  }
  80% {
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes backdropBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0) rotate(-5deg);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05) rotate(2deg);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.98) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}
@keyframes characterBurst {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-5deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) rotate(2deg);
  }
  80% {
    transform: scale(0.97) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}
@keyframes characterIdle {
  0%, 100% {
    transform: scale(1) translateY(0) rotate(0deg);
  }
  25% {
    transform: scale(1.015) translateY(-1%) rotate(0.8deg);
  }
  50% {
    transform: scale(1.025) translateY(-1.5%) rotate(0deg);
  }
  75% {
    transform: scale(1.015) translateY(-1%) rotate(-0.8deg);
  }
}
@media (orientation: portrait) {
  #fps-wrapper {
    row-gap: 2vh;
    padding: max(env(safe-area-inset-top, 0px), 2vh) 0 max(env(safe-area-inset-bottom, 0px), 4vh, 24px) 0;
  }
  .logo-image {
    height: 10vh;
  }
  .feature-block.small {
    width: min(70vw, 45vh);
    align-self: center;
    justify-content: center;
    position: relative;
    overflow: visible;
  }
  .feature-image {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 45vh;
    object-fit: contain;
  }
  .subtext {
    font-size: clamp(0.8rem, 1.6vw + 1.2vh, 1.8rem);
    line-height: 1.5;
    max-width: 100vw;
  }
  html:lang(fr) .subtext {
    font-size: clamp(0.8rem, 1.6vw + 1.2vh, 1.8rem);
    letter-spacing: 0;
  }
  .start-fixed-portrait {
    position: relative;
    width: 100%;
    height: clamp(40px, 5vh, 60px);
    box-sizing: border-box;
    z-index: 3;
  }
  .loading-bar-wrapper {
    width: 45vw;
    height: 2vh;
  }
  .start-button {
    font-size: clamp(0.5rem, 1vw + 1vh, 1.2rem);
    padding: 2.5vh 0;
    margin: 0 auto;
  }
  .start-button.visible {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (orientation: landscape) {
  #fps-wrapper {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    row-gap: 1vh;
    padding: max(env(safe-area-inset-top, 0px), 1.5vh) max(4vw, env(safe-area-inset-right, 0px)) max(env(safe-area-inset-bottom, 0px), 4vh, 24px) max(4vw, env(safe-area-inset-left, 0px));
  }
  .feature-block.small,
  .stacked-block {
    max-width: 60vh;
    height: 100%;
    min-height: 0;
  }
  .feature-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
  }
  .subtext {
    max-width: 60vw;
  }
  .loading-bar-wrapper {
    width: 20vw;
  }
}
@media (orientation: landscape) and (max-height: 380px) {
  .logo-image {
    height: 10vh;
    margin-top: -18px;
  }
  .feature-block.small,
  .stacked-block {
    max-width: min(80vh, 70vw);
    height: 100%;
    min-height: 0;
  }
  .subtext {
    max-width: 60vw;
    font-size: clamp(0.5rem, 0.9vw + 0.8vh, 1.2rem);
    line-height: 1.3;
    padding: 2px 4vw;
  }
  .start-fixed-portrait {
    height: clamp(32px, 4vh, 48px);
  }
  .start-button {
    padding: 1vh 4vw;
  }
}
