/* SHINY cards: pink, sparkly and full of stars.
   js/ui.js adds class "shiny" to the card and a .shiny-stars layer of
   little stars (the .star elements below) inside the card front. */

@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* frame: pink and white shimmer that slowly rotates; body tinted pink-purple */
.card.shiny .card-front {
  color: #fff4fb;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 170, 225, 0.28), transparent 62%) padding-box,
    linear-gradient(#45145f, #2a0b47) padding-box,
    conic-gradient(from var(--ang), #ff4fa3, #ffd0ef, #ff8fcf, #fff, #ff5cb0, #ffb3e1, #ff4fa3) border-box;
  animation: shiny-spin 4s linear infinite, shiny-glow 2s ease-in-out infinite alternate;
}
@keyframes shiny-spin { to { --ang: 360deg; } }
@keyframes shiny-glow {
  from { box-shadow: 0 0 16px 3px rgba(255, 79, 163, 0.65), 0 12px 26px rgba(0, 0, 0, 0.45); }
  to   { box-shadow: 0 0 30px 8px rgba(255, 170, 225, 0.75), 0 12px 26px rgba(0, 0, 0, 0.45); }
}

/* pink-white holo band sweeping over the whole card */
.card.shiny .card-front::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 11px;                    /* inner radius: 16px frame - 5px border */
  pointer-events: none;
  background: linear-gradient(115deg, transparent 12%, rgba(255, 110, 190, 0.34) 30%, rgba(255, 255, 255, 0.42) 42%,
    rgba(255, 160, 220, 0.34) 54%, rgba(220, 160, 255, 0.28) 66%, transparent 82%);
  background-size: 260% 260%;
  animation: shiny-holo 3s ease-in-out infinite alternate;
}
@keyframes shiny-holo { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

/* pink art box */
.card.shiny .card-art {
  background:
    linear-gradient(135deg, rgba(255, 80, 170, 0.5), rgba(255, 190, 235, 0.3) 50%, rgba(255, 110, 190, 0.5)),
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.5), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.12) 0 10px, transparent 10px 20px),
    linear-gradient(155deg, #a8309a, #4b1170 85%);
  box-shadow: inset 0 0 0 2px rgba(255, 220, 245, 0.5), inset 0 -18px 30px rgba(60, 0, 60, 0.3);
}
.card.shiny .art-initials { text-shadow: 0 3px 0 rgba(130, 0, 80, 0.5), 0 0 16px rgba(255, 170, 225, 0.95); }
.card.shiny .card-odds { color: #ffb3e1; }
.card.shiny .badge-diff { box-shadow: 0 0 8px rgba(255, 170, 225, 0.6); }

/* the stars */
.shiny-stars { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; border-radius: 11px; }
.star {
  position: absolute;
  width: var(--sz, 10px);
  height: var(--sz, 10px);
  margin: calc(var(--sz, 10px) / -2) 0 0 calc(var(--sz, 10px) / -2);
  background: radial-gradient(circle, #fff 30%, #ffc4ea 100%);
  opacity: 0;
  animation: star-twinkle 2.2s ease-in-out infinite;
}
.star.s4 { clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.star.s5 { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
@keyframes star-twinkle {
  0%, 100% { opacity: 0;    transform: scale(0.2) rotate(0deg); }
  50%      { opacity: 0.95; transform: scale(1.15) rotate(35deg); }
}

.tag-shiny { top: 6px; right: 6px; background: linear-gradient(90deg, #ff4fa3, #ffb3e1); color: #fff; text-shadow: 0 1px 0 rgba(120, 0, 70, 0.5); }

/* "Shiny cards" stat on the Packs screen */
.stat-shiny.has { border-color: rgba(255, 130, 200, 0.75); box-shadow: 0 0 16px rgba(255, 100, 190, 0.35); }
.stat-shiny.has b {
  background: linear-gradient(90deg, #ff4fa3, #ffd0ef, #ff8fcf);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .card.shiny .card-front, .card.shiny .card-front::before { animation: none; }
  .star { animation: none; opacity: 0.8; transform: none; }
}
