* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  --background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, .8));
  --perfect-color: rgba(255, 101, 229, .8);
  --good-color: rgba(82, 236, 51, .8);
  --bad-color: rgba(207, 53, 53, .8);
  --miss-color: rgba(199, 184, 184, .8);
  --maxcombo-color: rgba(0, 110, 255, .8);
  --score-color: rgba(240, 202, 36, .8);
  /* --hit-effect: linear-gradient(to bottom, rgba(255, 255, 255, .5), rgba(255, 255, 255, .3)); */
  --hit-color: rgba(255, 255, 255, .8);
  --key-red: rgba(214, 48, 49, 1);
  --key-pink: rgba(232, 67, 147, 1);
  --key-blue: rgba(9, 132, 227, 1);
  --key-yellow: rgba(253, 203, 110, 1);
  --key-purple: rgba(108, 92, 231, 1);
  --keypress-red: linear-gradient(to top, rgba(214, 48, 49, .6), rgba(214, 48, 49, 0));
  --keypress-pink: linear-gradient(to top, rgba(232, 67, 147, .6), rgba(232, 67, 147, 0));
  --keypress-blue: linear-gradient(to top, rgba(9, 132, 227, .6), rgba(9, 132, 227, 0));
  --keypress-purple: linear-gradient(to top, rgba(108, 92, 231, .6), rgba(108, 92, 231, 0));
  --keypress-yellow: linear-gradient(to top, rgba(253, 203, 110, .6), rgba(253, 203, 110, 0));
}

html {
  font-size: 62.5%;
}

body {
  font-family: "Quicksand";
  background-image: url('/assets/nice-try/bg-2.png');
  background-size: cover;
  overflow: hidden;
}

main {
  height: 100dvh;
  width: 100vw;
  display: flex;
}

h2 {
  padding: 1rem;
  text-transform: uppercase;
}

.game {
  position: relative;
  display: flex;
  flex: 0 0 calc(100% / 1);
  flex-direction: column;
  max-width: 50rem;
  background: url('/assets/nice-try/bg.jpg');
  background-size: cover;
  margin: 0 auto;
  position: relative;
}

.hit {
  position: absolute;
  width: 50%;
  height: 20%;
  top: 50%;
  left: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
}

.hit__combo {
  width: 100%;
  height: 50%;
  font-size: 7rem;
  color: rgba(255, 199, 126, .8);
}

.hit__accuracy {
  position: absolute;
  width: 100%;
  height: 50%;
  font-size: 4rem;
}

.hit__accuracy--perfect {
  color: var(--perfect-color);
  opacity: 0;
  animation: fade 1s;
}

.hit__accuracy--good {
  color: var(--good-color);
  opacity: 0;
  animation: fade 1s;
}

.hit__accuracy--bad {
  color: var(--bad-color);
  opacity: 0;
  animation: fade 1s;
}

.hit__accuracy--miss {
  color: var(--miss-color);
  opacity: 0;
  animation: fade 1s;
}

.track-container {
  display: flex;
  flex: 1 0 auto;
}

.menu-container {
  position: absolute;
  width: 100%;
  height: 100%;
  width: 100%;
  height: 100%;
  color: white;
  text-align: center;
  z-index: 99;
}

.track {
  position: relative;
  flex: 0 0 calc(100% / 5);
}

.track:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.8);
}

.key-container {
  display: flex;
  flex: 0 0 15%;
  z-index: 999;
}

.key {
  flex: 0 0 calc(100% / 5);
  border-left: 1px solid rgba(255,255,255,0.8);
  border-right: 1px solid rgba(255,255,255,0.8);
  text-align: center;
  position: relative;
  font-size: 1.6rem;
  cursor: pointer;
}

.key--pink {
  background: rgba(232, 67, 147, .8);
  background-image: url('/assets/nice-try/nay.png');
  background-size: 300%;
  background-position: center 5px;
  background-repeat: no-repeat;
}

.key--yellow {
  background: rgba(253, 203, 110, .8);
  background-image: url('/assets/nice-try/heni.png');
  background-size: 300%;
  background-position: center 5px;
  background-repeat: no-repeat;
}

.key--red {
  background: rgba(214, 48, 49, .8);
  background-image: url('/assets/nice-try/ody.png');
  background-size: 300%;
  background-position: center 5px;
  background-repeat: no-repeat;
}

.key--blue {
  background: rgba(9, 132, 227, .8);
  background-image: url('/assets/nice-try/dechan.png');
  background-size: 300%;
  background-position: center 5px;
  background-repeat: no-repeat;
}

.key--purple {
  background: rgba(108, 92, 231, .8);
  background-image: url('/assets/nice-try/indie.png');
  background-size: 300%;
  background-position: center 5px;
  background-repeat: no-repeat;
}

.key span {
  font-weight: bold;
  writing-mode: vertical-lr;
  text-orientation: upright;
  padding-top: .5rem;
}

.note {
  position: absolute;
  width: 100%;
  height: 2rem;
  top: -1.5rem;
}

.keypress {
  position: absolute;
  width: 100%;
  height: 100%;
  top: -100%;
  display: none;
}

.key__hit {
  position: absolute;
  width: 2rem;
  height: 2rem;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: 0 0;
  background: var(--hit-color);
  opacity: 0;
  border-radius: 50%;
  animation: scaleFade 1s;
}

.key__hit:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid var(--hit-color);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: scaleBorder 1s;
}

.keypress--red {
  background-image: var(--keypress-red);
}

.keypress--pink {
  background-image: var(--keypress-pink);
}

.keypress--blue {
  background-image: var(--keypress-blue);
}

.keypress--purple {
  background-image: var(--keypress-purple);
}

.keypress--yellow {
  background-image: var(--keypress-yellow);
}

.menu {
  opacity: 1;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc(100% / 2);
  font-size: 2rem;
  color: white;
  text-align: center;
  justify-content: space-around;
  transition: all 1s;
  padding-top: 200px;
}

.menu__config {
  display: flex;
  justify-content: space-around;
}

.menu_start {
  z-index: 99;
}

.heart {
  color: rgb(255, 59, 59);
}

.author {
  text-decoration: underline;
  color: white;
}

.btn:link,
.btn:visited {
  display: inline-block;
  border: 1px solid white;
  font-size: 1.6rem;
  text-transform: uppercase;
  text-decoration: none;
  transition: all .2s;
  color: white;
  margin: 0 auto;
  transition: all .2s;
}

.btn:hover,
.btn:active {
  /* background: white; */
  /* color: black; */
}

.btn--small {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  line-height: 7rem;
  vertical-align: center;
}

.btn--start {
  font-size: 3rem !important;
  color: var(--key-pink) !important;
  font-weight: bold !important;
}

.btn--primary {
  border-radius: 1rem;
  padding: 2rem 4rem;
}

.config__speed .btn--selected {
  background: white;
  color: black;
}

.config__challenge .btn--selected {
  background: white;
  color: black;
}

.summary {
  position: absolute;
  width: 50%;
  height: 100%;
  left: 50%;
  color: white;
  text-align: center;
  z-index: -100;
}

.summary__timer {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  font-size: 6rem;
  opacity: 0;
  transition: all .1s;
  color: rgba(108, 92, 231, .8);
  z-index: 99;
}

.summary__result {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 80%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  opacity: 0;
  transition: all 2s;
  background-color: rgba(255, 255, 255, .9);
  padding-bottom: 1rem;
  padding-top: 1rem;
  border-radius: 3%;
}

.result__heading {
  font-size: 3rem;
  padding: 2rem;
  padding-top: .3rem;
  color: var(--key-pink);
  padding-bottom: 0;
}

.result__accuracy {
  display: flex;
  font-size: 2rem;
  padding: .3rem;
  justify-content: center;
}

.accuracy__heading {
  flex: 0 0 45%;
  text-align: left;
}

.accuracy__count {
  flex: 0 0 45%;
  text-align: right;
}

.perfect {
  color: var(--key-purple);
}

.good {
  color: var(--key-blue);
}

.bad {
  color: var(--key-red);
}

.miss {
  color: var(--miss-color);
}

.combo {
  color: var(--key-pink);
}

.score {
  color: var(--key-yellow);
}

.high-score {
  color: var(--key-yellow);
  font-weight: bold;
}

.nice-try-img {
  width: 100%;
  height: 180px;
  background-image: url('/assets/nice-try/nice-try.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.cherry-wish-img {
  width: 100%;
  height: 50px;
  background-image: url('/assets/nice-try/cherry-wish.png');
  background-size: 25%;
  background-position: center center;
  background-repeat: no-repeat;
  margin-top: 10px;
}

@keyframes moveDown {
  0% { top: -1.5rem; }
  98% { top: 100%; opacity: 1; }
  100% { top: 105%; opacity: 0; }
}

@keyframes moveDownFade {
  0% { top: -1.5rem; }
  60% { opacity: 1; }
  80% { opacity: 0; }
  98% { top: 100%; opacity: 0; }
  100% { top: 105%; opacity: 0; }
}

@keyframes fade {
  10% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes scaleFade {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    width: 4rem;
    height: 4rem;
  }
}

@keyframes scaleBorder {
  100% {
    width: 10rem;
    height: 10rem;
    border: 2px solid transparent;
  }
}