html {
  -ms-touch-action: none;
  touch-action: none;
  height: 100%;
}

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

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(160deg, #1a0a2e 0%, #2d1b4e 45%, #1a0f30 100%);
}

#game-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #120c20;
}

body.kg-desktop #game-stage {
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

#Cocos2dGameContainer {
  position: absolute !important;
  margin: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

canvas {
  background-color: rgba(0, 0, 0, 0);
  touch-action: none;
}

#GameCanvas {
  outline: none;
  display: block;
  width: 100%;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 35%, #3b2466 0%, #1a0a2e 55%, #0d0618 100%);
  transition: opacity .28s ease;
}
#splash.kg-hide {
  opacity: 0;
  visibility: hidden;
}
#splash .kg-boot-brand {
  color: #ffe7a6;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  text-shadow: 0 0 24px rgba(255, 200, 120, 0.35);
  margin-bottom: 10px;
}
#splash .kg-boot-tip {
  color: rgba(255, 231, 166, 0.75);
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 28px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
#splash .kg-boot-spin {
  width: 36px;
  height: 36px;
  margin-bottom: 22px;
  border: 3px solid rgba(255,231,166,0.2);
  border-top-color: #ffe7a6;
  border-radius: 50%;
  animation: kg-spin .8s linear infinite;
}
@keyframes kg-spin { to { transform: rotate(360deg); } }

.progress-bar {
  position: relative;
  left: auto;
  top: auto;
  height: 6px;
  padding: 0;
  width: 56%;
  max-width: 280px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 8px;
  background: linear-gradient(90deg, #c9a45c, #ffe7a6, #f0c674);
  box-shadow: 0 0 12px rgba(255, 215, 140, 0.45);
  transition: width .15s ease;
}

.stripes span {
  background-size: 30px 30px;
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  animation: animate-stripes 1s linear infinite;
}

@keyframes animate-stripes {
  0% { background-position: 0 0; }
  100% { background-position: 60px 0; }
}


/* 横屏三方游戏：舞台变宽，背景更干净 */
body.kg-land {
  background: radial-gradient(ellipse at center, #0a2a45 0%, #041525 55%, #020b14 100%) !important;
}
body.kg-land #game-stage {
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  background: #041525;
}
body.kg-land.kg-mobile #game-stage {
  border-radius: 0;
  box-shadow: none;
}
#kg-game-iframe {
  background: #041525;
}
