html, body {
  margin: 0;
  padding: 0;
  background-color: black;
  color: white;
  font-family: monospace;
  touch-action: none;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#outerDiv {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100vh;
}

@media (orientation: portrait) {
  #outerDiv {
    flex-direction: column;
  }
}

#canvasDiv{
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  max-width: 100vw;
  max-height: 100vw;
}

/* CANVAS */
#canvasDiv {
  /*
  background-color: #a6dbbc;
  */
  
  background-color: lightblue;
  border-radius: 5px;
}

#myCanvas {
  width: 100%;
  height: 100vw;
  display: block;
  background-color: transparent;
  border: none;
}

#control-panel {
  flex-direction: column;
  gap: 10px;
  padding: 100px 12px 12px 12px; /* Aumentamos solo el padding-top */
  background: rgba(30, 30, 30, 0.9);
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  overflow-y: scroll;
}

.control-group {
  margin-bottom: 10px;
  width: 100%;
}

.control-label {
  font-size: 14px;
  margin-bottom: 4px;
  display: block;
  text-align: center;
}

.button-row {
  display: flex;
  justify-content: space-between;
}

.control-btn {
  flex: 1;
  margin: 0 2px;
  background: #444;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 0;
  font-size: 16px;
  cursor: pointer;
}

.control-btn:hover {
  background: #666;
}

#myCanvas {
  filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.5));
}

/* JOYSTICK IZQUIERDO (ARRIBA IZQUIERDA) */
#joystick-left-base {
  position: absolute;
  top: 60%;
  left: 15%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at center, #444 0%, #222 100%);
  border-radius: 50%;
  border: 2px solid #666;
  touch-action: none;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#joystick-left-stick {
  width: 30px;
  height: 30px;
  background: #eee;
  border-radius: 50%;
}

/* JOYSTICK DERECHO (ABAJO DERECHA) */
#joystick-right-base {
  position: absolute;
  bottom: 9%;
  right: 14%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at center, #444 0%, #222 100%);
  border-radius: 50%;
  border: 2px solid #666;
  touch-action: none;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#joystick-right-stick {
  width: 30px;
  height: 30px;
  background: #eee;
  border-radius: 50%;
}

canvas {
  display: block;
  max-width: 100%;
  height: 100vw !important;
}