@layer base {
  * {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.5);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.8);
}

/* Animations */
@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-in {
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Prevent unwanted browser behaviors on canvas */
canvas {
  touch-action: none;
  outline: none;
}

/* Tool slots */
.tool-slot {
  position: relative;
}

.tool-slot.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(168, 85, 247, 0.9));
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
  transform: translateY(-2px);
}

/* Customizable Control Scales */
.ctrl-size-small #joystick-zone {
  width: 96px !important;
  height: 96px !important;
}
.ctrl-size-small #btn-jump {
  width: 60px !important;
  height: 60px !important;
}

.ctrl-size-medium #joystick-zone {
  width: 120px !important;
  height: 120px !important;
}
.ctrl-size-medium #btn-jump {
  width: 76px !important;
  height: 76px !important;
}

.ctrl-size-large #joystick-zone {
  width: 148px !important;
  height: 148px !important;
}
.ctrl-size-large #btn-jump {
  width: 90px !important;
  height: 90px !important;
}

/* Swapped Controls Layout */
.controls-swapped {
  flex-direction: row-reverse !important;
}

/* Custom range input styling */
input[type="range"] {
  height: 6px;
  border-radius: 9999px;
  background: #334155;
}