* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
}

/* ══════════════════════════════════════════
   Splash Overlay
   ══════════════════════════════════════════ */
#splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #1a1a3e 0%, #0d0d1a 60%, #050510 100%);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.5s ease-out;
}

#splash-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ── Title ── */
#splash-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

#splash-title {
  font-size: clamp(28px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #e0e8ff 0%, #a8b8ff 40%, #7b8cff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 40px rgba(120, 140, 255, 0.3));
  animation: titleFloat 4s ease-in-out infinite;
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ── Loading ── */
#splash-loading {
  display: none;
  margin-top: 48px;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

#splash-progress-bar {
  width: clamp(220px, 50vw, 420px);
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin: 0 auto 16px;
  overflow: hidden;
  position: relative;
}

#splash-progress-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  box-shadow: inset 0 0 8px rgba(100, 130, 255, 0.15);
}

#splash-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8, #a5b4fc);
  border-radius: 3px;
  transition: width 0.25s ease;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.6);
}

#splash-progress-text {
  font-size: clamp(12px, 1.5vw, 15px);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
}

/* ── Bottom Hint ── */
#splash-hint-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding-bottom: clamp(40px, 8vh, 80px);
  text-align: center;
  /* Subtle gradient fade from transparent to slightly darker at bottom */
  background: linear-gradient(to bottom, transparent 0%, rgba(5, 5, 16, 0.4) 100%);
  padding-top: 60px;
}

#splash-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  animation: hintPulse 2.5s ease-in-out infinite;
}

.hint-icon {
  display: inline-block;
  font-size: clamp(10px, 1.2vw, 14px);
  color: rgba(255, 255, 255, 0.35);
  animation: hintArrow 2.5s ease-in-out infinite;
}

@keyframes hintArrow {
  0%, 100% { transform: translateX(0); opacity: 0.35; }
  50% { transform: translateX(4px); opacity: 0.7; }
}

.hint-text {
  font-size: clamp(13px, 2vw, 18px);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* ══════════════════════════════════════════
   Unity Container
   ══════════════════════════════════════════ */
#unity-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

#unity-canvas {
  background: #231F20;
  width: 100%;
  height: 100%;
  display: block;
}

#unity-footer {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 10;
}

#unity-fullscreen-button {
  background: url('fullScreen.png') no-repeat center;
  background-size: contain;
  width: 28px;
  height: 28px;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.25s;
}

#unity-fullscreen-button:hover {
  opacity: 0.75;
}

/* ── Error Display ── */
#hisplayer-error {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  color: #ff6b6b;
  font-size: 13px;
  padding: 8px 12px;
}
