.rpg-collection-page {
  display: grid;
  gap: 1.25rem;
}

.rpg-collection-hero h1 {
  margin-bottom: 0.35rem;
}

.rpg-collection-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rpg-collection-tab {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}

.rpg-collection-tab.is-active {
  background: var(--accent, #38bdf8);
  color: #04111f;
  border-color: transparent;
}

.rpg-pack-grid,
.rpg-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.rpg-pack-offer,
.rpg-set-block,
.rpg-completed-set {
  display: grid;
  gap: 0.65rem;
}

.rpg-pack-cost {
  font-weight: 700;
}

.rpg-set-progress-wrap {
  display: grid;
  gap: 0.35rem;
}

.rpg-set-progress-track,
.rpg-xp-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.rpg-set-progress-fill,
.rpg-xp-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #38bdf8);
}

.rpg-card-tile {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 0.75rem;
  display: grid;
  gap: 0.45rem;
  min-height: 220px;
}

.rpg-card-tile--missing {
  opacity: 0.72;
}

.rpg-card-art {
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.9));
  overflow: hidden;
}

.rpg-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rpg-card-silhouette {
  font-size: 2rem;
  opacity: 0.35;
}

.rpg-card-rarity,
.rpg-pack-reveal-rarity {
  text-transform: capitalize;
  font-size: 0.85rem;
}

.rpg-rarity--common { color: #cbd5e1; }
.rpg-rarity--rare { color: #38bdf8; }
.rpg-rarity--epic { color: #c084fc; }
.rpg-rarity--legendary { color: #fbbf24; }

.rpg-card-dupes,
.rpg-pack-reveal-duplicate {
  color: #fbbf24;
  font-size: 0.85rem;
}

.rpg-set-reward,
.rpg-set-complete {
  color: #34d399;
}

.rpg-pack-opening-stage {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(8px);
}

.rpg-pack-opening-overlay {
  position: relative;
  width: min(920px, 92vw);
  min-height: 420px;
  display: grid;
  place-items: center;
}

.rpg-pack-sealed,
.rpg-pack-charge,
.rpg-pack-burst,
.rpg-pack-reveal,
.rpg-pack-summary {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.rpg-pack-sealed.is-active,
.rpg-pack-charge.is-active,
.rpg-pack-burst.is-active,
.rpg-pack-reveal.is-active,
.rpg-pack-summary.is-active {
  opacity: 1;
  pointer-events: auto;
}

.rpg-pack-sealed-glow,
.rpg-pack-charge-ring,
.rpg-pack-burst-core {
  width: 180px;
  height: 240px;
  border-radius: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.35);
}

.rpg-pack-opening--solar .rpg-pack-sealed-glow,
.rpg-pack-opening--solar .rpg-pack-charge-ring,
.rpg-pack-opening--solar .rpg-pack-burst-core {
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.35), rgba(34, 211, 238, 0.35));
}

.rpg-pack-opening--eclipse .rpg-pack-sealed-glow,
.rpg-pack-opening--eclipse .rpg-pack-charge-ring,
.rpg-pack-opening--eclipse .rpg-pack-burst-core {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.4), rgba(34, 211, 238, 0.28));
}

.rpg-pack-charge-ring {
  animation: rpg-pack-pulse 1s ease-in-out infinite;
}

.rpg-pack-burst-core {
  animation: rpg-pack-burst 0.65s ease-out forwards;
}

.rpg-pack-reveal {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  align-content: center;
  padding: 1rem;
}

.rpg-pack-reveal-card {
  border-radius: 1rem;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.rpg-pack-reveal-card.is-duplicate {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.45);
}

.rpg-pack-reveal-art {
  aspect-ratio: 3 / 4;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.rpg-pack-reveal-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rpg-pack-summary {
  text-align: center;
  gap: 0.75rem;
}

@keyframes rpg-pack-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes rpg-pack-burst {
  0% { transform: scale(0.7); opacity: 0.2; }
  100% { transform: scale(1.25); opacity: 0; }
}

@media (max-width: 720px) {
  .rpg-pack-reveal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
