html {
  -ms-touch-action: none;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

html {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;

  cursor: default;
  color: #888;
  background-color: #0f0b06;

  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Verdana, Arial, sans-serif;

  display: flex;
  flex-direction: column;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

/* 隐藏 Cocos 引擎默认启动页，统一由 #app-splash 覆盖到首场景就绪 */
#splash,
#Splash,
.cocos-splash,
div[class*="cocos-splash"],
div[class*="splash-screen"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#Cocos3dGameContainer, #GameCanvas {
  width: 100%;
  height: 100%;
}

#cocos-viewport-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#GameDiv {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  box-sizing: border-box;
  overflow: hidden;
  transform: none !important;
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 30%, rgba(212, 165, 74, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(212, 165, 74, 0.05) 0%, transparent 50%),
    #0f0b06;
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.app-splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.app-splash-brand {
  color: #d4a54a;
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-shadow: 0 8px 28px rgba(212, 165, 74, 0.25);
}

.app-splash-bar {
  width: min(220px, 56vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(212, 165, 74, 0.16);
  overflow: hidden;
}

.app-splash-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(212, 165, 74, 0.35), #d4a54a);
  animation: app-splash-progress 1.2s ease-in-out infinite;
}

.app-splash-hint {
  display: none;
  max-width: min(320px, 82vw);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

@keyframes app-splash-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

:root {
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
}

#login-dom-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: #0f0b06;
  overflow: hidden;
}
