[v-cloak] {
  display: none !important;
}

/* Custom Styles */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #020617;
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

input[type="range"] {
  height: 6px;
  border-radius: 4px;
}

/* Modal scale-up animation */
@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-scale-up {
  animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 全局防横向溢出与字体抗锯齿防位移 (解决手机端滑动时整体页面左右摇晃与字体位移) */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

/* 移动端安全区域适配变量 */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

/* Mobile viewport adjustments */
@media (max-width: 640px) {
  button, input, select, textarea {
    touch-action: manipulation;
  }
  /* 防止 iOS Safari 在聚焦输入框时强制页面局部放大导致布局错位与字体漂移 */
  input[type="text"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* 全局按钮防点击吞没与穿透优化 */
button, [role="button"] {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button > *, [role="button"] > * {
  pointer-events: none !important;
}
button svg, button i, button span {
  pointer-events: none !important;
}
button:disabled, button[disabled] {
  cursor: not-allowed !important;
  opacity: 0.6;
}
