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

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary-glow); }
  50% { box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow); }
}

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

@keyframes progressFill {
  from { width: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes splashReveal {
  0% { opacity: 0; transform: scale(2.8); filter: blur(14px); }
  35% { opacity: 1; transform: scale(1.18); filter: blur(0); }
  68% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(0.92); filter: blur(4px); }
}

@keyframes skeletonIntro {
  0%, 18% { opacity: 0; transform: scale(0.96) translateY(18px); }
  38%, 82% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(1.02); }
}

@keyframes skeletonShimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* Apply animations */
.animate-fadeIn { animation: fadeIn var(--transition-base) both; }
.animate-fadeInUp { animation: fadeInUp var(--transition-slow) both; }
.animate-scaleIn { animation: scaleIn var(--transition-base) both; }
.animate-bounce { animation: bounce 2s ease infinite; }
.animate-glow { animation: glow 2s ease infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

.animate-stagger > * {
  animation: fadeInUp var(--transition-base) both;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0ms; }
.animate-stagger > *:nth-child(2) { animation-delay: 50ms; }
.animate-stagger > *:nth-child(3) { animation-delay: 100ms; }
.animate-stagger > *:nth-child(4) { animation-delay: 150ms; }
.animate-stagger > *:nth-child(5) { animation-delay: 200ms; }
.animate-stagger > *:nth-child(6) { animation-delay: 250ms; }
.animate-stagger > *:nth-child(7) { animation-delay: 300ms; }
.animate-stagger > *:nth-child(8) { animation-delay: 350ms; }

/* Transition helpers */
.transition-all { transition: all var(--transition-base); }
.transition-transform { transition: transform var(--transition-base); }
.transition-opacity { transition: opacity var(--transition-base); }

/* Hover lift */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Hover glow */
.hover-glow:hover {
  box-shadow: 0 0 20px var(--primary-glow);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #dcc8aa;
  transition: opacity 500ms ease, visibility 500ms ease;
  overflow: hidden;
}

.splash-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-logo-wrap {
  position: relative;
  width: min(260px, 58vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

.splash-skeleton {
  position: absolute;
  inset: 6vw;
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 22px;
  opacity: 0;
  animation: skeletonIntro 1.8s ease both;
}

.splash-skel-sidebar,
.splash-skel-main,
.splash-skel-top,
.splash-skel-grid span,
.splash-skel-panel {
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(255,255,255,0.22), rgba(255,255,255,0.52), rgba(255,255,255,0.22));
  background-size: 220% 100%;
  animation: skeletonShimmer 1.2s linear infinite;
  border: 1px solid rgba(255,255,255,0.28);
}

.splash-skel-sidebar {
  padding: 28px 20px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.splash-skel-sidebar span {
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.36);
}

.splash-skel-main {
  padding: 28px;
  display: grid;
  grid-template-rows: 58px 120px 1fr;
  gap: 20px;
}

.splash-skel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.splash-logo {
  position: relative;
  width: 100%;
  border-radius: 50%;
  animation: splashReveal 1.8s ease both;
  box-shadow: 0 28px 80px rgba(45, 35, 24, 0.28);
}

@media (max-width: 768px) {
  .splash-skeleton {
    inset: 18px;
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }

  .splash-skel-sidebar {
    padding: 18px 10px;
  }

  .splash-skel-main {
    padding: 18px;
    grid-template-rows: 48px 1fr 1.4fr;
  }

  .splash-skel-grid {
    grid-template-columns: 1fr;
  }
}
