/**
 * RC7.1 — Loading ritual poster, base idle life, win tier accents.
 * Presentation only — no math/audio identity changes.
 */

/* ===== Loading — poster fills stage card (not viewport vw/vh) ===== */
.game-loading-screen {
  position: absolute !important;
  inset: 0;
  z-index: 100;
  overflow: hidden;
}

.game-loading-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #06080f;
  background-image: none;
}

.game-loading-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 38%, rgba(18, 12, 42, 0.72) 0%, rgba(4, 6, 14, 0.88) 72%),
    linear-gradient(180deg, #06080f 0%, #0a0e1a 45%, #05070d 100%);
}

.game-loading-bg.game-loading-bg--texture {
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}

.game-loading-bg::after {
  animation: rc71-loading-vignette-breathe 5.5s ease-in-out infinite;
}

@keyframes rc71-loading-vignette-breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.game-loading-ritual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  pointer-events: none;
  z-index: 2;
}

.game-loading-poster-wrap {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: clamp(0.35rem, 1.2%, 0.75rem);
  z-index: 3;
  pointer-events: none;
}

.game-loading-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 0 28px rgba(168, 85, 247, 0.35)) drop-shadow(0 0 48px rgba(255, 200, 80, 0.18));
  animation: rc71-poster-float 6s ease-in-out infinite;
  z-index: 2;
}

@keyframes rc71-poster-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.01); }
}

.game-loading-poster-wrap:has(.game-loading-poster--loaded:not([hidden])) ~ .game-loading-ritual-ring,
.game-loading-poster-wrap:has(.game-loading-poster--loaded:not([hidden])) ~ .game-loading-ritual-tagline,
.game-loading-poster-wrap:has(.game-loading-poster--loaded:not([hidden])) ~ .game-loading-ritual-cta {
  display: none !important;
}

.game-loading-poster-wrap:has(.game-loading-poster--loaded:not([hidden])) ~ .game-loading-ritual-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(6%, 8%, 10%);
  width: 100%;
  margin: 0;
  padding: 0 0.5rem;
  text-align: center;
  transform: none;
  z-index: 5;
  pointer-events: none;
  animation: rc71-loading-title-breathe 3.8s ease-in-out infinite;
}

@keyframes rc71-loading-title-breathe {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 28px rgba(255, 215, 0, 0.45);
  }
  50% {
    transform: scale(1.025);
    text-shadow: 0 0 42px rgba(255, 215, 0, 0.62), 0 0 18px rgba(168, 85, 247, 0.35);
  }
}

.game-loading-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.04) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 30%, rgba(255, 215, 100, 0.05) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 55%, rgba(200, 180, 255, 0.04) 0 1px, transparent 2px);
  background-size: 180px 180px, 220px 220px, 160px 160px;
  animation: rc71-dust-drift 22s linear infinite;
  opacity: 0.45;
}

@keyframes rc71-dust-drift {
  from { background-position: 0 0, 40px 20px, 20px 40px; }
  to { background-position: 180px -120px, 220px -80px, 160px -100px; }
}

/* ИГРАТЬ tap target — aligned to poster CTA */
.game-loading-play-hotspot {
  left: 50%;
  bottom: clamp(2%, 2.5vh, 4%);
  transform: translateX(-50%);
  width: min(48%, 460px);
  height: clamp(12%, 14%, 16%);
  min-height: 56px;
  max-height: 120px;
  border-radius: 12px;
  z-index: 6;
}

.game-loading-screen:has(.game-loading-poster--loaded:not([hidden])) .game-loading-play-hotspot::after {
  display: none;
}

/* ===== Base game — subtle life ===== */
.playground--player-view .friends-stage-logo-title {
  animation: rc71-logo-breathe 4.2s ease-in-out infinite;
}

@keyframes rc71-logo-breathe {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 28px rgba(255, 215, 0, 0.45);
  }
  50% {
    transform: scale(1.025);
    text-shadow: 0 0 42px rgba(255, 215, 0, 0.62), 0 0 18px rgba(168, 85, 247, 0.35);
  }
}

.playground--player-view .game-stage-bg-glow {
  animation: rc71-stage-bloom-pulse 7s ease-in-out infinite;
}

@keyframes rc71-stage-bloom-pulse {
  0%, 100% { opacity: 0.35; filter: brightness(1); }
  50% { opacity: 0.52; filter: brightness(1.06); }
}

.playground--player-view .game-stage-bg-dust {
  opacity: 0.28;
  animation: rc71-dust-drift 28s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .game-loading-poster,
  .game-loading-dust,
  .game-loading-poster-wrap:has(.game-loading-poster--loaded:not([hidden])) ~ .game-loading-ritual-title,
  .game-loading-bg::after,
  .playground--player-view .friends-stage-logo-title,
  .playground--player-view .game-stage-bg-glow,
  .playground--player-view .game-stage-bg-dust {
    animation: none !important;
  }
}
