/* ===========================================
   HAVFUN — animations.css
   Keyframes, preloader, cookie notice,
   animation initial states
   =========================================== */

/* ── Preloader (Neon Gaming Theme) ───────── */
#preloader {
  position: fixed;
  inset: 0;
  background-color: #000000 !important; /* Pure black as requested */
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: none;
}

#loader-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#loader-game-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  z-index: 10;
  width: min(320px, 70vw);
  height: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 40px rgba(123, 47, 255, 0.7));
}

#loader-game-logo.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Glow Pulse ─────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(123,47,255,0.4), 0 0 40px rgba(123,47,255,0.15); }
  50%       { box-shadow: 0 0 40px rgba(123,47,255,0.8), 0 0 80px rgba(123,47,255,0.35); }
}
.glow-pulse { animation: glow-pulse 2.8s ease-in-out infinite; }

/* ── Digit Flip (countdown) ──────────────── */
@keyframes digit-flip {
  0%   { transform: translateY(0);   opacity: 1; }
  49%  { transform: translateY(-8px); opacity: 0; }
  50%  { transform: translateY(8px);  opacity: 0; }
  100% { transform: translateY(0);   opacity: 1; }
}
.flip { animation: digit-flip 0.3s ease-in-out; }

/* ── Pill Float ─────────────────────────── */
@keyframes pill-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ── Scroll Hint Line ───────────────────── */
@keyframes scroll-hint-drop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  30%  { opacity: 1; }
  70%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Shimmer (placeholders) ─────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.placeholder-shimmer {
  background: linear-gradient(
    90deg,
    var(--bg-card) 25%,
    rgba(255,255,255,0.06) 50%,
    var(--bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 2.2s ease infinite;
}

/* ── Cookie Notice ──────────────────────── */
#cookie-notice {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 8000;
  background: rgba(10,10,15,0.96);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 16px clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
#cookie-notice.is-visible { transform: translateY(0); }

.cookie-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.cookie-text a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-accept {
  flex-shrink: 0;
  padding: 10px 24px;
  background: var(--accent-1);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.85rem; font-weight: 600;
  color: #fff;
  transition: opacity var(--transition-base);
  min-height: 44px; min-width: 80px;
  cursor: pointer;
}
.cookie-accept:hover { opacity: 0.85; }

@media (max-width: 600px) {
  #cookie-notice {
    flex-direction: column;
    align-items: flex-start;
  }
}
