.wrapper {
  position: relative;
  background-color: rgba(142, 229, 63, 1);
  height: 560px;
  width: 340px;
  border-radius: 6px 6px 24px 24px;
  user-select: none;
  font-family: comic sans ms;
}

.wrapper_bottom {
  position: absolute;
  bottom: -2.7%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(142, 229, 63);
  height: 10%;
  width: 95%;
  border-radius: 40%;
}

.left-ridges {
  display: inline-flex;
}

.ridge-common {
  position: absolute;
  width: 8px;
  aspect-ratio: 1 / 1;
  background-color: rgba(142, 229, 63, 1);
  border-radius: 50%;
}

.left-ridges span:nth-child(1) {
  left: -1%;
  top: 7%;
}
.left-ridges span:nth-child(2) {
  left: -1%;
  top: 10%;
}
.left-ridges span:nth-child(3) {
  left: -1%;
  top: 13%;
}
.left-ridges span:nth-child(4) {
  left: -1%;
  top: 16%;
}

.right-ridges {
  display: inline-flex;
}

.right-ridges span:nth-child(1) {
  right: -1%;
  top: 7%;
}
.right-ridges span:nth-child(2) {
  right: -1%;
  top: 10%;
}
.right-ridges span:nth-child(3) {
  right: -1%;
  top: 13%;
}
.right-ridges span:nth-child(4) {
  right: -1%;
  top: 16%;
}

/* POWER BUTTON */
.power-button {
  position: absolute;
  right: -2%;
  top: 22%;
  background-color: rgb(48, 45, 45);
  border: 1px solid transparent;
  border-radius: 0px 2px 2px 0px;
  height: 20px;
  width: 5px;
  cursor: pointer;
  transition: all 0.3s;
}

.power-button-checkbox {
  display: none;
}

.power-button-checkbox:checked + .power-button {
  top: 21%;
}

.power-button-checkbox:checked ~ .screen .power-led {
  background-color: red;
}

.power-button-checkbox:checked ~ .screen .load-logo {
  display: flex;
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  animation: load-text 5s ease;
}

.power-button-checkbox:checked ~ .screen .load-gameboy-text {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%) skewX(-5deg);
  transform-origin: center left;
  filter: brightness(70%);
  animation: load-text 5s ease;
}

@keyframes load-text {
  0%,
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* todo: make animation delay work properly */
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(1) {
  animation: load-gameboy-animation 1s ease-in forwards;
}
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(2) {
  animation: load-gameboy-animation 1.2s ease-in forwards;
}
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(3) {
  animation: load-gameboy-animation 1.4s ease-in forwards;
}
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(4) {
  animation: load-gameboy-animation 1.6s ease-in forwards;
}
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(6) {
  animation: load-gameboy-animation 1.8s ease-in forwards;
}
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(7) {
  animation: load-gameboy-animation 2s ease-in forwards;
}
.power-button-checkbox:checked ~ .screen .load-gameboy-text :nth-child(8) {
  animation: load-gameboy-animation 2.2s ease-in forwards;
}

@keyframes load-gameboy-animation {
  0% {
    transform: scaleX(0);
    opacity: 0;
    color: rgb(20, 20, 89);
  }
  16% {
    color: blue;
  }
  33% {
    color: green;
  }
  50% {
    transform: scaleX(0.5);
    opacity: 0.5;
    color: rgb(238, 95, 119);
  }
  66% {
    color: rgb(240, 137, 40);
  }
  83% {
    color: yellow;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

.load-trademark-info {
  opacity: 0;
}

.power-button-checkbox:checked ~ .screen .load-trademark-info {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  animation: load-text 3s ease;
  animation-delay: 6s;
}

@keyframes load-trademark-animation {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.game-loading-screen {
  opacity: 0;
}

.power-button-checkbox:checked ~ .screen .game-loading-screen {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-family: "Papyrus";
  font-weight: bold;
  word-spacing: 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  animation: fade-in 3s forwards;
  animation-delay: 10s;
}

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

.top-game-title {
  font-size: 24px;
  animation: slide-in-right 2s forwards steps(30);
  animation-delay: 9s;
}

@keyframes slide-in-right {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    transform: translateX(0%);
    opacity: 1;
  }
}

.bottom-game-title {
  animation: slide-in-left 2.2s forwards steps(30);
  animation-delay: 9s;
}
@keyframes slide-in-left {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    transform: translateX(0%);
    opacity: 1;
  }
}

.start-game-title {
  font-size: 12px;
  font-weight: 400;
  animation: pulsing 2s infinite;
}

@keyframes pulsing {
  0%,
  100% {
    opacity: 0;
  }
  25%,
  75% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

.power-button-checkbox:not(:checked) ~ .screen .top-game-title {
  animation: slide-out-right 2s forwards steps(30);
  animation-delay: 12s;
}

@keyframes slide-out-right {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.power-button-checkbox:not(:checked) ~ .screen .bottom-game-title {
  animation: slide-out-left 2s forwards steps(30);
  animation-delay: 12s;
}

@keyframes slide-out-left {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
  }
}

.bold-trademark-info-line {
  text-wrap: nowrap;
}

.bold-trademark-info-line span:nth-child(2) {
  font-weight: 700;
}

.bottom-trademark-info-line {
  display: flex;
  gap: 3px;
}

.comm-icon {
  position: absolute;
  top: 1%;
  left: 20%;
  background-color: transparent;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;

  border-bottom: 10px solid rgb(158, 250, 73);
  filter: drop-shadow(0.5px 0.5px 1px rgb(78, 145, 33));
}

.comm {
  position: absolute;
  top: 0.6%;
  left: 25%;
  color: rgb(158, 250, 73);
  text-shadow: 0.5px 0.5px 1px rgb(78, 145, 33);

  font-size: 12px;
}

.screen {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  background-color: black;
  height: 45%;
  width: 300px;
  border-radius: 10px;
  z-index: 1;
}

.screen_bottom {
  position: absolute;
  bottom: -2.4%;
  left: 50%;
  transform: translateX(-50%);
  background-color: black;
  /* background-color: red; */

  height: 8%;
  width: 97%;
  border-radius: 40%;
  z-index: 10;
}

.lcd {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background-color: gray;
  height: 70%;
  width: 68%;
  border-radius: 4px;
}

.load-gameboy-text {
  display: inline-block;
  opacity: 0;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: -6px;
  font-size: 30px;
  text-wrap: nowrap;
  font-weight: 800;
  color: midnightblue;
}

.load-logo {
  opacity: 0;
  font-size: 12px;
  font-weight: 800;
}

.power-icon {
  display: flex;
}

/* power light */
.power-icon span:nth-child(1) {
  height: 6px;
  width: 6px;
  background-color: brown;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 2%;
  z-index: 1;
}

/* first crescent */
.power-icon span:nth-child(2) {
  height: 6px;
  width: 6px;
  background-color: cadetblue;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 4%;
}
.power-icon span:nth-child(3) {
  height: 6px;
  width: 6px;
  background-color: black;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 3.3%;
}

/* second crescent */
.power-icon span:nth-child(4) {
  height: 6px;
  width: 6px;
  background-color: cadetblue;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 6.8%;
}
.power-icon span:nth-child(5) {
  height: 6px;
  width: 6px;
  background-color: black;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 6%;
}

/*  third crescent */
.power-icon span:nth-child(6) {
  height: 6px;
  width: 6px;
  background-color: cadetblue;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 9.6%;
}
.power-icon span:nth-child(7) {
  height: 6px;
  width: 6px;
  background-color: black;
  border-radius: 50%;
  position: absolute;
  top: 27%;
  left: 9%;
}

.power {
  position: absolute;
  top: 30%;
  left: 2%;
  color: cadetblue;
  font-size: 8px;
}

.logo {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  color: cadetblue;
  font-weight: bold;
  font-size: 20px;
  text-wrap: nowrap;
  letter-spacing: -2px;
}

.logo span:nth-child(1) {
  display: inline-block;
  transform: skewX(-5deg);
  margin-right: 10px;
}

.logo span:nth-child(2) {
  color: red;
}
.logo span:nth-child(3) {
  color: rgb(141, 60, 199);
}
.logo span:nth-child(4) {
  display: inline-block;
  color: rgba(142, 229, 63, 1);
  transform: rotate(-5deg);
}
.logo span:nth-child(5) {
  color: yellow;
}
.logo span:nth-child(6) {
  color: rgb(9, 158, 158);
}

.inner-ridge {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  height: 90%;
  width: 68%;
  border: 1px solid transparent;
  border-top: none;
  border-radius: 4px 4px 24px 24px;
  box-shadow: 0px 1px 50px 0.5px rgb(70, 81, 67, 0.2);
}

.inner-ridge_bottom {
  position: absolute;
  bottom: -2.3%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgb(142, 229, 63);
  height: 10%;
  width: 95%;
  border-radius: 40%;
}

.nintendo-logo {
  position: absolute;
  top: 53%;
  left: 50%;
  transform: translateX(-50%);
  color: rgb(95, 178, 40);
  border: 2px solid rgb(95, 178, 40);
  border-radius: 24px;
  padding-inline: 8px;
  padding-block: 0.5px;
  font-weight: 700;
  letter-spacing: 2.8px;
  box-shadow: 0px 0px 5px 1px rgb(158, 250, 73),
    0px 0px 1px 0.5px rgb(158, 250, 73) inset;
  -webkit-text-stroke: 1px rgb(88, 169, 34);
}

.zyntendo {
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.2),
    0px 0px 1px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 1px rgb(88, 169, 34);
  font-weight: 100;
  font-size: 14px;
}

.trademark {
  position: absolute;
  left: 88%;
  top: 10%;
  font-size: 6px;
  -webkit-text-stroke: 0px rgb(88, 169, 34);
}

/* make the d-pad buttons have push animations */
.d-pad {
  display: inline-flex;
  position: absolute;
  top: 62%;
  left: 8%;
}

.d-pad-shadow {
  box-shadow: 0px 0px 1px 2px rgb(30, 32, 30);
}

/* todo  fix highlight for horizontal bar*/
.d-pad-highlight {
  box-shadow: 0.5px 0.5px 2px 0px #a09393 inset;
}

.d-pad-vertical {
  transform: rotate(90deg);
}

.d-pad-common {
  position: absolute;
  width: 80px;
  height: 25px;
  background-color: rgb(48, 45, 45);
  border-radius: 4px;
}

.arrow-common {
  position: absolute;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #00000050;
  z-index: 1;
  cursor: pointer;
}

.up-arrow {
  top: 23%;
  left: 8%;
  transform: rotate(30deg);
}

.down-arrow {
  bottom: 27%;
  right: 6%;
  transform: rotate(90deg);
}

.right-arrow {
  top: 25%;
  right: 6%;
  transform: rotate(90deg);
}

.left-arrow {
  top: 20%;
  left: 8%;
  transform: rotate(30deg);
}

.circle {
  position: absolute;
  top: 10%;
  left: 36%;
  width: 22px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0px 0px 3px 0.5px rgb(30, 32, 30) inset,
    -0.5px -0.5px 1px 0px #a09393 inset;
}

.button {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  position: absolute;
  border: 1px solid tranparent;
  border-radius: 50%;
  background-color: rgb(48, 45, 45);
  width: 37px;
  height: 37px;
  box-shadow: 0px 1px 1px 0.5px rgb(30, 32, 30),
    0.5px 0.5px 2px 0px #a09393 inset;
  cursor: pointer;
}

.button span {
  color: rgba(0, 0, 0, 0.6);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2),
    -1px -1px 2px rgba(0, 0, 0, 0.5);
  -webkit-text-stroke: 1px rgb(22, 21, 21, 0.8);
  font-weight: 500;
  font-size: 24px;
  padding-left: 25%;
  padding-bottom: 5%;
  transform: scale(0.75, 1);
  -webkit-transform: scale(0.75, 1);
}

.button:active {
  transform: translateY(2px);
  box-shadow: 0px 0px 1px 0.5px rgb(30, 32, 30), 0px 0px 2px 0px #a09393 inset;
}

.button-a {
  top: 60%;
  right: 8%;
}

.button-b {
  top: 63%;
  right: 24%;
}

.select-start-wrapper {
  display: flex;
  flex-direction: row;
  gap: 8px;
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  justify-content: space-evenly;
  font-size: 12px;
  text-transform: uppercase;
  color: rgb(158, 250, 73);
  text-shadow: 0.5px 0.5px 1px rgb(78, 145, 33);
}

.select,
.start {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.start-button-checkbox {
  display: none;
}


/* todo look closer at etsio ex. fix this */
.start-button-checkbox:has(#start-button-selector:checked) ~ .screen .game-loading-screen {
  transition: opacity 1s 1s;
  opacity: 1;
}

.start-button-checkbox:not(#start-button-selector:checked) ~ .screen .game-loading-screen {
  transition: opacity 1s 1s;
  opacity: 0;
}

.start-button,
.select-button {
  margin: auto;
  background-color: rgb(48, 45, 45);
  border-radius: 40%;
  height: 9px;
  box-shadow: 0px 1px 1px 0.5px rgb(30, 32, 30),
    0px 0.5px 1.5px 0px #a09393 inset;
  cursor: pointer;
}

.select-button:active,
.start-button:active {
  transform: translateY(0.5px);
}

.button-border {
  box-shadow: 0px 0px 1px 4px rgb(78, 145, 33, 0.4);
  border-radius: 40%;
  width: 26px;
  margin: auto;
}

.speaker {
  position: absolute;
  bottom: 3%;
  right: 6%;
  width: 85px;
  aspect-ratio: 1 / 1;
}

.dot-wrapper {
  display: flex;
  gap: 5px;
  padding-block: 2px;
  align-items: center;
  justify-content: center;
  transform-origin: 100% 50%;
  transform: skewY(-10deg);
}

.dot {
  width: 6px;
  aspect-ratio: 1/1;
}

.dot-open {
  background-color: rgb(31, 29, 29);
  border-radius: 50%;
}

.dot-closed {
  background-color: rgb(133, 217, 78);
  box-shadow: 0.5px 0.5px 2px 0px rgb(57, 85, 38) inset;
  border-radius: 50%;
}
