.pointerlock-cursor-none,
.pointerlock-cursor-none * {
  cursor: none !important;
}

#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  z-index: 999;
  pointer-events: none;
  transition: background-color 0.2s ease;
}

#joystick-container {
  position: fixed;
  left: 24px;
  bottom: 24px;
  width: 110px;
  height: 110px;
  z-index: 3600;
  display: none;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

body.joystick-enabled #joystick-container {
  display: flex;
}

body.joystick-disabled #joystick-container {
  display: none !important;
}

#joystick-bg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.075), rgba(10, 10, 12, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
}

#joystick {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: absolute;
  left: 23px;
  top: 23px;
  background: radial-gradient(circle at 30% 30%, #f2f2f2, #d9d9d9);
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.3);
  transition: transform 0.1s ease;
  touch-action: none;
}

#joystick:active {
  transform: scale(0.95);
  background: radial-gradient(circle at 40% 40%, #e0e0e0, #bfbfbf);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
  #joystick-container {
    display: flex;
    left: 16px;
    bottom: 16px;
    width: 86px;
    height: 86px;
  }

  #joystick-bg {
    width: 86px;
    height: 86px;
  }

  #joystick {
    width: 48px;
    height: 48px;
    left: 19px;
    top: 19px;
  }

  #crosshair {
    width: 7px;
    height: 7px;
    background: rgba(255,255,255,0.35);
  }
}

@media (any-pointer: coarse), (pointer: coarse), (any-hover: none), (hover: none) {
  #joystick-container {
    display: flex;
  }
}
