/* ============================================================
   Duck Hunt: Reborn — Global Styles
   ============================================================ */

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Oswald', sans-serif;
}

/* Hide default cursor over the game */
body {
  cursor: none;
}

/* ── Game Container ── */
#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

#phaser-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#phaser-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* ── Loading Screen ── */
#loading-screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-inner {
  text-align: center;
  color: #fff;
  user-select: none;
}

.loading-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  color: #FFD700;
  text-shadow:
    0 0 20px rgba(255, 200, 50, 0.8),
    0 0 40px rgba(255, 150, 0, 0.4),
    2px 2px 0 #4a2800;
  letter-spacing: 0.05em;
  animation: titlePulse 2s ease-in-out infinite;
}

.loading-sub {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(16px, 2.5vw, 28px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.3em;
  margin-top: 8px;
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.loading-bar-wrap {
  width: clamp(200px, 40vw, 400px);
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 32px auto 12px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FFD700, #FF6600);
  border-radius: 2px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 200, 50, 0.8);
}

.loading-text {
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ── Animations ── */
@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 20px rgba(255,200,50,0.8), 0 0 40px rgba(255,150,0,0.4), 2px 2px 0 #4a2800; }
  50%       { text-shadow: 0 0 35px rgba(255,200,50,1.0), 0 0 70px rgba(255,150,0,0.7), 2px 2px 0 #4a2800; }
}

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

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ── Utility ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}