.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;
  }
}

/* Mobile Firing Button */
#mobile-shoot-btn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, rgba(20, 20, 25, 0.8) 100%);
    border: 2px solid rgba(230, 57, 70, 0.55);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(230, 57, 70, 0.2);
    z-index: 3600;
    display: none; /* Managed by JS */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease, border-color 0.2s, box-shadow 0.2s;
}

#mobile-shoot-btn:active {
    transform: scale(0.9);
    border-color: #e63946;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.45) 0%, rgba(20, 20, 25, 0.9) 100%);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4), 0 0 20px rgba(230, 57, 70, 0.7);
}

.shoot-btn-icon {
    width: 32px;
    height: 32px;
    border: 2.5px dashed rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    position: relative;
}

.shoot-btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #e63946;
    border-radius: 50%;
    box-shadow: 0 0 8px #e63946;
}

@media (max-width: 768px) {
    #mobile-shoot-btn {
        right: 24px;
        bottom: 24px;
        width: 60px;
        height: 60px;
    }
    .shoot-btn-icon {
        width: 28px;
        height: 28px;
    }
}

/* Mobile Jump Button Styles */
#mobile-jump-btn {
    display: none;
}

body.touch-device #mobile-jump-btn {
    display: flex;
    position: fixed;
    right: 112px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(20, 20, 25, 0.8) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.05);
    z-index: 3600;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease, border-color 0.2s, background-color 0.2s;
}

body.touch-device #mobile-jump-btn:active {
    transform: scale(0.9);
    border-color: rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(20, 20, 25, 0.9) 100%);
}

@media (max-width: 768px) {
    body.touch-device #mobile-jump-btn {
        right: 104px;
        bottom: 24px;
        width: 52px;
        height: 52px;
    }
}

/* Sürüş modundayken crosshair gizlensin */
body.is-driving #crosshair {
    display: none !important;
}
body.is-driving #weapon-crosshair {
    display: none !important;
}

/* Mobile Interact (E) Button Styles */
#mobile-interact-btn {
    display: none;
}

body.touch-device #mobile-interact-btn {
    display: flex;
    position: fixed;
    left: 140px; /* Joystick'e biraz yaklaştırıldı */
    bottom: 44px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(20, 20, 25, 0.85) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.05);
    z-index: 3600;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s ease, border-color 0.2s, background-color 0.2s;
}

body.touch-device #mobile-interact-btn span {
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

body.touch-device #mobile-interact-btn:active {
    transform: scale(0.9);
    border-color: rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(20, 20, 25, 0.9) 100%);
}

@media (max-width: 768px) {
    body.touch-device #mobile-interact-btn {
        left: 108px;
        bottom: 32px;
        width: 52px;
        height: 52px;
    }
    body.touch-device #mobile-interact-btn span {
        font-size: 22px;
    }
}

/* Mobile Crouch Button Styles */
#mobile-crouch-btn {
    display: none;
}

body.touch-device #mobile-crouch-btn {
    display: flex;
    position: fixed;
    right: 38px;
    bottom: 105px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(20, 20, 25, 0.8) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.05);
    z-index: 3600;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.1s ease, border-color 0.2s, background-color 0.2s;
}

body.touch-device #mobile-crouch-btn:active,
body.touch-device #mobile-crouch-btn.active {
    transform: scale(0.9);
    border-color: rgba(255, 255, 255, 0.55);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(20, 20, 25, 0.9) 100%);
}

@media (max-width: 768px) {
    body.touch-device #mobile-crouch-btn {
        right: 28px;
        bottom: 90px;
        width: 52px;
        height: 52px;
    }
}
