/* ------ CONFIG & HIDING ------ */
.mobile-controls-overlay,
.orientation-overlay,
.system-btns {
  display: none;
}

/* ------ MOBILE OVERLAYS ------ */
body.is-touch .mobile-controls-overlay {
  display: block;
  position: absolute;
  opacity: 0;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.3s;
}

body.is-touch .mobile-controls-overlay.show-mobile-controls {
  opacity: 1;
}

/* ------ BUTTON CONTAINERS ------ */
body.is-touch .movement-btns {
  position: absolute;
  bottom: 1.8rem;
  left: 1.8rem;
  display: flex;
  gap: 1rem;
  pointer-events: auto;
}

body.is-touch .action-btns {
  position: absolute;
  bottom: 1.8rem;
  right: 1.8rem;
  display: flex;
  gap: 1rem;
  pointer-events: auto;
}

body.is-touch .system-btns {
  display: flex;
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  gap: 0.8rem;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

body.is-touch .system-btns.show-system-buttons {
  opacity: 1;
  pointer-events: auto;
}

/* ------ BUTTON STYLING ------ */
body.is-touch .ctrl-btn,
body.is-touch .ctrl-btn-small {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.8);
  color: #dfdfdf;
  border: 0.125rem solid;
  text-transform: uppercase;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  opacity: 0.7;
  transition:
    opacity 0.2s,
    transform 0.1s;
}

body.is-touch .ctrl-btn {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
}

body.is-touch .ctrl-btn-small {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
}

/* ------ INTERACTION EFFECTS ------ */
body.is-touch .button-pressed,
body.is-touch .ctrl-btn:active,
body.is-touch .ctrl-btn-small:active {
  transform: scale(0.9);
  opacity: 1;
  filter: brightness(1.3);
}

/* ------ COLOR THEMES ------ */
body.is-touch .btn-neon-blue {
  border-color: #00f2ff;
  box-shadow: 0 0 0.6rem rgba(0, 242, 255, 0.3);
  text-shadow: 0 0 0.3rem #00f2ff;
}

body.is-touch .btn-neon-pink {
  border-color: #ff00ff;
  box-shadow: 0 0 0.6rem rgba(255, 0, 255, 0.3);
  text-shadow: 0 0 0.3rem #ff00ff;
}

body.is-touch .btn-neon-yellow {
  border-color: #dcdcdc;
  color: #dcdcdc;
  box-shadow: 0 0 0.6rem rgba(255, 255, 255, 0.2);
}

/* ------ ORIENTATION HANDLING ------ */
body.is-touch .orientation-overlay {
  position: fixed;
  inset: 0;
  background: #080808;
  z-index: 9999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #00f2ff;
  text-align: center;
  display: none;
}

body.is-touch .orientation-message {
  font-size: 1.8rem;
  line-height: 1;
  padding: 0 1rem;
}

@media (orientation: portrait) {
  body.is-touch .orientation-overlay {
    display: flex;
    pointer-events: auto;
  }

  body.is-touch #canvas,
  body.is-touch .mobile-controls-overlay,
  body.is-touch .system-btns {
    display: none !important;
  }
}

body.is-touch .game-footer {
  display: none;
}
