body {
  padding: 0;
  margin: 0;
  background: #0a1224;
  overflow: hidden;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#unity-container { position: absolute }
#unity-container.unity-desktop,
#unity-container.unity-mobile {
  left: 50%;
  top: 0;
  transform: translate(-50%, 0);
}

#unity-canvas {
  background: #0a1224;
  display: block;
  /* 宽高由 index.html 的 fitCanvas() 按 750:1334 写入，勿再拉满撑破可视区 */
  max-width: 100%;
  max-height: 100%;
}
.unity-mobile #unity-canvas {
  /* 覆盖旧模板的 width/height:100%，改为跟随 JS 计算的像素尺寸 */
  width: auto;
  height: auto;
}

/* —— 加载层 —— */
#unity-loading-bar {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(40, 90, 160, 0.35) 0%, transparent 55%),
    linear-gradient(180deg, #0d1a33 0%, #08101f 45%, #050a14 100%);
  overflow: hidden;
}

#unity-loading-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(30deg, rgba(120, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(150deg, rgba(120, 180, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 84px;
  opacity: 0.9;
  pointer-events: none;
  animation: gridDrift 18s linear infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 84px, -48px 84px; }
}

#unity-loading-bar.is-visible {
  display: flex;
}

#unity-logo {
  position: relative;
  z-index: 1;
  width: min(78vw, 320px);
  text-align: center;
  margin-bottom: 36px;
  animation: logoIn 0.8s ease-out both;
}

@keyframes logoIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#unity-logo .brand-main {
  margin: 0;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #f4f8ff;
  text-shadow:
    0 0 24px rgba(80, 170, 255, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.35);
}

#unity-logo .brand-sub {
  margin: 10px 0 0;
  font-size: clamp(12px, 3.2vw, 14px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(160, 200, 255, 0.75);
}

#unity-logo .brand-tip {
  margin: 18px 0 0;
  font-size: 13px;
  color: rgba(200, 220, 255, 0.55);
}

.unity-progress-wrap {
  position: relative;
  z-index: 1;
  width: min(72vw, 280px);
  animation: logoIn 0.9s 0.12s ease-out both;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 10px;
  margin: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(140, 190, 255, 0.28);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a6fd4 0%, #3ec7ff 55%, #a8ecff 100%);
  box-shadow: 0 0 14px rgba(62, 199, 255, 0.65);
  transition: width 0.12s linear;
  position: relative;
}

#unity-progress-bar-full::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55));
  animation: sheen 1.4s ease-in-out infinite;
}

@keyframes sheen {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

#unity-progress-text {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(190, 220, 255, 0.85);
  font-variant-numeric: tabular-nums;
}

#unity-footer { position: relative; display: none }
.unity-mobile #unity-footer { display: none }

#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: rgba(20, 30, 50, 0.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(120, 170, 255, 0.35);
  display: none;
  z-index: 30;
}
