@font-face {
  font-family: 'S-CoreDream-6Bold';
  src: url('https://cdn.jsdelivr.net/gh/wizfile/font/S-CoreDream-6Bold.eot');
  src: url('https://cdn.jsdelivr.net/gh/wizfile/font/S-CoreDream-6Bold.woff') format('woff');
  font-style: normal;
}
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@900&display=swap');

:root {
  color-scheme: only light;
  font-size: min(100px, calc(100vh/10.8));
}

html,
body {
  font-family: 'S-CoreDream-6Bold', sans-serif;
  font-size: medium;
  color: #fff;
  margin: 0;
  padding: 0;
}

body {
  background-color: #00022b;
  background-image: url("img/bg.png");
  background-position: center;
  background-repeat: repeat-x;
  background-attachment: fixed;
  margin: 0;
  padding: 0;
  user-select: none;
  overflow: hidden
}

body,
a {
  text-align: center;
}

video,
canvas {
  display: block;
}

button,
input,
select {
  background-color: transparent;
  margin: 0;
  border: 0;
  appearance: none;
  padding-top: 2px;
}

button,
button:focus {
  outline: none
}

a {
  text-decoration: none;
}

button.pressed>img,
button:active>img {
  transform: scale(.97);
}


.minigame-wrapper {
  display: flex;
  width: 100%;
  height: 100vh;
  min-width: 900px;
  min-height: 900px;
  margin: 0 auto;
  position: relative;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.minigame-wrapper::before,
.minigame-wrapper::after {
  content: "";
  display: block;
  flex: 1
}

.minigame-wrapper>* {
  flex: none
}

.minigame-wrapper img {
  display: block;
  width: 100%;
  height: auto
}

.bg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
}

.bg .star[data-idx="1"] {
  width: 25px;
  margin-left: -415px;
  margin-top: -373px
}

.bg .star[data-idx="2"] {
  width: 35px;
  margin-left: 522px;
  margin-top: -381px
}

.bg .star[data-idx="3"] {
  width: 40px;
  margin-left: -597px;
  margin-top: -400px
}

.bg .star[data-idx="4"] {
  width: 21px;
  margin-left: -671px;
  margin-top: -372px
}

.bg .star[data-idx="5"] {
  width: 19px;
  margin-left: 771px;
  margin-top: -307px
}

.bg .star[data-idx="6"] {
  width: 24px;
  margin-left: 852px;
  margin-top: -148px
}

.bg .star[data-idx="7"] {
  width: 35px;
  margin-left: -834px;
  margin-top: -71px
}

.bg .star[data-idx="8"] {
  width: 25px;
  margin-left: -801px;
  margin-top: -29px
}

.bg .star[data-idx="9"] {
  width: 36px;
  margin-left: 800px;
  margin-top: 68px
}

.bg .star[data-idx="10"] {
  width: 11px;
  margin-left: 790px;
  margin-top: 104px
}

.bg .meteor {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0)
}

.bg .meteor>img {
  position: absolute;
  width: 100%;
  height: auto;
  opacity: 1;
  left: 0;
  top: 0
}

.bg .meteor[data-idx="1"] {
  width: 55px;
  height: 55px;
  margin-left: 648px;
  margin-top: -370px
}

.bg .meteor[data-idx="2"] {
  width: 43px;
  height: 43px;
  margin-left: 718px;
  margin-top: -386px
}

.bg .meteor[data-idx="3"] {
  width: 55px;
  height: 55px;
  margin-left: -831px;
  margin-top: -252px
}

.bg .meteor[data-idx="4"] {
  width: 29px;
  height: 29px;
  margin-left: -838px;
  margin-top: 65px
}

.logo {
  display: block;
  width: 254px;
  margin: 0 auto;
}

.game-title.nowrap {
  display: block;
  position: relative;
  width: 560px;
  margin: -9px auto 39px;
}

.container {
  position: relative;
  display: flex;
  width: 100%;
  height: 659px;
  margin: 0 auto;
  z-index: 2;
  flex-direction: column;
  justify-content: center;
}

.copyright {
  display: block;
  width: 311px;
  margin: 40px auto 0;
}


.game-title .star[data-idx="1"] {
  width: 20px;
  left: 354px;
  top: 71px;
}

.game-title .star[data-idx="2"] {
  width: 27px;
  left: 214px;
  top: 35px;
}

.game-title .star[data-idx="3"] {
  width: 22px;
  left: 382px;
  top: 36px;
}

.game-title .star[data-idx="4"] {
  width: 10px;
  left: 375px;
  top: 28px;
}

.game-title .star[data-idx="5"] {
  width: 12px;
  left: 17px;
  top: 19px;
}

.game-title .star[data-idx="6"] {
  width: 15px;
  left: 542px;
  top: 34px;
}

.container .game-console {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.container .game-console>img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1332px;
  height: auto;
  margin-top: -330px;
  margin-left: -666px;
  pointer-events: none;
}

.game-console button {
  position: absolute;
  top: 60px;
  cursor: pointer;
}

.game-console .btn-bgm {
  width: 113px;
  right: 50%;
  margin-right: 465px;
}

.game-console .btn-bgm:active {
  transform: scale(0.98);
}

.game-console .btn-bgm>img {
  opacity: 1;
  transition: opacity .1s;
}

.game-console .btn-bgm::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: url(img/console-btn-bgm-off.png) no-repeat center / contain;
  opacity: 0;
  transition: opacity .1s;
}

.game-console .btn-bgm.off>img {
  opacity: 0;
}

.game-console .btn-bgm.off::before {
  opacity: 1;
}

.game-console .btn-home {
  width: 51px;
  left: 50%;
  margin-left: 458px
}

.game-console .btn-home:active {
  transform: scale(0.95);
}

.game-frame {
  flex: none;
  position: relative;
  width: 880px;
  height: 570px;
  aspect-ratio: 880 / 570;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 12px;
  background: url(img/frame.png) repeat-x center / auto 100%
}

.game-screen {
  width: 100%;
  height: 100%;
  position: relative;
  background: #7825d2;
}

.game-screen::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid #7825d2;
  pointer-events: none;
  z-index: 2
}

.game-screen>.scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  filter: grayscale(1) brightness(0);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transition: opacity 0s .3s, filter 0s .3s
}

.game-screen>.scene.active {
  opacity: 1;
  filter: grayscale(0) brightness(1);
  pointer-events: fill;
  transition: opacity .3s ease-in-out, filter .3s ease-in
}

.language-select-button {
  width: 108px;
  height: auto;
  position: absolute;
  right: 30px;
  top: 20px;
  z-index: 99;
}

.language-select-button .toggle-button,
.language-select-button .language__item {
  font-weight: 400;
  font-size: 19px;
  line-height: 25px;
  padding: 8px 0 7px;
  width: 100%;
  text-align: center;
  cursor: pointer;
  color: #fff;
  letter-spacing: -.06em;
}

.language-select-button .toggle-button {
  border-radius: 9px;
  margin: 0;
  position: relative;
  z-index: 1;
  background-color: #4211bd;
  cursor: pointer;
}

.language-select-button .expander {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: auto;
  overflow: hidden;
  max-height: 0px;
  border-radius: 9px;
  position: absolute;
  left: 0;
  top: 0;
  transition: all .2s linear;
  background-color: #4211bd7a;
  cursor: pointer;
}

.language-select-button.active .expander {
  max-height: 160px;
  padding: 48px 0 12px
}


/* start */
#start {
  background-image: url(img/game-default-bg.png)
}

#start .game-title {
  width: 720px;
  margin: 53px auto;
  position: relative;
}

#start .game-title .star {
  mix-blend-mode: hard-light
}

#start .game-title .star[data-idx="1"] {
  width: 26px;
  left: 32px;
  top: 37px
}

#start .game-title .star[data-idx="2"] {
  width: 57px;
  left: 413px;
  top: 67px
}

#start .game-title .star[data-idx="3"] {
  width: 42px;
  left: 712px;
  top: 123px
}

#start .game-title .star[data-idx="4"] {
  width: 15px;
  left: 180px;
  top: 162px
}

#start .game-title .star[data-idx="5"] {
  width: 39px;
  left: 200px;
  top: 176px
}

#start .game-title .star[data-idx="6"] {
  width: 26px;
  left: 503px;
  top: 186px
}

#start .nav {
  width: 322px;
  margin: 0 auto
}

#start .nav>button {
  display: block;
  padding: 0;
  width: 100%;
  height: 50px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}


#start .nav>button>img {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  top: 0;
}

#start .nav>button:hover>img,
#start .nav>button.focus>img {
  top: -50px
}


/* howto */
#howto {
  background: rgba(0, 0, 0, .8)
}

#howto.active {
  z-index: 2
}

.pop {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 564px;
  transform: translate3d(-50%, -50%, 0) scale(.75);
  opacity: 0;
  transition: opacity .15s ease-out, transform .2s ease-in-out
}

.pop button {
  position: absolute;
  width: 44px;
  right: 36px;
  top: -18px;
  cursor: pointer
}

#howto.active .pop {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1)
}


/* select */
#select {
  background-image: url(img/game-default-bg.png);
}

#select .title {
  width: 395px;
  margin: 37px auto 27px
}

.icon-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 122px);
  gap: 30px;
  justify-content: center;
}

.grid-item {
  width: 100%;
  height: auto;
  position: relative;
  cursor: pointer;

  pointer-events: none;
  /* 마우스 클릭 비활성화 */
}

.grid-item>span {
  display: block;
  width: 100%;
  filter: saturate(0.4);
  transition: filter .15s;
  border-radius: 8px;
  overflow: hidden
}

.grid-item>span::before {
  content: "";
  display: block;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: .2;
  background: #000;
  transition: opacity .15s
}

.grid-item:hover>span,
.grid-item.focus>span {
  filter: saturate(1)
}

.grid-item:hover>span::before,
.grid-item.focus>span::before {
  opacity: 0
}

.grid-item::before,
.grid-item::after {
  content: "";
  position: absolute;
  display: none;
}

.grid-item::after {
  bottom: 122px;
  width: 41px;
  height: 37px;
  left: 41px;
  background: url(img/game-select-arrow.png) no-repeat center / contain;
}

.grid-item::before {
  bottom: -22px;
  width: 155px;
  height: 155px;
  left: -16px;
  background: url(img/game-select-current.png) no-repeat center / contain
}

.grid-item .stamp {
  position: absolute;
  display: none;
  width: 56px;
  height: 56px;
  left: -21px;
  top: -21px;
  background: url(img/game-select-stamp.png) no-repeat center top / 100% auto
}

.grid-item:hover::before,
.grid-item.focus::before,
.grid-item.focus::after {
  display: block
}

.grid-item.cleared .stamp {
  display: block;
}

.grid-item.focus .stamp {
  background-position-y: bottom
}


/* clear */
#clear {
  background-image: url(img/game-clear-bg.png)
}

#clear.active {
  z-index: 2
}

#clear .clear-bg,
#clear .effect,
#clear .btns {
  z-index: 1;
  position: absolute;
  width: 100%;
  left: 0;
}

#clear .clear-bg,
#clear .effect {
  top: 0;
  height: 100%;
}

#clear .btns {
  bottom: 27px;
}

#clear .clear-bg {
  overflow: hidden
}

#clear .clear-bg.back {
  z-index: 0;
}

#clear .clear-bg.back::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid #7825d2;
  pointer-events: none;
  z-index: 1
}


#clear .mov {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

#clear .record {
  position: absolute;
  width: 183px;
  top: 53.45%;
  opacity: 0;
  transform: translate3d(0, -40%, 0);
  transition: all .5s ease-out;
}

#clear .record>span {
  position: absolute;
  font-family: "Noto Sans", sans-serif;
  /*font-family: "Orbitron", sans-serif;*/
  width: 100%;
  text-align: center;
  top: 43.5%;
  font-size: 50px;
  line-height: 56px;
  z-index:2;
  left: 0;
  font-weight: 900;
  letter-spacing: -.05em;
  text-shadow:0 0 1px rgba(255,255,255,.15)
}

#clear .record span::before{
  content: attr(data-text);
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  text-align:center;
  font:inherit;
  z-index: -1;
  filter: blur(7px);
  opacity: 1;  
  color:#b121e4;
  text-shadow:0 0 1px rgba(0,0,0,.7);
  mix-blend-mode: overlay;
}

#clear .record.current {
  left: 66px
}
#clear .record.current span{
  background: linear-gradient(180deg, #e193f2 45%, #ffffff 100%); 
  color:transparent;
  -webkit-background-clip: text;
  background-clip: text;
}
#clear .record.best {
  right: 66px
}
#clear .record.best span{
  background: linear-gradient(180deg, #fca3f4 45%, #ffffff 100%); 
  color:transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

#clear.active .record {
  opacity: 1;
  transform: translate3d(0, -50%, 0);
  transition-delay: .35s
}


#clear .light {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1100px;
}

#clear .light.l1 {
  mix-blend-mode: screen;
}

#clear .light.l2 {
  mix-blend-mode: color-dodge;
}

#clear .light.l1>img {
  transform: rotate(5deg);
}

#clear .light.l2>img {
  transform: rotate(-5deg);
}

#clear .bokeh {
  position: absolute
}

#clear .bokeh {
  mix-blend-mode: lighten;
  width: 976px;
  left: -64px;
  top: -25px
}

#clear .title {
  position: relative;
  width: 771px;
  margin: -30px auto 0
}

#clear .title::before,
#clear .title::after {
  content: "";
  mix-blend-mode: lighten;
  display: block;
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  height: 162px;
  transform: translate3d(-50%, -50%, 0);
}

#clear .title::before {
  width: 392px;
  top: 95px;
  background-image: url(img/game-clear-title-light-1.png)
}

#clear .title::after {
  width: 837px;
  top: 154px;
  background-image: url(img/game-clear-title-light-2.png)
}

#clear .btns>button {
  display: block;
  width: 270px;
  margin: 0 auto
}

#clear .star {
  top: 100%;
  left: 50%;
}

#clear .star[data-idx="1"] {
  width: 89px;
}

#clear.active .star[data-idx="1"] {
  margin-left: 300px;
  margin-top: -10px;
}

#clear .star[data-idx="2"] {
  width: 115px;
}

#clear.active .star[data-idx="2"] {
  margin-left: -286px;
  margin-top: -93px;
}

#clear .star[data-idx="3"] {
  width: 97px;
}

#clear.active .star[data-idx="3"] {
  margin-left: 404px;
  margin-top: -358px;
}

#clear .star[data-idx="4"] {
  width: 82px;
}

#clear.active .star[data-idx="4"] {
  margin-left: -352px;
  margin-top: -338px;
}

#clear .star[data-idx="5"] {
  width: 59px;
}

#clear.active .star[data-idx="5"] {
  margin-left: -340px;
  margin-top: -44px;
}

#clear .star[data-idx="6"] {
  width: 57px;
}

#clear.active .star[data-idx="6"] {
  margin-left: 251px;
  margin-top: -283px;
}

#clear .star[data-idx="7"] {
  width: 46px;
}

#clear.active .star[data-idx="7"] {
  margin-left: -418px;
  margin-top: -187px;
}

#clear .star[data-idx="8"] {
  width: 42px;
}

#clear.active .star[data-idx="8"] {
  margin-left: 339px;
  margin-top: -183px;
}

#clear .star[data-idx="9"] {
  width: 39px;
}

#clear.active .star[data-idx="9"] {
  margin-left: -241px;
  margin-top: -253px;
}

#clear .star[data-idx="10"] {
  width: 28px;
}

#clear.active .star[data-idx="10"] {
  margin-left: 368px;
  margin-top: -33px;
}

#clear .star[data-idx="11"] {
  width: 28px;
}

#clear.active .star[data-idx="11"] {
  margin-left: 230px;
  margin-top: -249px;
}

#clear .star[data-idx="12"] {
  width: 23px;
}

#clear.active .star[data-idx="12"] {
  margin-left: -331px;
  margin-top: -363px;
}



/* fail */
#fail {
  background-image: url(img/game-fail-bg.png)
}

#fail .scene-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 33px;
  justify-content: center;
  align-items: center;
}

#fail .scene-inner::before,
#fail .scene-inner::after {
  content: "";
  display: block;
  flex: 1
}

#fail .btns {
  flex: none;
  width: 348px;
  margin: 0 auto 11px;
}

.fail-message {
  margin: 0 auto;
  width: 535px;
  flex: none;
}

#fail .btns button {
  padding: 0;
  position: relative
}

#fail .btns button>img {
  opacity: 1;
  transition: opacity .1s
}

#fail .btns button::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0;
  transition: opacity .1s
}

#btn_replay:lang(kr)::before {
  background-image: url(img/kr/game-btn-replay-focused.png)
}
#btn_fail_redo:lang(kr)::before {
  background-image: url(img/kr/game-btn-select-focused.png)
}
#btn_clear_redo:lang(kr)::before {
  background-image: url(img/kr/game-btn-select-focused.png)
}

#btn_replay:lang(en)::before {
  background-image: url(img/en/game-btn-replay-focused.png)
} 
#btn_fail_redo:lang(en)::before {
  background-image: url(img/en/game-btn-select-focused.png)
}
#btn_clear_redo:lang(en)::before {
  background-image: url(img/en/game-btn-select-focused.png)
}

#btn_replay:lang(jp)::before {
  background-image: url(img/jp/game-btn-replay-focused.png)
}
#btn_fail_redo:lang(jp)::before {
  background-image: url(img/jp/game-btn-select-focused.png)
}
#btn_clear_redo:lang(jp)::before {
  background-image: url(img/jp/game-btn-select-focused.png)
}

#btn_replay.zh_hant::before,
#btn_replay:lang(zh_hant)::before {
  background-image: url(img/zh_hant/game-btn-replay-focused.png)
}

#btn_fail_redo.zh_hant::before,
#btn_fail_redo:lang(zh_hant)::before {
  background-image: url(img/zh_hant/game-btn-select-focused.png)
}

#btn_clear_redo.zh_hant::before,
#btn_clear_redo:lang(zh_hant)::before {
  background-image: url(img/zh_hant/game-btn-select-focused.png)
}



#fail .btns button+button {
  margin-top: 11px
}

#fail button.focus>img {
  opacity: 0
}

#fail button.focus::before {
  opacity: 1
}

#fail button.pressed>img,
#fail button:active>img,
#fail button.pressed::before,
#fail button:active::before {
  transform: scale(.97);
}


/* Motion */

@keyframes star-blink-ani {

  0% {
    transform: scale(0.65);
    opacity: .6
  }

  50% {
    opacity: 1
  }

  100% {
    transform: scale(1.02);
    opacity: 1
  }

}

@keyframes bg-star-ani-1 {

  0%,
  10% {
    clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%)
  }

  15% {
    clip-path: polygon(15% 15%, 85% 15%, 85% 85%, 15% 85%)
  }

  20%,
  90% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
}

@keyframes bg-star-ani-2 {

  0%,
  10% {
    clip-path: polygon(50% 40%, 50% 40%, 50% 40%, 50% 40%)
  }

  15% {
    clip-path: polygon(15% 10%, 85% 10%, 85% 75%, 15% 75%)
  }

  20%,
  90% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
}

@keyframes bg-blink-ani {
  0% {
    clip-path: polygon(46% 46%, 54% 46%, 54% 54%, 46% 54%)
  }

  20%,
  80% {
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  }
}

@keyframes meteor-fall-ani {

  0%,
  82% {
    left: 0;
    top: 0;
    opacity: 1
  }

  85% {
    left: -100%;
    top: 100%;
  }

  87% {
    opacity: 0
  }

  90%,
  96% {
    left: 100%;
    top: -100%;
    opacity: 0
  }

  100% {
    left: 0;
    top: 0;
    opacity: 1
  }
}

@keyframes select-arrow-ani {

  0% {
    transform: rotateY(0);
  }

  75%,
  100% {
    transform: rotateY(180deg);
  }

}

@keyframes clear-light-ani1 {
  0% {
    transform: rotate(5deg);
  }

  100% {
    transform: rotate(-5deg);
  }
}

@keyframes clear-light-ani2 {
  0% {
    transform: rotate(-5deg);
  }

  100% {
    transform: rotate(5deg);
  }
}

@keyframes clear-title-light-1 {
  0% {
    left: 100%;
    opacity: 0
  }

  5% {
    opacity: 0
  }

  15%,
  50% {
    left: 35%;
    opacity: 1
  }

  60% {
    opacity: 0
  }

  70% {
    left: 0;
    opacity: 0
  }
}

@keyframes clear-title-light-2 {
  0% {
    left: 0;
    opacity: 0
  }

  5% {
    opacity: 0
  }

  15%,
  50% {
    left: 65%;
    opacity: 1
  }

  60% {
    opacity: 0
  }

  70% {
    left: 100%;
    opacity: 0
  }
}



.minigame-wrapper .star {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  pointer-events: none;

}

.minigame-wrapper .star.ani>img {
  display: block;
  transform: scale(0);
  opacity: 0;
  animation-name: star-blink-ani;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}


.logo {
  opacity: 0
}

.init .logo {
  opacity: 1;
  transition: opacity .4s .8s;
}

.game-title.nowrap {
  transform: translate3d(0, 25%, 0);
  opacity: 0
}

.game-title.nowrap .star>img {
  transform: scale(0);
  opacity: 0;
}

.init .game-title.nowrap {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  transition: transform .45s .4s ease-out, opacity .25s .35s;
}

.init .game-title.nowrap .star>img {
  transform: scale(1);
  opacity: 1;
  transition: transform .2s ease-in-out, opacity .15s ease-in-out
}

.init .game-title.nowrap .star[data-idx="1"]>img {
  transition-delay: .95s
}

.init .game-title.nowrap .star[data-idx="2"]>img {
  transition-delay: 1.02s
}

.init .game-title.nowrap .star[data-idx="3"]>img {
  transition-delay: 1.07s
}

.init .game-title.nowrap .star[data-idx="4"]>img {
  transition-delay: 1.1s
}

.init .game-title.nowrap .star[data-idx="5"]>img {
  transition-delay: 1.15s
}

.init .game-title.nowrap .star[data-idx="6"]>img {
  transition-delay: 1.15s
}

.game-console,
.game-frame {
  transform: scale(1.03);
  opacity: 0
}

.init .game-console,
.init .game-frame {
  transform: scale(1);
  opacity: 1;
  transition: transform .75s .15s ease-out, opacity .3s .2s ease-out;
}

.copyright {
  opacity: 0
}

.init .copyright {
  opacity: 1;
  transition: opacity .4s .8s;
}


.bg .star {
  overflow: hidden;
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%);
  transform: translate(-50%, -50%) scale(0);
}

.bg .meteor {
  overflow: hidden;
  clip-path: polygon(100% 0%, 100% 0%, 100% 0%, 100% 0%)
}

.init .bg .star {
  transform: translate(-50%, -50%) scale(1);
  animation-iteration-count: infinite;
  animation-direction: forwards;
}

.init .bg .meteor {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  transition: clip-path .4s steps(10)
}

.init .bg .meteor>img {
  animation-name: meteor-fall-ani;
  animation-timing-function: cubic-bezier(.1, .7, .48, 1);
  animation-iteration-count: infinite;
  animation-direction: forwards;
}

.init .bg .star[data-idx="1"] {
  animation-name: bg-star-ani-2;
  animation-delay: .4s;
  animation-duration: 3.3s;
  animation-timing-function: steps(3);
}

.init .bg .star[data-idx="2"] {
  animation-name: bg-star-ani-1;
  animation-delay: .45s;
  animation-duration: 3.5s;
  animation-timing-function: steps(4);
}

.init .bg .star[data-idx="3"] {
  animation-name: bg-star-ani-2;
  animation-delay: .6s;
  animation-duration: 4s;
  animation-timing-function: steps(4);
}

.init .bg .star[data-idx="4"] {
  animation-name: bg-blink-ani;
  animation-delay: .95s;
  animation-duration: 3.2s;
  animation-timing-function: steps(4);
}

.init .bg .star[data-idx="5"] {
  animation-name: bg-star-ani-2;
  animation-delay: .7s;
  animation-duration: 3.1s;
  animation-timing-function: steps(4)
}

.init .bg .star[data-idx="6"] {
  animation-name: bg-blink-ani;
  animation-delay: .85s;
  animation-duration: 4s;
  animation-timing-function: steps(4)
}

.init .bg .star[data-idx="7"] {
  animation-name: bg-star-ani-1;
  animation-delay: .9s;
  animation-duration: 3.8s;
  animation-timing-function: steps(4)
}

.init .bg .star[data-idx="8"] {
  animation-name: bg-star-ani-2;
  animation-delay: 1.15s;
  animation-duration: 3.5s;
  animation-timing-function: steps(5)
}

.init .bg .star[data-idx="9"] {
  animation-name: bg-star-ani-2;
  animation-delay: 1.1s;
  animation-duration: 4.1s;
  animation-timing-function: steps(5)
}

.init .bg .star[data-idx="10"] {
  animation-name: bg-blink-ani;
  animation-delay: 1.5s;
  animation-duration: 2.4s;
  animation-timing-function: steps(3)
}

.init .bg .meteor[data-idx="1"] {
  transition-delay: .7s
}

.init .bg .meteor[data-idx="2"] {
  transition-delay: .75s
}

.init .bg .meteor[data-idx="3"] {
  transition-delay: .8s
}

.init .bg .meteor[data-idx="4"] {
  transition-delay: .85s
}

.init .bg .meteor[data-idx="1"]>img {
  animation-duration: 10.5s;
  animation-delay: 1.8s
}

.init .bg .meteor[data-idx="2"]>img {
  animation-duration: 9.5s;
  animation-delay: 2.4s
}

.init .bg .meteor[data-idx="3"]>img {
  animation-duration: 12s;
  animation-delay: 7.5s
}

.init .bg .meteor[data-idx="4"]>img {
  animation-duration: 8s;
  animation-delay: 3.5s
}


#start .game-title {
  opacity: 0;
  transform: translate3d(0, 15%, 0)
}

#start .nav {
  opacity: 0;
  transform: translate3d(0, 20%, 0)
}

.init #start.active .game-title,
.init #start.active .nav {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.init #start.active .game-title {
  transition: all .5s .5s ease-out
}

.init #start.active .nav {
  transition: all .35s .8s ease-out
}


.init #start.active .game-title .star[data-idx="1"]>img {
  animation-duration: .8s;
  animation-delay: .5s;
}

.init #start.active .game-title .star[data-idx="2"]>img {
  animation-duration: 1.25s;
  animation-delay: .15s;
  animation-direction: alternate-reverse;
}

.init #start.active .game-title .star[data-idx="3"]>img {
  animation-duration: 1.15s;
  animation-delay: .3s;
}

.init #start.active .game-title .star[data-idx="4"]>img {
  animation-duration: .7s;
  animation-delay: .45s;
  animation-direction: alternate-reverse;
}

.init #start.active .game-title .star[data-idx="5"]>img {
  animation-duration: 1.1s;
  animation-delay: .4s;
}

.init #start.active .game-title .star[data-idx="6"]>img {
  animation-duration: .95s;
  animation-delay: .35s;
  animation-direction: alternate-reverse;
}

#select.active .grid-item::after {
  animation: select-arrow-ani .75s .3s infinite linear;
}


#clear .title {
  opacity: 0;
  transform: translate3d(0, 7.5%, 0);
  transition: transform .5s ease-in, opacity .5s ease-in
}

#clear.active .title {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

#clear .btns {
  opacity: 0;
  transform: scale(.9);
  transition: transform .15s .5s ease-in, opacity .15s .5s ease-in
}

#clear.active .btns {
  opacity: 1;
  transform: scale(1);
}

#clear .mov {
  transform: translate3d(0, 5%, 0);
  opacity: 0;
  transition: transform .3s ease-in-out, opacity .2s ease-in-out
}

#clear.active .mov {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  transition-delay: .25s, .25s;
}

#clear .light {
  opacity: 0;
  transition: transform .25s .25s ease-in, opacity .4s .25s ease-in
}

#clear .light.l1 {
  transform: translate3d(-50%, -50%, 0) scale(0.5) rotateX(180deg)
}

#clear .light.l2 {
  transform: translate3d(-50%, -50%, 0) scale(0.5)
}

#clear.active .light.l1 {
  opacity: .3;
  transform: translate3d(-50%, -50%, 0) scale(1) rotateX(180deg);
}

#clear.active .light.l2 {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1)
}

#clear.active .light.l1>img {
  animation: clear-light-ani1 3s .35s infinite linear alternate-reverse
}

#clear.active .light.l2>img {
  animation: clear-light-ani2 3s .35s infinite linear alternate
}

#clear .star {
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.3);
  transition: all .25s cubic-bezier(.1, .7, .48, 1), opacity .2s
}

#clear.active .star {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
  transition-delay: .2s
}

#clear.active .star[data-idx="1"]>img {
  animation-duration: .95s;
  animation-delay: .85s;
}

#clear.active .star[data-idx="2"]>img {
  animation-duration: 1.15s;
  animation-delay: .35s;
}

#clear.active .star[data-idx="3"]>img {
  animation-duration: 1.05s;
  animation-delay: .6s;
}

#clear.active .star[data-idx="4"]>img {
  animation-duration: 1s;
  animation-delay: .7s;
}

#clear.active .star[data-idx="5"]>img {
  animation-duration: .85s;
  animation-delay: .65s;
}

#clear.active .star[data-idx="6"]>img {
  animation-duration: .8s;
  animation-delay: .55s;
}

#clear.active .star[data-idx="7"]>img {
  animation-duration: .9s;
  animation-delay: .4s;
}

#clear.active .star[data-idx="8"]>img {
  animation-duration: .8s;
  animation-delay: .9s;
}

#clear.active .star[data-idx="9"]>img {
  animation-duration: .65s;
  animation-delay: 1s;
}

#clear.active .star[data-idx="10"]>img {
  animation-duration: .7s;
  animation-delay: .5s;
}

#clear.active .star[data-idx="11"]>img {
  animation-duration: .6s;
  animation-delay: .4s;
}

#clear.active .star[data-idx="12"]>img {
  animation-duration: .6s;
  animation-delay: .25s;
}


#clear .title::before {
  opacity: 0;
  left: 0;
}

#clear .title::after {
  opacity: 0;
  left: 100%;
}

#clear.active .title::before {
  animation: clear-title-light-1 3s .5s ease-in-out infinite;
}

#clear.active .title::after {
  animation: clear-title-light-2 3s .5s ease-in-out infinite;
}

/*// Motion */


/* play */
#play {
  background: #000;
  display: flex;
  flex-direction: column;
}

canvas {
  image-rendering: pixelated;
}

.hud-overlay {
  width: 100%;
  height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  z-index: 5;
  pointer-events: none;
  background-color: #ffffff;
  flex: none;
  display: flex
}

#game-container {
  position: relative;
  flex: 1;
}

.hud-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #8915e2;
  height: 100%;
  padding: 0 16px 0 14px;
  border-radius: 0 15px 15px 0;
  color: #ffffff;
  width: 116px;
  justify-content: space-between;
  box-sizing: border-box;
}

.hud-time-label,
.hud-time-value {
  color: inherit;
}

.hud-time-value {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.hud-gauge {
  flex: 1;
  display: flex;
  gap: 12px;
}

.hud-gauge-track {
  position: relative;
  flex: 1;
  height: 14px;
  background: #cdb5ce;
  border-radius: 999px;
  margin-top: 4px;
  overflow: hidden;
}

.hud-gauge-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #8d14e3 0%, #ff00fc 100%);
  border-radius: 0 999px 999px 0;
  --fill-percent: 0%;
  clip-path: inset(0 calc(100% - var(--fill-percent)) 0 0 round 0 999px 999px 0);
}

.hud-gauge-percent {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 600;
  font-size: 18px;
  width: 42px;
  text-align: right;
  color: #da00ff;
  padding-right: 16px;
}