/* ============================================================
   ScaryGaming — Game Loading Screen styles
   Reusable loading overlay for all game pages.
   ============================================================ */

.game-loading-screen {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a0010 0%, #050003 100%);
  color: var(--blood-accent, #cc1122);
  font-family: var(--font-display, Fraunces, Georgia, serif);
}

.game-loading-screen.active {
  display: flex;
}

.game-loading-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-shadow: 0 0 40px oklch(40% 0.2 20 / 0.5);
  animation: sgai-load-title-pulse 2s ease-in-out infinite;
  margin-bottom: 20px;
  text-align: center;
  padding: 0 16px;
}

.game-loading-icon {
  font-size: clamp(2.5rem, 8vw, 4rem);
  animation: sgai-load-spin 3s linear infinite;
  margin-bottom: 30px;
}

@keyframes sgai-load-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes sgai-load-title-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.game-loading-bar-container {
  width: min(320px, 90vw);
  height: 18px;
  background: oklch(100% 0 0 / 0.05);
  border: 2px solid oklch(40% 0.2 20 / 0.4);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: inset 0 0 20px oklch(0% 0 0 / 0.4);
}

.game-loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #cc1122, #ff3344, #cc1122);
  background-size: 200% 100%;
  animation: sgai-load-bar-shimmer 1.5s linear infinite;
  box-shadow: 0 0 15px oklch(40% 0.2 20 / 0.6);
  border-radius: 7px;
  transition: width 0.3s ease;
}

@keyframes sgai-load-bar-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.game-loading-status {
  font-family: var(--font-ui, Satoshi, system-ui, sans-serif);
  font-size: 0.85rem;
  color: oklch(65% 0.05 10 / 0.7);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.game-loading-tip {
  margin-top: 30px;
  font-family: var(--font-ui, Satoshi, system-ui, sans-serif);
  font-size: clamp(0.7rem, 1.5vw, 0.75rem);
  color: oklch(65% 0.05 10 / 0.4);
  max-width: 400px;
  text-align: center;
  font-style: italic;
  padding: 0 16px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .game-loading-icon { animation: none; }
  .game-loading-title { animation: none; }
  .game-loading-bar {
    animation: none;
    background: linear-gradient(90deg, #cc1122, #ff3344, #cc1122);
  }
}
