/* AnimeForge Adventures — Keyframe Animations & Transitions */

/* Pulse Advance Arrow */
@keyframes pulse-advance {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.5; transform: translateX(4px); }
}

/* Node Glow */
@keyframes node-glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(232, 114, 154, 0.3)); }
  50% { filter: drop-shadow(0 0 14px rgba(232, 114, 154, 0.6)); }
}

/* Boss Pulse */
@keyframes boss-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(232, 92, 92, 0.3); }
  50% { box-shadow: 0 0 25px rgba(232, 92, 92, 0.6); }
}

/* Parallax Background */
@keyframes parallax-far {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-20px) scale(1.02); }
}

@keyframes parallax-mid {
  0% { transform: translateX(0); }
  100% { transform: translateX(-10px); }
}

/* Slow Zoom for Scene Backgrounds */
@keyframes slow-zoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* Sprite Enter Animations */
@keyframes sprite-enter-left {
  from { transform: translateX(-80px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes sprite-enter-right {
  from { transform: translateX(80px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Slide Down */
@keyframes slide-down {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Fade In */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fade In Up */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sakura Petal Float */
@keyframes float-petal-1 {
  0% { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { transform: translate(80px, 110vh) rotate(360deg); opacity: 0; }
}

@keyframes float-petal-2 {
  0% { transform: translate(0, -10vh) rotate(45deg); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translate(-60px, 110vh) rotate(405deg); opacity: 0; }
}

@keyframes float-petal-3 {
  0% { transform: translate(0, -10vh) rotate(90deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translate(40px, 110vh) rotate(450deg); opacity: 0; }
}

/* Shimmer Border */
@keyframes shimmer-border {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Screen Wipe Transition */
@keyframes wipe-in {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes wipe-out {
  from { clip-path: inset(0 0 0 0); }
  to { clip-path: inset(0 0 0 100%); }
}

/* Combat Hit Flash */
@keyframes hit-flash {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(2) saturate(0); }
}

/* Combat Shake */
@keyframes combat-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* Level Up Glow */
@keyframes level-up-glow {
  0% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.6); }
  50% { box-shadow: 0 0 40px 10px rgba(212, 168, 67, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0); }
}

/* Typewriter Cursor Blink */
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Sakura Petal Layer */
.sakura-petals {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.sakura-petals__petal {
  position: absolute;
  width: 12px;
  height: 8px;
  background: linear-gradient(135deg, rgba(232, 114, 154, 0.6), rgba(232, 114, 154, 0.2));
  border-radius: 50% 0 50% 0;
  transform: rotate(45deg);
}

.sakura-petals__petal:nth-child(1) { left: 5%; animation: float-petal-1 12s linear infinite; animation-delay: 0s; }
.sakura-petals__petal:nth-child(2) { left: 15%; animation: float-petal-2 14s linear infinite; animation-delay: 1s; }
.sakura-petals__petal:nth-child(3) { left: 25%; animation: float-petal-1 10s linear infinite; animation-delay: 2s; }
.sakura-petals__petal:nth-child(4) { left: 35%; animation: float-petal-3 16s linear infinite; animation-delay: 0.5s; }
.sakura-petals__petal:nth-child(5) { left: 45%; animation: float-petal-2 11s linear infinite; animation-delay: 3s; }
.sakura-petals__petal:nth-child(6) { left: 55%; animation: float-petal-1 13s linear infinite; animation-delay: 1.5s; }
.sakura-petals__petal:nth-child(7) { left: 65%; animation: float-petal-3 15s linear infinite; animation-delay: 4s; }
.sakura-petals__petal:nth-child(8) { left: 75%; animation: float-petal-2 9s linear infinite; animation-delay: 2.5s; }
.sakura-petals__petal:nth-child(9) { left: 85%; animation: float-petal-1 17s linear infinite; animation-delay: 0.8s; }
.sakura-petals__petal:nth-child(10) { left: 92%; animation: float-petal-3 12s linear infinite; animation-delay: 3.5s; }
.sakura-petals__petal:nth-child(11) { left: 10%; animation: float-petal-2 18s linear infinite; animation-delay: 5s; }
.sakura-petals__petal:nth-child(12) { left: 40%; animation: float-petal-1 14s linear infinite; animation-delay: 6s; }
.sakura-petals__petal:nth-child(13) { left: 60%; animation: float-petal-3 11s linear infinite; animation-delay: 7s; }
.sakura-petals__petal:nth-child(14) { left: 80%; animation: float-petal-2 16s linear infinite; animation-delay: 4.5s; }
.sakura-petals__petal:nth-child(15) { left: 20%; animation: float-petal-1 13s linear infinite; animation-delay: 8s; }
.sakura-petals__petal:nth-child(16) { left: 50%; animation: float-petal-3 10s linear infinite; animation-delay: 2s; }

/* Screen Transition Overlay */
.screen-transition {
  position: fixed;
  inset: 0;
  background: var(--bg-deep);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-transition--active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================
   2026 Visual Redesign — Animated Orbs & Game Nav
   ============================================ */

/* Animated Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orb-float 20s ease-in-out infinite;
}

.orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.4) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.3) 0%, transparent 70%);
  top: 50%;
  right: -5%;
  animation-duration: 20s;
  animation-delay: -5s;
}

.orb--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.25) 0%, transparent 70%);
  bottom: -5%;
  left: 30%;
  animation-duration: 22s;
  animation-delay: -10s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(20px, 20px) scale(1.02); }
}

/* Game Nav */
.game-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(11, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(244, 114, 182, 0.15);
  border-bottom: none;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}

.game-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all 200ms ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.game-nav__item span {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.game-nav__item:hover {
  color: var(--text-primary);
  background: rgba(244, 114, 182, 0.08);
}

.game-nav__item--active {
  color: var(--accent-sakura);
  background: rgba(244, 114, 182, 0.12);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.2);
}
