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

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

body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
  cursor: default;
  color: #eaf7ff;
  background: #0a1222;
  text-align: center;
  font-family: "Microsoft YaHei", "PingFang SC", Helvetica, Arial, sans-serif;
}

canvas {
  background-color: transparent;
}

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

.boot-shell {
  position: fixed;
  z-index: 9999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: linear-gradient(160deg, #0a1222 0%, #102a42 100%);
  opacity: 1;
  transition: opacity 160ms ease-out;
}

.boot-shell--hidden {
  pointer-events: none;
  opacity: 0;
}

.boot-card {
  width: min(640px, 82vw);
  box-sizing: border-box;
  padding: 26px 40px 24px;
  border: 1px solid rgba(106, 191, 233, 0.28);
  border-radius: 18px;
  background: rgba(18, 42, 66, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.boot-title {
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  color: #ecf9ff;
}

.boot-subtitle {
  margin-top: 10px;
  font-size: clamp(16px, 3.8vw, 21px);
  color: #8fc4e0;
}

.boot-track {
  position: relative;
  height: 12px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #2c5b7c;
}

.boot-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -42%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(73, 214, 255, 0), #49d6ff 72%, #d8f8ff);
  animation: boot-slide 1.15s ease-in-out infinite;
}

.boot-hint {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(205, 236, 250, 0.76);
}

@keyframes boot-slide {
  from { transform: translateX(0); }
  to { transform: translateX(340%); }
}

@media (max-height: 420px) {
  .boot-card { padding: 18px 30px 16px; }
  .boot-track { margin-top: 18px; }
  .boot-hint { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-fill { animation-duration: 2.2s; }
  .boot-shell { transition: none; }
}

: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);
}
