:root {
  --anim-duration: 700ms;
  --parallax-x: 0;
  --parallax-y: 0;
  --scroll-y: 0;
  --sunset-1: #f2b36f;
  --sunset-2: #c97adf;
  --sunset-3: #1c1e3a;
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Existing animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up var(--anim-duration) ease-out both;
}

@keyframes subtle-pop {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-1px) scale(1.01);
  }
}

.hover-subtle-pop {
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.hover-subtle-pop:hover {
  animation: subtle-pop 200ms ease forwards;
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* New: Animated sunset gradient (orange -> violet -> deep blue) */
@keyframes sunset-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-desert-animated {
  background: linear-gradient(120deg, var(--sunset-1), var(--sunset-2), var(--sunset-3));
  background-size: 220% 220%;
  animation: sunset-shift 24s ease-in-out infinite;
}

/* Subtle atmospheric veil */
.atmos-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 20%, rgba(255, 245, 235, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
}

/* Premium outline utilities */
.premium-ring {
  box-shadow:
    inset 0 0 0 1px rgba(244, 198, 122, 0.45),
    0 0 0 1px rgba(223, 125, 30, 0.25);
}
.premium-ring-strong {
  box-shadow:
    inset 0 0 0 1.5px rgba(244, 198, 122, 0.7),
    0 0 0 1px rgba(223, 125, 30, 0.35),
    0 8px 24px rgba(0,0,0,0.12);
}

/* Sun glow */
.sun-orb {
  position: absolute;
  top: 10%;
  right: 8%;
  width: 260px;
  height: 260px;
  border-radius: 9999px;
  background: radial-gradient(circle at 30% 30%, rgba(250, 200, 128, 0.95), rgba(242, 153, 74, 0.35), rgba(239, 227, 205, 0));
  filter: blur(3px);
  box-shadow:
    0 0 60px rgba(244, 198, 122, 0.35),
    0 0 120px rgba(223, 125, 30, 0.2);
  transform: translate(calc(var(--parallax-x) * 0.02), calc(var(--parallax-y) * -0.02));
  transition: transform 120ms linear;
}

/* Parallax dunes */
.dune,
.dune-2,
.dune-3 {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 28vh;
  border-radius: 50% / 30%;
  filter: blur(1px);
}

.dune {
  bottom: -6vh;
  background: linear-gradient(to top, rgba(64, 44, 30, 0.55), rgba(64, 44, 30, 0.15));
  transform: translate(calc(var(--parallax-x) * 0.04), calc(2vh + var(--scroll-y) * 0.02));
}
.dune-2 {
  bottom: 4vh;
  background: linear-gradient(to top, rgba(129, 84, 52, 0.45), rgba(129, 84, 52, 0.10));
  transform: translate(calc(var(--parallax-x) * -0.02), calc(1vh + var(--scroll-y) * 0.015));
}
.dune-3 {
  bottom: 12vh;
  background: linear-gradient(to top, rgba(180, 130, 82, 0.35), rgba(180, 130, 82, 0.08));
  transform: translate(calc(var(--parallax-x) * 0.01), calc(0vh + var(--scroll-y) * 0.01));
}

/* Holographic grid overlay (faint, premium) */
.holo-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  mix-blend-mode: screen;
  mask-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.6), rgba(255,255,255,0));
  animation: grid-glow 6s ease-in-out infinite;
}

@keyframes grid-glow {
  0%,100% { opacity: 0.2; filter: hue-rotate(0deg) brightness(1); }
  50% { opacity: 0.35; filter: hue-rotate(25deg) brightness(1.1); }
}

.glow-line {
  position: absolute;
  inset: auto 0 24%;
  height: 2px;
  background: linear-gradient(90deg, rgba(223,125,30,0), rgba(223,125,30,0.45), rgba(223,125,30,0));
  box-shadow: 0 0 24px rgba(223,125,30,0.35);
}

/* Starlight / particles behind cards */
.starlight {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.18), transparent 2px),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.14), transparent 2px),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.12), transparent 2px),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.10), transparent 2px);
  animation: shimmer-move 12s linear infinite;
}

@keyframes shimmer-move { 0%{transform: translateY(0)} 50%{transform: translateY(-6px)} 100%{transform: translateY(0)} }

/* Button glow */
.btn-glow {
  position: relative;
  box-shadow: 0 0 0 2px rgba(246, 196, 122, 0.35), 0 0 24px rgba(223, 125, 30, 0.35);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

@keyframes pulse-glow { 0%,100%{box-shadow:0 0 0 2px rgba(246,196,122,.25),0 0 14px rgba(223,125,30,.25)} 50%{box-shadow:0 0 0 3px rgba(246,196,122,.45),0 0 28px rgba(223,125,30,.45)} }

.btn-glow::after {
  content: ""; position: absolute; right: -8px; top: 50%; width: 6px; height: 6px;
  border-radius: 9999px; background: rgba(244, 198, 122, 0.9); filter: blur(0.5px);
  transform: translateY(-50%); opacity: 0;
}
.btn-glow:hover::after { animation: trail 700ms ease-out forwards; }

@keyframes trail { 0%{opacity:0; transform:translate(0,-50%)} 10%{opacity:1} 100%{opacity:0; transform:translate(-32px,-50%) scale(0.6)} }

/* Card enhancements */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  background: rgba(247, 240, 230, 0.7);
  transition: transform 300ms ease, box-shadow 300ms ease;
  will-change: transform;
}
.card:hover { transform: translateY(-2px) scale(1.02); }

.card-hover-border::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(244,198,122,0.45), 0 0 18px rgba(223,125,30,0.25);
  opacity: 0; transition: opacity 300ms ease;
}
.card:hover .card-hover-border::after { opacity: 1; }

/* Holographic glow around cards on hover */
.card-holo::before {
  content: "";
  position: absolute; inset: -2px; border-radius: inherit;
  background: conic-gradient(from 0deg, rgba(255,215,155,0.35), rgba(160,210,255,0.25), rgba(210,160,255,0.25), rgba(255,180,120,0.35));
  filter: blur(12px);
  opacity: 0;
  transition: opacity 300ms ease;
}
.card-holo:hover::before { opacity: 0.8; }

/* Rarity glows */
.rarity-common { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
.rarity-rare { box-shadow: 0 0 18px rgba(90,170,255,0.25), inset 0 0 0 1px rgba(90,170,255,0.35); }
.rarity-mythic { box-shadow: 0 0 18px rgba(170,120,255,0.25), inset 0 0 0 1px rgba(170,120,255,0.35); }
.rarity-legendary { box-shadow: 0 0 22px rgba(255,200,120,0.35), inset 0 0 0 1.5px rgba(255,200,120,0.55); }

.rarity-rare::after,
.rarity-mythic::after,
.rarity-legendary::after {
  content: "";
  position: absolute; inset: -4px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, transparent, rgba(255,255,255,0.05));
  animation: rarity-pulse 2.6s ease-in-out infinite;
}

@keyframes rarity-pulse {
  0%,100% { opacity: 0.35; }
  50% { opacity: 0.6; }
}

/* Blur-up image loading */
.img-blur {
  filter: blur(12px) saturate(0.8);
  transform: scale(1.02);
  transition: filter 500ms ease, transform 500ms ease, opacity 500ms ease;
}
.img-loaded {
  filter: blur(0);
  transform: scale(1);
  opacity: 1 !important;
}

/* Title text glow */
.title-glow {
  color: #f6d28b;
  text-shadow: 0 0 14px rgba(246,210,139,0.35), 0 0 28px rgba(207,128,58,0.25);
}

/* Particle burst for transitions */
.sand-burst {
  position: fixed;
  width: 6px; height: 6px; border-radius: 9999px; pointer-events: none;
  background: radial-gradient(circle, rgba(244,198,122,0.9), rgba(244,198,122,0));
  animation: burst 800ms ease-out forwards;
}
@keyframes burst {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 40px), var(--dy, -24px)) scale(0.6); }
}

/* Mobile tap-friendly: reduce heavy hover on touch */
@media (hover: none) {
  .card:hover { transform: none; }
  .card-holo:hover::before { opacity: 0.5; }
}

/* Keep existing classes below if referenced */
.new-image-glow {
  position: relative;
}
.new-image-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(244,198,122,0.45), 0 0 24px rgba(223,125,30,0.35);
  animation: sand-wave 1600ms ease-in-out 2;
}
@keyframes sand-wave {
  0% { box-shadow: 0 0 0 0 rgba(223,125,30,0.0), 0 0 0 rgba(223,125,30,0.0); opacity: 0.8; }
  50% { box-shadow: 0 0 0 3px rgba(223,125,30,0.45), 0 0 28px rgba(242,153,74,0.40); opacity: 1; }
  100% { box-shadow: 0 0 0 0 rgba(223,125,30,0.0), 0 0 0 rgba(223,125,30,0.0); opacity: 0.9; }
}
/* Keep simple shimmer utility */
.sand-shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.2), transparent 2px),
              radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.15), transparent 2px),
              radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.1), transparent 2px);
  animation: shimmer-move 12s linear infinite;
}