html {
  -ms-touch-action: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body, canvas, div {
  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;
}

body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  cursor: default;
  color: #888;
  background-color: #333;
  text-align: center;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#GameDiv {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0;
  top: 0;
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
  max-width: 100%;
  max-height: 100%;
  display: block;
}

a:link, a:visited {
  color: #666;
}

a:active, a:hover {
  color: #666;
}

p.header {
  font-size: small;
}

p.footer {
  font-size: x-small;
}

#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #171717 url(./splash.85cfd.png) no-repeat center;
  background-size: 45%;
}

.progress-bar {
    position: absolute;
    left: 27.5%;
    top: 80%;
    height: 3px;
    padding: 2px;
    width: 45%;
    border-radius: 7px;
    box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;           
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease-in-out;
    background-color: #3dc5de;
}

.stripes span {
    background-size: 30px 30px;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
                        transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
                        transparent 75%, transparent);            
    
    animation: animate-stripes 1s linear infinite;             
}

@keyframes animate-stripes {
    0% {background-position: 0 0;} 100% {background-position: 60px 0;}
}

/* ===== 用户自定义ID弹窗 ===== */
#user-id-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
}

.user-id-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 20px;
  padding: 30px 25px;
  width: 85%;
  max-width: 380px;
  box-shadow: 0 0 40px rgba(0, 150, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.user-id-title {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(0, 150, 255, 0.5);
}

.user-name-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  text-align: center;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 15px;
  transition: border-color 0.3s;
}

.user-name-input:focus {
  border-color: #00d4ff;
}

.user-name-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.user-name-btn {
  width: 100%;
  padding: 12px 0;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  outline: none;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.user-name-btn:hover {
  background: linear-gradient(135deg, #00e5ff, #00aadd);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
  transform: translateY(-1px);
}

.user-name-btn:active {
  transform: scale(0.97);
}

/* 手机屏幕适配 */
@media screen and (max-width: 480px) {
  .user-id-modal {
    padding: 25px 20px;
    width: 90%;
  }
  .user-id-title {
    font-size: 20px;
  }
}

@media screen and (max-height: 600px) {
  .user-id-modal {
    padding: 15px 20px;
  }
  .user-id-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
}

@media screen and (min-width: 768px) {
  .user-id-modal {
    max-width: 420px;
  }
}
