* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000;
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  font-family: 'Geologica', 'Segoe UI', -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 70% 60% at 0% 0%,   rgba(90, 22, 10, 0.62) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(70, 12, 25, 0.52) 0%, transparent 65%),
    #000;
  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 {
  max-width: clamp(120px, 25vw, 280px);
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  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);   opacity: 0.9; }
  50%       { transform: translateY(-5px); opacity: 1;   }
}

/* ── Loading ── */
#splash-loading {
  display: none;
  width: 100%;
  padding: 0 16px;
  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-wrapper {
  position: relative;
  width: clamp(260px, 52vw, 500px);
  margin: 0 auto 20px;
}

#splash-progress-bar {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

#splash-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(100, 55, 20, 0.55)  0%,
    rgba(195, 75, 18, 0.90) 58%,
    rgba(255, 145, 38, 1)   84%,
    rgba(255, 238, 170, 1) 100%
  );
  border-radius: 4px;
  transition: width 0.25s ease;
}

/* Glowing head — sibling of bar, positioned by JS */
#splash-progress-glow {
  position: absolute;
  top: 3px;           /* vertical center of the 7px bar */
  left: 0%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
  box-shadow:
    0 0  7px  5px  rgba(255, 215, 100, 0.95),
    0 0 18px 10px  rgba(255, 145,  45, 0.72),
    0 0 40px 18px  rgba(255,  85,  12, 0.45),
    0 0 80px 30px  rgba(220,  55,   5, 0.20),
    0 14px 55px 22px rgba(170, 45,   0, 0.22);
}

#splash-progress-text {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.48);
  letter-spacing: 0.30em;
}

/* ── Bottom Hint ── */
#splash-hint-wrapper {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding-bottom: clamp(36px, 6vh, 64px);
  text-align: center;
  background: none;
  padding-top: 40px;
}

#splash-hint {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  animation: hintPulse 3s ease-in-out infinite;
}

.hint-icon {
  display: inline-block;
  font-size: clamp(8px, 0.9vw, 11px);
  color: rgba(255, 255, 255, 0.28);
}

.hint-text {
  font-family: 'Geologica', sans-serif;
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 300;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ══════════════════════════════════════════
   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;
}
