/* Reset and basic setup */
body {
  margin: 0;
  background-color: #0d0c0f;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}


.fadeIn {
  opacity: 0;
  animation: fadeIn 2s ease-in 0.7s forwards;
}

@keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }




/* Wrapper holds image, buttons, and canvas */
#gbc-wrapper {
  position: relative;
  width: 90vw;
  max-width: 500px;
}

/* Game Boy PNG */
#gbc {
  width: 100%;
  display: block;
}

/* Canvas in screen area */
.mainCanvas {
  position: absolute;
  top: 12%;
  left: 23%;
  width: 52.4%;
  height: auto;
  z-index: -999;
  /* background-color: blue; */
  border-radius: 0px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;

  opacity: 0;
  animation: fadeIn 1s ease-in 3s forwards;
}

@keyframes maincanvas {
      from { opacity: 0; }
      to { opacity: 1; }
    }

/* Shared button styles */
.roundBtn, .capsuleBtn {
  position: absolute;
  z-index: 10;
  opacity: 0.6;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #440f1f;

  /* buttons */
  opacity: 0;
}

/* Round buttons (A, B) */
.roundBtn {
  border-radius: 50%;
  background: radial-gradient(ellipse at center, #ab1465 0%, #8b1e57 100%);
  box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.2);
  aspect-ratio: 1;
  font-size: 1.5em;
}

/* Capsule buttons (Start, Select) */
.capsuleBtn {
  border-radius: 20px;
  background: radial-gradient(ellipse at center, #666 0%, #555 100%);
  box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.2);
  font-size: 0.8em;
  text-transform: uppercase;
}

/* Button positioning (tweak these as needed!) */
#controller_a {
  top: 60.5%;
  left: 75%;
  width: 13%;
}

#controller_b {
  top: 63.5%;
  left: 58.5%;
  width: 13%;
}

#controller_start {
  top: 78.5%;
  left: 51.5%;
  width: 15%;
  height: 5%;
}

#controller_select {
  top: 78.5%;
  left: 34%;
  width: 15%;
  height: 5%;
}

/* D-Pad Container */
#controller_dpad {
  position: absolute;
  top: 57.5%;
  left: 9.7%;
  width: 28%;
  aspect-ratio: 1;
  
  /* DPAD buttons */
  opacity: 0;
}

/* Shared style for D-Pad directions */
#controller_dpad > div {
  position: absolute;
  background: radial-gradient(ellipse at center, #666 0%, #5c5c5c 80%);
  width: 35%;
  height: 35%;
  z-index: 10;
}

/* Positioning individual directions */
#controller_up {
  top: 0%;
  left: 32%;
  border-radius: 6px 6px 0 0;
}

#controller_down {
  bottom: 0%;
  left: 32%;
  border-radius: 0 0 6px 6px;
}

#controller_left {
  bottom: 32%;
  left: 0%;
  border-radius: 6px 0 0 6px;
}

#controller_right {
  bottom: 32%;
  right: 0%;
  border-radius: 0 6px 6px 0;
}

