/* ========== GLOBAL VARIABLES & RESET ========== */
:root {
  --pac-black: #000000;
  --pac-white: #ffffff;
  --pac-bg: #f8f8fa;
  --pac-text: #111111;
  --pac-muted: #6b6b76;
  --pac-border: #e2e2e8;

  --pac-cyan: #18aeea;
  --pac-red: #f42829;
  --pac-pink: #ff66a3;
  --pac-purple: #7b16c9;
  --pac-yellow: #ffd21e;
  --pac-gold: #f0a500;
  --pac-gold-light: #ffd700;
  --pac-gold-dark: #b8860b;

  --grad-cyan: #18aeea;
  --grad-blue: #667eea;
  --grad-purple: #9b59b6;
  --grad-pink: #ff6b9d;
  --grad-yellow: #ffd21e;
  --grad-lime: #a8e063;
  --grad-rainbow: linear-gradient(135deg, #18aeea, #667eea, #9b59b6, #ff6b9d, #ffd21e, #a8e063);

  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spin-easing: cubic-bezier(0.15, 0, 0.15, 1);
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes softBreathe {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.02);
  }
}


/* ========== PAC.CO BLIND BOX SHELL ========== */
.pacbb-shell {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  margin-top: clamp(40px, 6vw, 64px);
  margin-bottom: clamp(40px, 6vw, 64px);
  position: relative;
  overflow: visible;
  border-radius: 36px;
  padding: 16px 8px 8px 8px;
  transition: max-width 0.8s cubic-bezier(0.25, 1, 0.2, 1);
}

.pacbb-shell:has(.pacbb-card.has-tickets) {
  max-width: 1640px;
}

.pacbb-shell::before {
  content: "";
  position: absolute;
  inset: -150px;
  background: radial-gradient(600px circle at calc(var(--mouse-x, 50%) + 150px) calc(var(--mouse-y, 50%) + 150px),
      color-mix(in srgb, var(--active-tier-color, #18aeea) 8%, transparent),
      transparent 65%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.pacbb-shell:has(.pacbb-card.has-tickets):hover::before {
  opacity: 1;
}

/* === NORMAL MODE: clean PAC.CO monochrome — solid black border === */
.pacbb-card {
  position: relative;
  border-radius: 32px;
  border: 3px solid var(--pac-black);
  background: #fff;
  padding: clamp(24px, 4.5vw, 56px);
  transition: box-shadow 0.6s var(--easing), transform 0.6s var(--easing), border-color 0.4s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.pacbb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

/* === ACTIVE MODE: animated gradient border when user owns tickets === */
.pacbb-card.has-tickets {
  border: 3px solid transparent;
  /* Matches game frame border thickness exactly */
  background: linear-gradient(135deg, rgba(255, 244, 253, 0.92) 0%, rgba(255, 255, 255, 0.96) 50%, rgba(240, 249, 255, 0.92) 100%) padding-box,
    linear-gradient(135deg, #ff6ec7, #a855f7, #2563eb, #fbbf24, #ff6ec7) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientShift 6s ease infinite;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06),
    0 0 50px rgba(253, 164, 255, 0.22);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.pacbb-card.has-tickets .pacbb-info-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pacbb-card.has-tickets .rarity-item {
  background: rgba(0, 0, 0, 0.02);
}

.pacbb-card.has-tickets .rarity-item:hover {
  background: rgba(255, 255, 255, 0.85);
}

.pacbb-card.has-tickets .hiw-icon {
  background: rgba(255, 255, 255, 0.85);
}

@keyframes machineSpinVibe {

  0%,
  100% {
    transform: translateY(-4px) rotate(0deg);
  }

  25% {
    transform: translateY(-4.5px) rotate(0.15deg);
  }

  75% {
    transform: translateY(-3.5px) rotate(-0.15deg);
  }
}

.pacbb-card.is-spinning {
  animation: machineSpinVibe 0.12s linear infinite !important;
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.12),
    0 0 65px rgba(24, 174, 234, 0.4) !important;
}

.pacbb-title-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.pacbb-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Header Pills Container */
.pacbb-header-pills {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Normal Mode: plain black border with rounded pill shape */
.pacbb-ticket-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border-radius: 99px;
  border: 2.5px solid var(--pac-black);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: all 0.4s var(--easing);
  height: 54px;
  /* height-matched with view-collection-btn */
  box-sizing: border-box;
}

/* Active Mode: animated rainbow border */
.pacbb-card.has-tickets .pacbb-ticket-card {
  border: 2.5px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--grad-rainbow) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientShift 6s ease infinite;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

/* Ticket icons: show SVG in normal mode, show img in active (has-tickets) mode */
.ticket-card-icon-svg {
  width: 36px;
  height: 36px;
  display: block;
}

.ticket-wallet-icon-svg {
  width: 64px;
  height: 64px;
  display: block;
  transition: transform 0.3s ease;
}

/* Normal Mode: hide the active-mode gradient image */
.pacbb-ticket-card .ticket-card-icon-img,
.pacbb-ticket-wallet .ticket-wallet-icon-img {
  display: none !important;
}

/* Active Mode: hide the SVG and show the active-mode gradient image */
.pacbb-card.has-tickets .ticket-card-icon-svg,
.pacbb-card.has-tickets .ticket-wallet-icon-svg {
  display: none !important;
}

.pacbb-card.has-tickets .ticket-card-icon-img,
.pacbb-card.has-tickets .ticket-wallet-icon-img {
  display: block !important;
}

/* Ticket card image icon (replaces emoji) */
.ticket-card-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(180, 100, 255, 0.25));
}

.pacbb-card.has-tickets .ticket-card-icon-img {
  animation: ticketBounce 2.5s ease-in-out infinite;
}

.ticket-card-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.ticket-card-label {
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--pac-muted);
  letter-spacing: 0.07em;
  line-height: 1;
}

.ticket-card-count {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--pac-black);
  line-height: 1;
}

.pacbb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 3px solid var(--pac-black);
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  background: #fff;
  margin-bottom: 0;
  transform: translateY(-2px);
}

.pacbb-kicker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pac-yellow);
  border: 1px solid var(--pac-black);
}

.pacbb-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0;
  color: var(--pac-black);
}

.pacbb-subtitle {
  color: var(--pac-muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  max-width: 520px;
  margin-top: 0;
  margin-bottom: 20px;
}

/* ========== CENTERED CAROUSEL ========== */
.pacbb-carousel-wrap {
  position: relative;
  margin: 24px 0;
  height: 230px;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Translucent glassmorphism background (85% opacity) */
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  /* Normal Mode: solid black border */
  border: 3.5px solid var(--pac-black);
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.03);
  --edge-fade-color-left: rgba(255, 255, 255, 0.85);
  --edge-fade-color-right: rgba(255, 255, 255, 0.85);
}

/* Active Mode: animated gradient border with vibrant neon glow */
.pacbb-card.has-tickets .pacbb-carousel-wrap {
  border: 6px solid transparent;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.9) 100%) padding-box,
    linear-gradient(135deg, #ff00a0, #7c3aed, #00d2ff, #f59e0b, #ff00a0) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientShift 4s ease infinite;
  --edge-fade-color-left: rgba(255, 255, 255, 0.85);
  --edge-fade-color-right: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.22), 0 0 24px rgba(192, 38, 211, 0.15);
}

/* Smooth left and right edge fading mask to prevent hard clipping of items */
.pacbb-carousel-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--edge-fade-color-left) 0%, rgba(255, 255, 255, 0) 12%, rgba(255, 255, 255, 0) 88%, var(--edge-fade-color-right) 100%);
  z-index: 15;
}

.selector {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 12px;
  z-index: 10;
  background: var(--pac-black);
  transition: background 0.3s ease;
}

.selector-top {
  top: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.selector-bottom {
  bottom: 0;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

/* Center point selector gradient color in ticket mode (synchronized with border gradient animation) */
.pacbb-card.has-tickets .selector {
  background: linear-gradient(135deg, #ff6ec7, #a855f7, #2563eb, #fbbf24, #ff6ec7);
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
}

.pacbb-carousel {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  cursor: grab;
}

.pacbb-track {
  display: flex;
  align-items: center;
  will-change: transform;
  transition: transform 0.6s var(--easing);
}

/* Carousel Items */
.pacbb-item {
  flex: 0 0 auto;
  width: 120px;
  margin: 0 12px;
  text-align: center;
  transition: all 0.4s var(--easing);
  opacity: 0.35;
  transform: scale(0.85);
  user-select: none;
}

.pacbb-item.is-active {
  opacity: 1;
  transform: scale(1.15);
  z-index: 5;
}

/* Base rarity borders for all item boxes (dynamic editable tier colors) */
.pacbb-item .pacbb-figure {
  border: 3.5px solid var(--tier-color) !important;
}

/* Secret Rare override: keep the animated rainbow outline */
.pacbb-item.pacbb-rarity-secret .pacbb-figure {
  border: 3.5px solid #ffd700 !important;
  animation: rainbowBorder 4s linear infinite !important;
}

/* Active state: thicker border + color-matched glow */
.pacbb-item.is-active .pacbb-figure {
  border-width: 5px !important;
  border-color: var(--tier-color) !important;
  box-shadow: 0 0 30px color-mix(in srgb, var(--tier-color) 60%, transparent) !important;
}

/* Active Secret Rare override: thicker border + gold glow + animated rainbow */
.pacbb-item.is-active.pacbb-rarity-secret .pacbb-figure {
  border-width: 5px !important;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.8) !important;
  animation: rainbowBorder 3s linear infinite !important;
}

@keyframes rainbowBorder {
  0% {
    border-color: #ffd700;
  }

  20% {
    border-color: #ff5599;
  }

  40% {
    border-color: #18aeea;
  }

  60% {
    border-color: #10b981;
  }

  80% {
    border-color: #ffd700;
  }

  100% {
    border-color: #ffd700;
  }
}


/* Character CSS (Preserved Exactly & GPU Accelerated) */
.pacbb-figure {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--pac-border);
  background: #fafafa;
  transition: all 0.4s ease;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

.pacbb-figure.use-css-face {
  background: linear-gradient(180deg, var(--tier-color) 0%, var(--tier-color) 45%, var(--pac-black) 45%, var(--pac-black) 75%, var(--bot-color, #ffb3c6) 75%, var(--bot-color, #ffb3c6) 100%);
}

.pacbb-figure.use-css-face::before,
.pacbb-figure.use-css-face::after {
  content: '';
  position: absolute;
  top: 60%;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translateY(-50%);
}

.pacbb-figure.use-css-face::before {
  left: 35%;
}

.pacbb-figure.use-css-face::after {
  right: 35%;
}

.tier-rocky .pacbb-figure.use-css-face {
  background: linear-gradient(180deg, var(--pac-black) 0%, var(--pac-black) 75%, #bf5273 75%, #bf5273 100%);
}

.tier-rocky .pacbb-figure-extra {
  position: absolute;
  top: 20%;
  right: 20%;
  width: 16px;
  height: 16px;
  background: transparent;
}

.tier-rocky .pacbb-figure-extra::before,
.tier-rocky .pacbb-figure-extra::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: var(--pac-pink);
  top: 50%;
  left: 0;
  border-radius: 1.5px;
}

.tier-rocky .pacbb-figure-extra::before {
  transform: rotate(45deg);
}

.tier-rocky .pacbb-figure-extra::after {
  transform: rotate(-45deg);
}

.pacbb-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  border-radius: 20px;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}


.pacbb-item-info {
  margin-top: 8px;
  transition: transform 0.3s;
  transform: translateY(3px);
}

.pacbb-item.is-active .pacbb-item-info {
  transform: translateY(0);
}

.pacbb-rarity {
  font-weight: 800;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pac-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.pacbb-item.is-active .pacbb-rarity {
  color: var(--tier-color);
  font-weight: 900;
  font-size: 0.85rem;
}

.pacbb-chance-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tier-color);
  border: 1.5px solid var(--pac-black);
}

/* Arrows */
.pacbb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--pac-black);
  background: var(--pac-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  color: var(--pac-black);
}

.pacbb-arrow:hover {
  transform: translateY(-50%) scale(1.08);
}

.pacbb-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.pacbb-arrow-left {
  left: 28px;
}
.pacbb-arrow-left svg {
  transform: translateX(-1px);
}

.pacbb-arrow-right {
  right: 28px;
}
.pacbb-arrow-right svg {
  transform: translateX(1px);
}

/* ========== CONTROLS ========== */
.pacbb-controls-wrapper {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.pacbb-action-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.price-box {
  border: 3px solid var(--pac-black);
  border-radius: 20px;
  padding: 6px 20px;
  min-width: 135px;
  height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background: #fff;
  flex-shrink: 0;
  justify-self: start;
}

.price-box span {
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--pac-muted);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}

.price-box strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--pac-black);
}

.btn {
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-play {
  background: var(--pac-black);
  color: var(--pac-white);
  height: 64px;
  border-radius: 20px;
  border: 3px solid var(--pac-black);
  font-size: 1.05rem;
  width: 100%;
  max-width: 320px;
  justify-self: center;
  transition: all 0.2s ease;
}

.btn-play:hover {
  background: #222;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--active-tier-color, #18aeea) 25%, transparent);
}

.btn-play:active {
  transform: translateY(0);
}

.btn-demo {
  background: var(--pac-white);
  color: var(--pac-black);
  height: 48px;
  border-radius: 16px;
  border: 3px solid var(--pac-black);
  font-size: 0.85rem;
  padding: 0 22px;
  justify-self: end;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-demo svg {
  flex-shrink: 0;
}

.btn-demo:hover {
  background: #f5f5f7;
  transform: translateY(-2px);
}

.btn-demo:active {
  transform: translateY(0);
}

.btn.is-spinning {
  opacity: 0.6;
  pointer-events: none;
}

.lock-text {
  text-align: center;
  color: var(--pac-muted);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========== BOTTOM PANELS ========== */
.pacbb-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3.5vw, 32px);
  margin-top: clamp(24px, 5vw, 40px);
}

.pacbb-info-panel {
  display: flex;
  flex-direction: column;
  border: 3.5px solid var(--pac-black);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
  transition: all 0.3s var(--easing);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.pacbb-info-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.pacbb-info-panel h3 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--pac-black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0;
  margin-bottom: 24px;
}

/* Panel: Rarity Chances */
.rarity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
}

.rarity-grid > :last-child:nth-child(odd) {
  grid-column: span 2;
}

.rarity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 16px;
  background: #fafafa;
  transition: all 0.25s var(--easing);
  border: 2.5px solid #f3f4f6;
}

.rarity-item:hover {
  background: #fff;
  border-color: var(--pac-black);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.rarity-item .pacbb-chance-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--pac-black);
  flex-shrink: 0;
}

.rarity-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  line-height: 1.2;
}

.rarity-info strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--pac-black);
  text-transform: uppercase;
}

.rarity-info span {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--pac-muted);
}

/* Panel: How It Works (Inline Horizontal Steps with Connector) */
.hiw-steps-container {
  position: relative;
  width: 100%;
}

.hiw-connector-line {
  display: none;
}

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
  position: relative;
  z-index: 2;
}

.hiw-step {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 16px;
  background: #fafafa;
  border: 2.5px solid #f3f4f6;
  position: relative;
  z-index: 2;
  transition: all 0.25s var(--easing);
}

.hiw-step:hover {
  background: #fff;
  border-color: #7c3aed;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 15px rgba(124, 58, 237, 0.05);
}

.hiw-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #7c3aed, #ff4081) border-box;
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  margin: 0 !important;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.05);
  transition: all 0.3s ease;
}

.hiw-step:hover .hiw-icon {
  transform: scale(1.08);
}

.hiw-svg {
  width: 18px;
  height: 18px;
  color: var(--pac-black);
}

.hiw-check {
  position: absolute;
  bottom: -1px;
  right: -1px;
  background: linear-gradient(135deg, #ff4081, #7c3aed);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.hiw-check svg {
  width: 7px;
  height: 7px;
}

.hiw-step-num {
  font-size: 8px;
  font-weight: 800;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 1px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
}

.hiw-step:hover .hiw-step-num {
  background: linear-gradient(135deg, #7c3aed, #ff4081);
  color: #fff;
}

.hiw-text-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  flex: 1;
}

.hiw-step strong {
  font-size: 0.88rem;
  font-weight: 850;
  color: var(--pac-black);
  transition: color 0.2s ease;
}

.hiw-step:hover strong {
  color: #7c3aed;
}

.hiw-step p {
  font-size: 0.72rem;
  color: var(--pac-muted);
  margin: 0;
  line-height: 1.3;
  font-weight: 500;
}

.hiw-arrow {
  display: none !important;
}

/* Footer Note */
.footer-note {
  text-align: center;
  color: var(--pac-muted);
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 16px;
}

/* ========== MODAL REVEAL Reworked to match Ref Image ========== */
.reveal-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--easing);
}

.reveal-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.reveal-modal-content {
  position: relative;
  background: var(--pac-white);
  width: 100%;
  max-width: 480px;
  border-radius: 40px;
  padding: 44px 36px 40px;
  text-align: center;
  transform: scale(0.92) translateY(30px);
  transition: all 0.5s var(--easing);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15), 0 0 40px rgba(124, 58, 237, 0.12);
  overflow: hidden;
  border: 4px solid var(--pac-black);
}

.reveal-modal.is-open .reveal-modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #ff6ec7, #7fc7ff, #ffe07d, #ff6ec7) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientShift 4s ease infinite;
  color: #7c3aed;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: linear-gradient(#ffeef4, #ffeef4) padding-box,
              linear-gradient(135deg, #ff6ec7, #7fc7ff, #ffe07d, #ff6ec7) border-box;
  transform: translate(0, 0) scale(1.1) rotate(90deg);
  box-shadow: 0 6px 16px rgba(255, 110, 199, 0.25);
}

.modal-close:active {
  transform: translate(0, 0) scale(0.95) rotate(90deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modal-glow-bg {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 102, 163, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

.modal-header {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.modal-kicker {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--pac-black);
  background: #ffeef4;
  border: 2px solid var(--pac-black);
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 8px;
}

.modal-kicker-star {
  color: var(--pac-pink);
  font-size: 1rem;
}

.modal-title {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--pac-black);
  text-transform: uppercase;
  line-height: 1.05;
  margin: 6px 0 12px;
  letter-spacing: -0.03em;
}

.modal-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 99px;
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  background: var(--pac-pink);
  color: #fff;
  letter-spacing: 0.05em;
  border: 2.5px solid var(--pac-black);
}

/* Premium Visual Card in Center with 3D Float & Pedestal Shadow */
.modal-stage {
  position: relative;
  z-index: 2;
  width: 190px;
  height: 190px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}



@keyframes floatReward {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

.modal-stage .pacbb-item {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}

.modal-stage .pacbb-figure {
  width: 100% !important;
  height: 100% !important;
  border-radius: 36px !important;
  border: 4.5px solid var(--tier-color) !important;
  background: #fff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  animation: floatReward 3s ease-in-out infinite;
}

.modal-stage .pacbb-item-info {
  display: none !important;
}

/* Main Detail Display under the image */
.modal-info {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
}

.modal-info h3 {
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--pac-black);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.modal-info .pacbb-chance {
  display: none !important;
}

/* Elegant Message Box */
.modal-msg-box {
  background: var(--pac-white);
  border: 3px solid var(--pac-black);
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  position: relative;
  z-index: 2;
}

.msg-emoji-circle {
  width: 44px;
  height: 44px;
  background: #ffe6ec;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  border: 2px solid var(--pac-black);
}

.msg-text-content {
  font-size: 0.95rem;
  color: #1f1f23;
  font-weight: 750;
  text-align: left;
  flex-grow: 1;
  line-height: 1.4;
}

.msg-text-content strong {
  font-weight: 900;
}

.msg-hearts {
  font-size: 1.4rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Action Buttons */
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.btn-outline {
  background: var(--pac-white);
  border: 3px solid var(--pac-black);
  color: var(--pac-black);
  border-radius: 16px;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 14px 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-outline:hover {
  transform: translateY(-2px);
  background: #f4f4f7;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.btn-outline:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.btn-solid {
  background: var(--pac-pink);
  color: var(--pac-white);
  border: 3px solid var(--pac-black);
  border-radius: 16px;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 14px 24px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(255, 110, 199, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-solid:hover {
  transform: translateY(-2px);
  background: #ff4d94;
  box-shadow: 0 8px 20px rgba(255, 110, 199, 0.4);
}

.btn-solid:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(255, 110, 199, 0.15);
}

.price-tag-mini {
  position: absolute;
  top: -12px;
  right: 12px;
  background: var(--pac-gold, #ffd21e);
  color: #000;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
  border: 2px solid #000;
}

.confetti {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 40px;
}

.confetti-piece {
  position: absolute;
  width: 8px;
  height: 16px;
  border-radius: 2px;
}

/* ========== DYNAMIC FIRE EFFECT ANIMATIONS ========== */
.fire-container {
  position: absolute;
  inset: -15px;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.fire-particle {
  position: absolute;
  bottom: 0px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  background: var(--fire-color, #ff5a15);
  border-radius: 50%;
  opacity: 0.85;
  filter: blur(1.5px);
  animation: rise var(--duration) ease-out infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

@keyframes rise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.95;
  }

  30% {
    background: #ff7b00;
  }

  60% {
    background: #ffd21e;
  }

  100% {
    transform: translateY(-130px) translateX(var(--drift));
    opacity: 0;
    scale: 0.15;
  }
}

/* Fire flicker glow on the character display card */
@keyframes fireFlicker {

  0%,
  100% {
    box-shadow: 0 0 25px 6px var(--tier-color, #ff66a3), inset 0 0 10px rgba(255, 255, 255, 0.4);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 45px 12px #ff5a15, inset 0 0 15px rgba(255, 90, 21, 0.4);
    transform: scale(1.03);
  }
}

.modal-stage .pacbb-figure.has-fire {
  animation: fireFlicker 1.8s ease-in-out infinite;
}


@media (max-width: 1080px) {
  .pacbb-shell {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .pacbb-bottom-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hiw-steps {
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .pacbb-shell {
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .pacbb-card {
    border: 3.5px solid var(--pac-black);
    border-radius: 24px;
    padding: 16px;
    box-shadow: none;
  }

  .pacbb-title-wrapper {
    gap: 8px;
  }

  .pacbb-title {
    font-size: 1.6rem;
  }

  .pacbb-subtitle {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }

  .pacbb-carousel-wrap {
    height: 190px;
    margin: 16px 0;
    border-width: 3.5px !important;
    border-radius: 20px !important;
  }

  .pacbb-item {
    width: 95px;
    /* Sized down reel items for mobile */
    margin: 0 8px;
  }

  .pacbb-item.is-active {
    transform: scale(1.1);
  }

  .pacbb-figure {
    border-width: 2.5px;
  }

  .pacbb-name {
    font-size: 0.65rem;
  }

  .pacbb-chance {
    font-size: 0.65rem;
  }

  .pacbb-arrow {
    width: 32px;
    height: 32px;
  }

  .pacbb-arrow-left {
    left: 8px;
  }

  .pacbb-arrow-right {
    right: 8px;
  }

  /* Clean side-by-side and stacked layout to match Ref Image */
  .pacbb-action-row {
    display: grid;
    grid-template-areas:
      "play play"
      "demo price";
    grid-template-columns: 1fr 1.15fr;
    gap: 12px;
    width: 100%;
  }

  .btn-play {
    grid-area: play;
    width: 100%;
    height: 52px;
    font-size: 1.05rem;
    border-radius: 16px;
    border: 3.5px solid var(--pac-black);
    background: var(--pac-black);
    color: var(--pac-white);
  }

  .btn-demo {
    grid-area: demo;
    width: 100%;
    height: 52px;
    font-size: 0.85rem;
    border-radius: 14px;
    border: 3.5px solid var(--pac-black);
    padding: 0;
    justify-content: center;
  }

  .price-box {
    grid-area: price;
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: 3.5px solid var(--pac-black);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .price-box span {
    margin-bottom: 0;
    font-size: 0.65rem;
  }

  .price-box strong {
    margin-top: 0;
    font-size: 1.35rem;
  }

  /* Bottom Grid elements stack */
  .pacbb-bottom-grid {
    margin-top: 16px;
    gap: 12px;
  }

  .pacbb-info-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .pacbb-info-panel h3 {
    margin-bottom: 8px;
  }

  .rarity-grid {
    gap: 8px 12px;
  }

  /* HIW Steps become a clean vertical stack */
  .hiw-steps-container {
    position: relative;
  }

  .hiw-connector-line {
    display: block !important;
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 40px; /* Aligns with the center of the 44px icon when padding-left is 18px */
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, #7c3aed, #ff4081, #7c3aed);
    opacity: 0.2;
    z-index: 1;
  }

  .hiw-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .hiw-step {
    display: flex !important;
    flex-direction: row !important;
    text-align: left !important;
    grid-template-columns: none !important;
    gap: 16px !important;
    align-items: center !important;
    background: #ffffff !important;
    padding: 14px 18px !important;
    border-radius: 20px !important;
    border: 1.5px solid #f3f4f6 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.25s ease !important;
    z-index: 2;
  }

  .hiw-step:hover {
    transform: translateX(4px) !important;
    border-color: #7c3aed !important;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.06) !important;
  }

  .hiw-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 2px solid transparent !important;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(135deg, #7c3aed, #ff4081) border-box !important;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.05) !important;
    margin-bottom: 0 !important;
  }

  .hiw-svg {
    width: 18px !important;
    height: 18px !important;
  }

  .hiw-check {
    width: 14px !important;
    height: 14px !important;
    bottom: -1px !important;
    right: -1px !important;
  }

  .hiw-check svg {
    width: 7px !important;
    height: 7px !important;
  }

  .hiw-step-num {
    margin-bottom: 0 !important;
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: auto !important;
  }

  .hiw-text-block {
    align-items: flex-start !important;
    gap: 3px !important;
    flex: 1;
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: auto !important;
  }

  .hiw-step strong {
    font-size: 0.85rem !important;
  }

  .hiw-step p {
    font-size: 0.72rem !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  .hiw-arrow {
    display: none !important;
  }
}

/* ========== FAKE WINNER TENSION & EXTRA POLISH EFFECTS ========== */
@keyframes pacbb-shake {
  0% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-3px, 2px);
  }

  20% {
    transform: translate(3px, -1px);
  }

  30% {
    transform: translate(-2px, -2px);
  }

  40% {
    transform: translate(2px, 1px);
  }

  50% {
    transform: translate(-1px, 2px);
  }

  60% {
    transform: translate(2px, -1px);
  }

  70% {
    transform: translate(-2px, 1px);
  }

  80% {
    transform: translate(1px, -1px);
  }

  90% {
    transform: translate(-1px, 1px);
  }

  100% {
    transform: translate(0, 0);
  }
}

.pacbb-shake-active {
  animation: pacbb-shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes pacbb-glow-pulse {
  0% {
    box-sizing: border-box;
    box-shadow: 0 0 30px color-mix(in srgb, var(--tier-color) 45%, transparent);
    transform: scale(1.15);
  }

  40% {
    box-sizing: border-box;
    box-shadow: 0 0 60px color-mix(in srgb, var(--tier-color) 100%, transparent);
    transform: scale(1.25);
  }

  100% {
    box-sizing: border-box;
    box-shadow: 0 0 30px color-mix(in srgb, var(--tier-color) 45%, transparent);
    transform: scale(1.15);
  }
}

.pacbb-item.is-active.pacbb-glow-pulse-active .pacbb-figure {
  animation: pacbb-glow-pulse 0.80s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite !important;
}

@keyframes pacbb-lock-pulse {
  0% {
    transform: scale(1.15);
  }

  50% {
    transform: scale(1.32);
  }

  100% {
    transform: scale(1.15);
  }
}

.pacbb-item.is-active.pacbb-lock-pulse-active {
  animation: pacbb-lock-pulse 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) both !important;
  z-index: 25 !important;
}

/* ========== TICKET WALLET BAR ========== */
/* Normal Mode: soft white/light gray with black text */
.pacbb-ticket-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f4f4f8;
  border: 2px solid var(--pac-border);
  border-radius: 20px;
  padding: 14px 20px;
  margin-bottom: 24px;
  transition: all 0.5s var(--easing);
  position: relative;
  overflow: hidden;
}

/* Active Mode: pink-to-blue-to-yellow gradient bar */
.pacbb-card.has-tickets .pacbb-ticket-wallet {
  background: linear-gradient(90deg, #FDA4FF 0%, #a1c4fd 50%, #fef08a 100%);
  border: none;
  padding: 16px 22px;
  box-shadow: 0 10px 30px rgba(253, 164, 255, 0.3);
}

.ticket-wallet-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Wallet image icon */
.ticket-wallet-icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(160, 80, 255, 0.25));
  transition: transform 0.3s ease;
}

.pacbb-card.has-tickets .ticket-wallet-icon-img {
  animation: ticketBounce 2s ease-in-out infinite;
}

.ticket-wallet-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticket-wallet-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pac-muted);
}

.pacbb-card.has-tickets .ticket-wallet-label {
  color: rgba(0, 0, 0, 0.55);
}

.ticket-wallet-count {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--pac-black);
  line-height: 1;
  transition: all 0.3s var(--easing);
}

.ticket-wallet-count.bounce {
  animation: countBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.ticket-wallet-right {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pac-muted);
  text-align: right;
  max-width: 280px;
}

.pacbb-card.has-tickets .ticket-wallet-right {
  color: var(--pac-black);
  font-size: 1rem;
  font-weight: 800;
}

/* ========== V2 ACTION ROW ========== */
.pacbb-controls-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.pacbb-action-row-v2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: auto;
}

.pacbb-demo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* BUY TICKET button */
.btn-buy-ticket {
  background: #ffffff !important;
  color: var(--pac-black) !important;
  border: 3px solid var(--pac-black) !important;
  border-radius: 99px !important;
  height: 56px !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 0 24px !important;
  cursor: pointer !important;
  transition: all 0.25s var(--easing) !important;
  position: relative !important;
  overflow: hidden !important;
  text-transform: uppercase !important;
  box-shadow: none !important;
}

.btn-buy-ticket:hover {
  transform: translateY(-2px) !important;
  background: #fafafa !important;
}

.btn-buy-ticket:active {
  transform: translateY(0) !important;
}

.btn-buy-ticket svg {
  stroke: var(--pac-black) !important;
}

.buy-ticket-price {
  background: #f3f4f6 !important;
  border: 1.5px solid var(--pac-black) !important;
  color: var(--pac-black) !important;
  padding: 4px 12px !important;
  border-radius: 99px !important;
  font-size: 0.85rem !important;
  font-weight: 900;
}

/* Active Mode: BUY TICKET gets premium animated rainbow gradient */
.pacbb-card.has-tickets .btn-buy-ticket {
  background: linear-gradient(135deg, #fce4ff 0%, #e0d4ff 40%, #d4eaff 100%) !important;
  border: 2px solid transparent !important;
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box !important;
  background-image:
    linear-gradient(135deg, #fce4ff 0%, #e0d4ff 40%, #d4eaff 100%),
    linear-gradient(135deg, #ff6ec7, #a855f7, #7fc7ff, #fbbf24) !important;
  background-size: 100% 100%, 300% 300% !important;
  animation: gradientShift 5s ease infinite !important;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.2) !important;
}

.pacbb-card.has-tickets .btn-buy-ticket:hover {
  box-shadow: 0 10px 28px rgba(168, 85, 247, 0.35) !important;
}

.pacbb-card.has-tickets .btn-buy-ticket svg {
  stroke: #a855f7 !important;
}

.pacbb-card.has-tickets .buy-ticket-price {
  background: rgba(255, 255, 255, 0.75) !important;
  border: none !important;
}

/* PLAY NOW — same rainbow gradient as CONFIRM PURCHASE button when active */
.btn-play-v2 {
  background: #ffffff !important;
  color: #9ca3af !important;
  border: 3px solid var(--pac-black) !important;
  border-radius: 99px !important;
  height: 56px !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 0 36px !important;
  cursor: pointer !important;
  transition: transform 0.3s var(--easing), box-shadow 0.3s var(--easing), opacity 0.3s !important;
  position: relative !important;
  text-transform: uppercase !important;
  z-index: 2 !important;
  opacity: 0.45 !important;
  box-shadow: none !important;
}

.btn-play-v2:disabled {
  cursor: not-allowed !important;
  opacity: 0.3 !important;
}

.ticket-badge {
  background: #f3f4f6 !important;
  border: 1.5px solid var(--pac-black) !important;
  color: var(--pac-black) !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  padding: 3px 9px !important;
  border-radius: 99px !important;
  min-width: 32px !important;
  text-align: center !important;
}

.btn-play-v2:disabled .ticket-badge {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  border-color: #d1d5db !important;
}

/* Active Mode: PLAY NOW gets rainbow gradient */
.pacbb-card.has-tickets .btn-play-v2 {
  background: linear-gradient(90deg, #ff6ec7 0%, #ff3fa0 20%, #c026d3 40%, #7c3aed 60%, #2563eb 80%, #7fc7ff 100%) !important;
  background-size: 200% 100% !important;
  animation: gradientShift 3s ease infinite !important;
  color: #fff !important;
  border: none !important;
  opacity: 1 !important;
  box-shadow: 0 8px 24px rgba(192, 38, 211, 0.35) !important;
}

.pacbb-card.has-tickets .btn-play-v2:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 38px rgba(124, 58, 237, 0.6) !important;
}

.pacbb-card.has-tickets .ticket-badge {
  background: #ffffff !important;
  border: none !important;
  color: var(--pac-black) !important;
}

/* DEMO OPEN button */
.btn-demo {
  background: #fff !important;
  color: var(--pac-black) !important;
  border: 3px solid var(--pac-black) !important;
  border-radius: 99px !important;
  height: 56px !important;
  padding: 0 28px !important;
  font-weight: 900 !important;
  font-size: 0.95rem !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
  text-transform: uppercase;
}

.btn-demo:hover {
  background: #fafafa !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.btn-demo:active {
  transform: translateY(0) !important;
}


/* ========== TICKET BOUNCE ANIMATION ========== */
@keyframes ticketBounce {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(-6px) rotate(5deg);
  }
}

/* STOP NOW state — 3D tactile mechanical button layout */
.pacbb-card.has-tickets .btn-play-v2.pacbb-stop-now,
.btn-play-v2.pacbb-stop-now {
  background: #ff3b3b !important;
  background-image: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 5px solid #b32525 !important;
  opacity: 1 !important;
  color: white !important;
  box-shadow: 0 6px 15px rgba(255, 59, 59, 0.4) !important;
  transform: translateY(-2px) !important;
  transition: transform 0.1s cubic-bezier(0.2, 0.8, 0.2, 1), border-bottom-width 0.1s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
}

/* Specific override for ticket mode to retain the rainbow gradient with a matching dark purple bevel */
.pacbb-card.has-tickets .btn-play-v2.pacbb-stop-now {
  background: linear-gradient(90deg, #ff6ec7 0%, #ff3fa0 20%, #c026d3 40%, #7c3aed 60%, #2563eb 80%, #7fc7ff 100%) !important;
  background-size: 200% 100% !important;
  animation: gradientShift 3s ease infinite !important;
  border-bottom: 5px solid #5b21b6 !important;
  /* Dark purple 3D bevel */
  box-shadow: 0 6px 15px rgba(192, 38, 211, 0.45) !important;
}

.pacbb-card.has-tickets .btn-play-v2.pacbb-stop-now:hover,
.btn-play-v2.pacbb-stop-now:hover {
  transform: translateY(-4px) !important;
  border-bottom-width: 6px !important;
}

.pacbb-card.has-tickets .btn-play-v2.pacbb-stop-now:hover {
  box-shadow: 0 10px 25px rgba(192, 38, 211, 0.65) !important;
}

.btn-play-v2.pacbb-stop-now:hover {
  box-shadow: 0 10px 25px rgba(255, 59, 59, 0.6) !important;
}

.pacbb-card.has-tickets .btn-play-v2.pacbb-stop-now:active,
.btn-play-v2.pacbb-stop-now:active {
  transform: translateY(3px) !important;
  /* Physically moves down by 5px */
  border-bottom-width: 0px !important;
  /* Bottom bevel disappears */
  transition: none !important;
  /* Instant mechanical snap on click! */
}

.pacbb-card.has-tickets .btn-play-v2.pacbb-stop-now:active {
  box-shadow: 0 2px 6px rgba(192, 38, 211, 0.3) !important;
}

.btn-play-v2.pacbb-stop-now:active {
  box-shadow: 0 2px 6px rgba(255, 59, 59, 0.3) !important;
}

.lock-text-v2 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pac-muted);
}

/* ========== RECENT PULLS ROW ========== */
.pacbb-recent-pulls {
  display: flex;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  background: #f8fafc !important;
  /* Soft light slate background */
  border: 3px solid var(--pac-black) !important;
  /* Bold border matching buttons */
  border-radius: 20px !important;
  padding: 8px 14px !important;
  min-height: 56px !important;
  height: auto !important;
  max-width: 320px !important;
  box-sizing: border-box !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.recent-pulls-label {
  font-size: 0.65rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: var(--pac-muted) !important;
  white-space: normal !important;
  line-height: 1.2 !important;
  width: 50px !important;
  /* Forces wrapped display on two lines */
  flex-shrink: 0 !important;
}

.recent-pulls-track {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  max-width: 220px !important;
  overflow: visible !important;
}

.recent-pull-chip {
  position: relative !important;
  flex: 0 0 auto !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 11px !important;
  border: 2px solid var(--chip-tier-color, #18aeea) !important;
  background: #fff !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.2s ease !important;
  animation: chipPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both !important;
}

.recent-pull-chip:hover {
  transform: scale(1.12) !important;
}

.recent-pull-chip img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 9px !important;
}

.recent-pull-qty {
  position: absolute !important;
  bottom: -3px !important;
  right: -3px !important;
  font-size: 0.62rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  padding: 1px 4.5px !important;
  border-radius: 6px !important;
  border: 1.5px solid #fff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  pointer-events: none !important;
  font-family: inherit !important;
  line-height: 1 !important;
}

.recent-pull-chip-css {
  width: 100%;
  height: 100%;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--chip-tier-color, #18aeea) 0%, var(--chip-tier-color, #18aeea) 50%, #000 50%, #000 75%, #ffb3c6 75%);
}

/* ========== TICKET PURCHASE MODAL ========== */
.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--easing), visibility 0.3s;
}

.ticket-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.ticket-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ticket-modal-content {
  position: relative;
  /* Solid white background inside, animated rainbow gradient border outside */
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff6ec7, #7fc7ff, #ffe07d, #ff6ec7) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientShift 4s ease infinite;
  width: 100%;
  max-width: 400px;
  border-radius: 32px;
  padding: 36px 28px 28px;
  text-align: center;
  transform: scale(0.88) translateY(24px);
  transition: all 0.4s var(--easing);
  border: 3px solid transparent;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.14);
}

/* Subtle glow behind card */
.ticket-modal-content::after {
  content: "";
  position: absolute;
  /* Tuck it inside the card so that the outer gradient edges are hidden under the solid white background */
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.45), rgba(127, 199, 255, 0.38), rgba(255, 224, 125, 0.35));
  border-radius: 32px;
  z-index: -1;
  /* Super high blur to smoothly diffuse the gradient outwards without any visible shape lines */
  filter: blur(54px);
  pointer-events: none;
  transform: scale(0.95);
  will-change: filter;
}

.ticket-modal.is-open .ticket-modal-content {
  transform: scale(1) translateY(0);
}

/* Close button — light lavender circle */
.ticket-modal-content .modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #ff6ec7, #7fc7ff, #ffe07d, #ff6ec7) border-box;
  background-size: 100% 100%, 300% 300%;
  animation: gradientShift 4s ease infinite;
  color: #7c3aed;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ticket-modal-content .modal-close:hover {
  background: linear-gradient(#ffeef4, #ffeef4) padding-box,
              linear-gradient(135deg, #ff6ec7, #7fc7ff, #ffe07d, #ff6ec7) border-box;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 16px rgba(255, 110, 199, 0.25);
}

/* Icon wrap with sparkles */
.ticket-modal-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 4px;
}

.ticket-modal-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 8px 16px rgba(255, 110, 199, 0.3));
}

.ticket-modal-icon img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
}

/* Sparkle positions */
.tm-sparkle {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ff6ec7, #7fc7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: tmSparkle 2s ease-in-out infinite;
}

.tm-sparkle-1 {
  top: -6px;
  left: -8px;
  animation-delay: 0s;
}

.tm-sparkle-2 {
  top: -10px;
  right: 0px;
  animation-delay: 0.5s;
}

.tm-sparkle-3 {
  bottom: 0px;
  left: -12px;
  animation-delay: 1s;
}

.tm-sparkle-4 {
  bottom: 2px;
  right: -8px;
  animation-delay: 1.5s;
}

@keyframes tmSparkle {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.ticket-modal-header {
  margin-bottom: 20px;
}

.ticket-modal-icon-wrap .ticket-modal-icon {
  animation: ticketBounce 2s ease-in-out infinite;
}

.ticket-modal-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #000;
  margin: 8px 0 4px;
  letter-spacing: -0.03em;
}

.ticket-modal-sub {
  font-size: 0.88rem;
  color: var(--pac-muted);
  font-weight: 600;
  margin: 0 0 20px;
}

/* Stepper row — gradient-bordered circles */
.ticket-qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 4px 0 20px;
}

/* Gradient ring buttons */
.ticket-qty-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff6ec7, #7fc7ff) border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9333ea;
  transition: all 0.15s ease;
  padding: 0 !important;
  line-height: 1 !important;
}

.ticket-qty-btn svg {
  stroke: currentColor;
  display: block;
}

.ticket-qty-btn:hover {
  background: linear-gradient(#f9f0ff, #f9f0ff) padding-box, linear-gradient(135deg, #ff6ec7, #7fc7ff) border-box;
  transform: scale(1.06);
}

.ticket-qty-btn:active {
  transform: scale(0.94);
}

.ticket-qty-display {
  text-align: center;
  min-width: 70px;
}

.ticket-qty-num {
  font-size: 3.5rem;
  font-weight: 900;
  color: #000;
  display: block;
  line-height: 1;
}

.ticket-qty-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pac-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Total row — bright white panel */
.ticket-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  margin-top: 0;
}

.ticket-total-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--pac-black);
}

/* Price: gradient text pink → yellow */
.ticket-total-price {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(90deg, #ff6ec7, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Payment method buttons — white with gradient border */
.ticket-payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.ticket-pay-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #e2e8f0, #e2e8f0) border-box;
  cursor: pointer;
  transition: all 0.2s var(--easing);
}

.ticket-pay-btn:hover {
  background: linear-gradient(#f8f8ff, #f8f8ff) padding-box,
    linear-gradient(135deg, #ff6ec7, #7fc7ff) border-box;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.ticket-pay-btn.ticket-pay-active {
  background: linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #ff6ec7, #7fc7ff) border-box;
  box-shadow: 0 4px 14px rgba(255, 110, 199, 0.2);
}

.ticket-pay-btn svg {
  flex-shrink: 0;
}

.ticket-pay-btn span {
  font-size: 0.78rem;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
}

.promo-badge {
  display: block;
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7c3aed;
  margin-top: 2px;
}

/* Confirm button — full rainbow gradient with sparkles */
.ticket-confirm-btn {
  width: 100%;
  height: 60px;
  background: linear-gradient(90deg, #ff6ec7 0%, #ff3fa0 20%, #c026d3 40%, #7c3aed 60%, #2563eb 80%, #fbbf24 100%);
  background-size: 200% 100%;
  animation: gradientShift 3s ease infinite;
  border: none;
  border-radius: 18px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s var(--easing);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(192, 38, 211, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ticket-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(192, 38, 211, 0.5);
}

.ticket-confirm-btn:active {
  transform: translateY(0);
}

.tc-sparkle {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Note with shield icon */
.ticket-modal-note {
  font-size: 0.78rem;
  color: var(--pac-muted);
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ========== DUPLICATE MODAL ========== */
.duplicate-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s var(--easing), visibility 0.3s;
}

.duplicate-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.duplicate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.duplicate-modal-content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 40px;
  padding: 44px 32px 36px;
  text-align: center;
  transform: scale(0.88) translateY(24px);
  transition: all 0.4s var(--easing);
  border: 4px solid #000;
}

.duplicate-modal.is-open .duplicate-modal-content {
  transform: scale(1) translateY(0);
}

.dup-header {
  margin-bottom: 16px;
}

.dup-badge {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, var(--pac-gold-light), var(--pac-gold));
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #000;
  margin-bottom: 12px;
  border: 2.5px solid #000;
  animation: dupBadgePulse 2s ease-in-out infinite;
}

.dup-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #000;
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}

.dup-sub {
  font-size: 0.85rem;
  color: var(--pac-muted);
  font-weight: 600;
  margin: 0;
}

.dup-stage {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}



.dup-stage .pacbb-item {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  position: relative;
  z-index: 2;
}

.dup-stage .pacbb-figure {
  width: 100% !important;
  height: 100% !important;
  border-radius: 36px !important;
  border: 4.5px solid var(--pac-gold) !important;
  background: #fff !important;
  box-sizing: border-box !important;
  animation: floatReward 3s ease-in-out infinite;
}

.dup-stage .pacbb-item-info {
  display: none !important;
}

.dup-name {
  font-size: 1.25rem;
  font-weight: 900;
  color: #000;
  margin-bottom: 12px;
}

.dup-tickets-remaining {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff5f8;
  border: 2.5px solid #000;
  border-radius: 99px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #000;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.dup-ticket-icon {
  font-size: 1rem;
}

.dup-msg {
  font-size: 0.85rem;
  color: #1f1f23;
  font-weight: 750;
  background: #ffeef4;
  border: 2.5px solid #000;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 14px auto 20px;
  max-width: 320px;
}

.dup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dup-keep-btn {
  padding: 14px;
  border: 3px solid #000;
  border-radius: 16px;
  background: #fff;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #000;
  outline: none;
}

.dup-keep-btn:hover {
  background: #f4f4f7;
}

.dup-keep-btn:active {
  background: #e8e8ec;
}

.dup-respin-btn {
  padding: 14px;
  border: 3px solid #000;
  border-radius: 16px;
  background: var(--pac-pink, #ff66a3);
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  outline: none;
}

.dup-respin-btn:not(:disabled):hover {
  background: #ff4d94;
}

.dup-respin-btn:not(:disabled):active {
  background: #e8438a;
}

.dup-respin-btn:disabled {
  background: #f4f4f5;
  color: #a1a1aa;
  border: 3px solid #d4d4d8;
  cursor: not-allowed;
  opacity: 0.85;
}

.dup-respin-btn svg {
  animation: spinIcon 1s linear infinite paused;
}

.dup-respin-btn:not(:disabled):hover svg {
  animation-play-state: running;
}

/* ========== PURCHASE SUCCESS TOAST ========== */
.ticket-success-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, var(--pac-gold-light), var(--pac-gold));
  color: #000;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 12px 24px;
  border-radius: 99px;
  border: 2.5px solid #000;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(240, 165, 0, 0.45);
  transition: all 0.4s var(--easing);
  white-space: nowrap;
}

.ticket-success-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== ANIMATIONS ========== */
@keyframes ticketBounce {

  0%,
  100% {
    transform: rotate(-5deg) scale(1);
  }

  50% {
    transform: rotate(5deg) scale(1.1);
  }
}

@keyframes countBounce {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.5);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes playGlowPulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px var(--pac-gold), 0 0 16px rgba(240, 165, 0, 0.25);
  }

  50% {
    box-shadow: 0 0 0 5px var(--pac-gold), 0 0 30px rgba(240, 165, 0, 0.5);
  }
}

@keyframes chipPop {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes dupBadgePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 165, 0, 0);
  }

  50% {
    box-shadow: 0 0 12px 3px rgba(240, 165, 0, 0.4);
  }
}

@keyframes spinIcon {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pacbb-stop-flash {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* ========== PACBB-CARD HAS-TICKETS GOLD GLOW ========== */
.pacbb-card.has-tickets {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.04),
    0 0 50px rgba(240, 165, 0, 0.18),
    0 0 0 1px rgba(240, 165, 0, 0.15);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 600px) {
  .pacbb-action-row-v2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .btn-buy-ticket,
  .btn-play-v2 {
    height: 52px !important;
    font-size: 0.82rem !important;
    border-radius: 14px !important;
    padding: 0 12px !important;
  }

  .btn-demo {
    grid-column: span 2 !important;
    height: 52px !important;
    font-size: 0.82rem !important;
    border-radius: 14px !important;
    padding: 0 12px !important;
  }

  .pacbb-recent-pulls {
    grid-column: span 2 !important;
    max-width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
  }

  .buy-ticket-price {
    display: none !important;
  }

  .ticket-wallet-count {
    font-size: 1.5rem !important;
  }

  .ticket-modal-content,
  .duplicate-modal-content {
    padding: 28px 20px 24px !important;
    border-radius: 28px !important;
  }

  .ticket-modal-title,
  .dup-title {
    font-size: 1.5rem !important;
  }

  .dup-actions {
    grid-template-columns: 1fr !important;
  }

  .recent-pull-chip {
    width: 38px;
    height: 38px;
  }

  .rarity-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .rarity-grid > :last-child:nth-child(odd) {
    grid-column: span 1 !important;
  }
}

/* ========== TICKET CARD & COLLECTION BUTTON & COLLECTION MODAL STYLES ========== */


/* Storefront Collection Launcher Button */
.pacbb-collection-btn {
  display: none;
  /* Controlled by JS */
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff !important;
  color: var(--pac-black) !important;
  border: 2.5px solid var(--pac-black) !important;
  border-radius: 99px !important;
  padding: 8px 18px !important;
  font-size: 0.85rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  transition: all 0.25s var(--easing) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin: 0 !important;
  width: max-content !important;
  height: 54px !important;
  /* height-matched with ticket-card */
  box-sizing: border-box !important;
}

.pacbb-collection-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
  background: #fafafa !important;
}

.pacbb-collection-btn:active {
  transform: translateY(0) !important;
}

.pacbb-collection-btn-badge {
  background: var(--pac-black);
  color: var(--pac-white);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1.5px solid var(--pac-white);
}

/* Collection Inventory Modal — Store Style */
.collection-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.collection-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.collection-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.collection-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background: #f8f8f3;
  border: 2px solid #111;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

.collection-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #111;
  background: #fff;
  color: #111;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.collection-modal-close:hover {
  background: #111;
  color: #fff;
}

.collection-modal-header {
  padding: 24px 24px 14px;
  background: #f8f8f3;
}

.collection-modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  color: #111;
}

.collection-modal-desc {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
  margin-bottom: 0;
}

/* Search */
.collection-modal-search {
  padding: 0 24px 14px;
}

.collection-search-input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  background: #fff;
  border: 2px solid #111;
  border-radius: 99px;
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
}

.collection-search-input:focus {
  border-color: #ffd400;
}

.collection-search-wrap {
  position: relative;
}

.collection-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
}

/* Body — list */
.collection-modal-body {
  padding: 0 24px 24px;
  overflow-y: auto;
  flex: 1;
}

.collection-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.collection-item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #111;
  border-radius: 18px;
}

.col-row-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f3f3f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.col-row-thumb img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.col-row-info {
  flex: 1;
  min-width: 0;
}

.col-row-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-row-meta {
  font-size: 0.75rem;
  color: #888;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.col-row-meta .rarity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.col-row-qty {
  text-align: center;
  flex-shrink: 0;
}

.col-row-qty-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: #111;
}

.col-row-qty-label {
  font-size: 0.6rem;
  color: #999;
  display: block;
}

.col-row-add-btn {
  height: 36px;
  padding: 0 18px;
  background: #fff;
  border: 2px solid #111;
  border-radius: 99px;
  color: #111;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.col-row-add-btn:hover {
  background: #ffd400;
}

/* Empty State */
.collection-empty-state {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.collection-empty-state p {
  font-size: 1.1rem;
  font-weight: 800;
  color: #111;
  margin: 0;
}

.collection-empty-state small {
  font-size: 0.85rem;
  color: #888;
}

/* Footer */
.collection-modal-footer {
  padding: 0 24px 24px;
}

.collection-summary-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
  background: #fff;
  border: 2px solid #111;
  border-radius: 18px;
  padding: 14px;
}

.col-summary-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.col-summary-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.03em;
}

.col-summary-val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #111;
}

.collection-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.collection-modal-actions .btn-checkout-ship,
.collection-modal-actions .btn-keep-collecting {
  height: 48px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid #111;
}

.collection-modal-actions .btn-checkout-ship {
  background: #ffd21e;
  color: #111;
}

.collection-modal-actions .btn-checkout-ship:hover:not(:disabled) {
  background: #ffe054;
}

.collection-modal-actions .btn-checkout-ship:disabled {
  background: #eee;
  color: #bbb;
  cursor: not-allowed;
}

.collection-modal-actions .btn-keep-collecting {
  background: #fff;
  color: #111;
}

.collection-modal-actions .btn-keep-collecting:hover {
  background: #f5f5f0;
}

@media (max-width: 600px) {
  .collection-modal-content {
    max-height: 92vh;
    border-radius: 20px;
  }

  .collection-item-row {
    padding: 8px 12px;
    gap: 10px;
  }

  .col-row-thumb {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .col-row-name {
    font-size: 0.85rem;
  }

  .col-row-add-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 0.75rem;
  }

  .collection-summary-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .collection-modal-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .collection-modal-actions .btn-checkout-ship,
  .collection-modal-actions .btn-keep-collecting {
    height: 44px;
    font-size: 0.8rem;
  }
}

/* ========== ACTIVE MODE TICKET GRADIENT OVERRIDES FOR ALL BORDERS ========== */
.pacbb-card.has-tickets .pacbb-collection-btn {
  border: 2.5px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--grad-rainbow) border-box !important;
  background-size: 100% 100%, 300% 300% !important;
  animation: gradientShift 6s ease infinite !important;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15) !important;
}

.pacbb-card.has-tickets .btn-demo {
  border: 3px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--grad-rainbow) border-box !important;
  background-size: 100% 100%, 300% 300% !important;
  animation: gradientShift 6s ease infinite !important;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15) !important;
}

.pacbb-card.has-tickets .pacbb-info-panel {
  border: 3.5px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--grad-rainbow) border-box !important;
  background-size: 100% 100%, 300% 300% !important;
  animation: gradientShift 6s ease infinite !important;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.08) !important;
}

.pacbb-card.has-tickets .pacbb-kicker {
  border: 3px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--grad-rainbow) border-box !important;
  background-size: 100% 100%, 300% 300% !important;
  animation: gradientShift 6s ease infinite !important;
}

.pacbb-card.has-tickets .pacbb-arrow {
  border: 3px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
    var(--grad-rainbow) border-box !important;
  background-size: 100% 100%, 300% 300% !important;
  animation: gradientShift 6s ease infinite !important;
}

/* ========== FLUID TICKET BUTTON ========== */
.pacbb-fluid-ticket-btn {
  display: block;
  width: 196px !important;
  height: 56px !important;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  user-select: none;
  position: relative;
  transition: transform 0.2s ease, filter 0.2s ease;
  border-radius: 12px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.16)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pacbb-fluid-ticket-btn:hover {
  transform: translateY(-3px) scale(1.01);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.2)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.14));
}

.pacbb-fluid-ticket-btn:active {
  transform: translateY(1px) scale(0.98);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

.pacbb-fluid-ticket-btn:disabled {
  cursor: default;
  transform: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

/* Finger Pointing Hint */
.ticket-pointing-finger {
  position: absolute;
  left: -42px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  color: #ff527b; /* Neon coral highlight */
  pointer-events: none;
  animation: ticket-finger-bounce 1s infinite ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.ticket-pointing-finger svg {
  width: 100%;
  height: 100%;
  transform: rotate(90deg); /* Points to the right */
}

@keyframes ticket-finger-bounce {
  0%, 100% {
    left: -42px;
  }
  50% {
    left: -50px;
  }
}

/* On mobile, place it above pointing down to avoid overflow */
@media (max-width: 600px) {
  .ticket-pointing-finger {
    left: 24px;
    top: -34px;
    transform: none;
    animation: ticket-finger-bounce-mobile 1s infinite ease-in-out;
  }
  
  .ticket-pointing-finger svg {
    transform: rotate(180deg); /* Points down */
  }
}

@keyframes ticket-finger-bounce-mobile {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.fluid-ticket-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Base element transitions */
.fluid-ticket-bg {
  transition: fill 0.5s ease;
}

.fluid-ticket-border {
  transition: stroke 0.8s ease, stroke-width 0.5s ease;
}

.fluid-ticket-cut {
  transition: stroke 0.8s ease, opacity 0.8s ease;
}

.fluid-icon-svg {
  transition: stroke 0.5s ease;
}

/* Success glow states */
.fluid-ticket-success-ring,
.fluid-ticket-success-glow {
  transition: opacity 1.2s ease;
}

.fluid-left-container {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
  padding-left: 30px;
  box-sizing: border-box;
}

.fluid-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pac-black, #1f2937);
  transition: color 0.5s ease;
}

.pacbb-fluid-ticket-btn.is-processing .fluid-icon-wrap,
.pacbb-fluid-ticket-btn.is-success .fluid-icon-wrap {
  color: #ffffff;
}

.fluid-icon-svg {
  width: 52px;
  height: 52px;
  display: block;
  stroke: currentColor;
}

.fluid-labels-wrap {
  position: relative;
  width: 100%;
  height: 60px;
}

.fluid-label-state {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(2px) scale(0.98);
  filter: blur(2px);
  transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
  pointer-events: none;
}

.fluid-label-state.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.fluid-title {
  font-family: inherit;
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.015em;
  color: var(--pac-black, #1f2937);
  line-height: 1.0;
  text-align: left;
  white-space: nowrap;
}

/* Text color helpers */
.text-white {
  color: #ffffff !important;
}

.text-purple-200 {
  color: #e9d5ff !important;
}

.text-purple-100 {
  color: #f3e8ff !important;
}

/* Right area layout */
.fluid-right-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.fluid-price-state,
.fluid-check-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.95);
  filter: blur(2px);
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
  pointer-events: none;
}

.fluid-price-state.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.fluid-check-state.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.fluid-price-text {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--pac-black, #1f2937);
}

.fluid-check-svg {
  width: 44px;
  height: 44px;
  display: block;
}

/* Outer success glow overlays */
.fluid-success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  filter: blur(16px);
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
  z-index: 1;
}

/* ================= PROCESSING STATE ================= */
.pacbb-fluid-ticket-btn.is-processing {
  pointer-events: none;
}

.pacbb-fluid-ticket-btn.is-processing #fluidClickGlow {
  r: 130px;
  transition: r 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  animation: pulseGlowCircle 3s ease-in-out infinite;
}

@keyframes pulseGlowCircle {

  0%,
  100% {
    r: 130px;
  }

  50% {
    r: 150px;
  }
}

.pacbb-fluid-ticket-btn.is-processing .fluid-ticket-border {
  stroke: #ffffff;
}

.pacbb-fluid-ticket-btn.is-processing .fluid-ticket-cut {
  stroke: #ffffff;
  opacity: 0.3;
}

/* ================= SUCCESS STATE ================= */
.pacbb-fluid-ticket-btn.is-success {
  pointer-events: none;
  box-shadow: 0 0 40px rgba(168, 140, 248, 0.4);
}

.pacbb-fluid-ticket-btn.is-success #fluidClickGlow {
  r: 800px;
  transition: r 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.pacbb-fluid-ticket-btn.is-success .fluid-ticket-border {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 2.5px;
}

.pacbb-fluid-ticket-btn.is-success .fluid-ticket-success-ring,
.pacbb-fluid-ticket-btn.is-success .fluid-ticket-success-glow {
  opacity: 0.3;
}

.pacbb-fluid-ticket-btn.is-success .fluid-ticket-success-glow {
  opacity: 0.2;
}

.pacbb-fluid-ticket-btn.is-success .fluid-ticket-cut {
  opacity: 0;
}

.pacbb-fluid-ticket-btn.is-success .fluid-success-overlay {
  opacity: 1;
}

/* Confetti / Sparks animation */
.fluid-spark {
  transform-origin: center;
  transform: translate(0, 0) scale(0);
  opacity: 0;
  transition: transform 0.1s ease, opacity 0.1s ease;
}

.pacbb-fluid-ticket-btn.is-success .fluid-spark {
  animation: sparkAnimation 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--delay);
}

@keyframes sparkAnimation {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }

  30% {
    transform: translate(calc(var(--tx) * 0.3), calc(var(--ty) * 0.3)) scale(1.2);
    opacity: 0.8;
  }

  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Ticket Mode Gradient Border Style */
.pacbb-card.has-tickets .pacbb-fluid-ticket-btn:not(.is-processing):not(.is-success) .fluid-ticket-border {
  stroke: url(#fluidBorderRainbow);
}

/* Fluid ticket icon fill transitions during processing/success states */
.pacbb-fluid-ticket-btn.is-processing .fluid-icon-svg path:first-child,
.pacbb-fluid-ticket-btn.is-success .fluid-icon-svg path:first-child {
  fill: rgba(255, 255, 255, 0.2) !important;
}

/* ================= TICKET PURCHASE TRANSITION EFFECTS ================= */

/* Wallet Bounce Scale */
.wallet-bounce-active {
  animation: walletBounceScale 0.75s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes walletBounceScale {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.18) rotate(-3deg);
    box-shadow: 0 0 25px rgba(255, 102, 163, 0.7);
  }
  45% {
    transform: scale(0.92) rotate(2deg);
    box-shadow: 0 0 10px rgba(255, 102, 163, 0.3);
  }
  70% {
    transform: scale(1.06) rotate(-1deg);
    box-shadow: 0 0 18px rgba(255, 102, 163, 0.5);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* Play Button Spring pop-in */
.play-btn-pop-active {
  animation: playBtnSpring 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes playBtnSpring {
  0% {
    transform: scale(0.9);
  }
  30% {
    transform: scale(1.22);
    box-shadow: 0 0 35px rgba(255, 102, 163, 0.8);
  }
  55% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

/* Lock text sliding down and disappearing */
.lock-text-exit {
  animation: lockTextExit 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lockTextExit {
  0% {
    transform: translateY(0);
    opacity: 1;
    height: auto;
    margin-top: 12px;
  }
  100% {
    transform: translateY(15px);
    opacity: 0;
    height: 0;
    margin-top: 0;
    padding: 0;
    overflow: hidden;
  }
}

/* Morph Helper Text Status Badge */
.helper-ready-active {
  animation: morphHelperText 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, helperGlowFlash 2.5s ease-in-out infinite;
  display: inline-block;
  padding: 6px 14px !important;
  font-weight: 900 !important;
  font-size: 0.82rem !important;
  border-radius: 12px !important;
  border: 2.5px solid #000 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #000 !important;
  background: #ffeef4 !important;
}

@keyframes morphHelperText {
  0% {
    transform: scale(0.8) translateY(-5px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

@keyframes helperGlowFlash {
  0% {
    border-color: #000;
  }
  50% {
    border-color: var(--pac-pink);
    box-shadow: 0 0 15px rgba(255, 102, 163, 0.45);
    background: #fff0f5;
  }
  100% {
    border-color: #000;
  }
}

/* Floating Particles (Stars and Tickets) */
.ticket-transition-particle {
  position: absolute;
  pointer-events: none;
  z-index: 10000;
  font-family: inherit;
  font-weight: 900;
  line-height: 1;
  user-select: none;
  animation: particleFloatUp var(--duration) cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes particleFloatUp {
  0% {
    transform: translate(0, 0) scale(0.5) rotate(0deg);
    opacity: 1;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx), var(--dy)) scale(var(--ds)) rotate(var(--dr));
    opacity: 0;
  }
}

/* Hide pointing finger and lock warning when card has active tickets */
.pacbb-card.has-tickets .ticket-pointing-finger,
.pacbb-card.has-tickets #lockText {
  display: none !important;
}

/* ========== FIREWORK SHOW PARTICLES ========== */
.firework-rocket {
  position: absolute;
  width: 6px;
  height: 24px;
  background: linear-gradient(to top, transparent, #ffd21e, #ffffff);
  border-radius: 99px;
  z-index: 10001;
  pointer-events: none;
  opacity: 1;
  transform: translate(-50%, -50%);
  animation: rocketLaunch var(--duration) cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes rocketLaunch {
  0% {
    transform: translate(-50%, 0) scaleY(1.5);
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, var(--target-y)) scaleY(0.2);
    opacity: 0;
  }
}

.firework-spark {
  position: absolute;
  pointer-events: none;
  z-index: 10000;
  font-family: inherit;
  font-weight: 900;
  line-height: 1;
  user-select: none;
  transform: translate(-50%, -50%);
  animation: sparkBurst var(--duration) cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}

@keyframes sparkBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 1;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(var(--ds)) rotate(var(--dr));
    opacity: 0;
  }
}

/* ========== AUDIO/VINYL ANIMATIONS ========== */
.vinyl-spin {
  animation: spin-vinyl 3s linear infinite !important;
}

@keyframes spin-vinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.audio-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  width: 18px;
}

.audio-wave span {
  display: block;
  width: 2.5px;
  background: #111;
  height: 4px;
  animation: bounce-wave 0.8s infinite alternate ease-in-out;
}

.audio-wave span:nth-child(2) { animation-delay: 0.15s; }
.audio-wave span:nth-child(3) { animation-delay: 0.3s; }
.audio-wave span:nth-child(4) { animation-delay: 0.45s; }

@keyframes bounce-wave {
  0% { height: 3px; }
  100% { height: 16px; }
}

/* ===== Extracted from store(new).html inline <style> ===== */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1); }
}

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

@keyframes shake {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  10% { transform: translate(-50%, -50%) rotate(-5deg); }
  20% { transform: translate(-50%, -50%) rotate(5deg); }
  30% { transform: translate(-50%, -50%) rotate(-5deg); }
  40% { transform: translate(-50%, -50%) rotate(5deg); }
  50% { transform: translate(-50%, -50%) rotate(-3deg); }
  60% { transform: translate(-50%, -50%) rotate(3deg); }
  70% { transform: translate(-50%, -50%) rotate(-2deg); }
  80% { transform: translate(-50%, -50%) rotate(2deg); }
  90% { transform: translate(-50%, -50%) rotate(-1deg); }
}

@keyframes boxOpen {
  0% { transform: translate(-50%, -50%) scale(1); }
  30% { transform: translate(-50%, -50%) scale(1.1); }
  60% { transform: translate(-50%, -120%) scale(0.8) rotate(10deg); opacity: 0.8; }
  100% { transform: translate(-50%, -150%) scale(0.5) rotate(20deg); opacity: 0; }
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.blindbox-shake {
  animation: shake 0.8s ease-in-out;
}

.blindbox-open {
  animation: boxOpen 0.8s ease-in-out forwards;
}

.blindbox-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  animation: particleBurst 1s ease-out forwards;
}

.blindbox-rarity-common {
  background: linear-gradient(135deg, #a8a8a8, #d0d0d0);
  color: #333;
}

.blindbox-rarity-rare {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: #fff;
}

.blindbox-rarity-legendary {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1a2e;
}

.blindbox-widget:hover .blindbox-visual #blindBoxIcon {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 25px 50px rgba(255, 215, 0, 0.4);
}

/* Account Animations */
.account-pulse {
  animation: account-glow 0.8s 4 ease-in-out;
}

.account-bounce {
  animation: account-bounce 0.6s infinite;
}

@keyframes account-glow {
  0%, 100% { filter: drop-shadow(0 0 0px var(--ink)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.4)); transform: scale(1.2) rotate(5deg); }
}

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

/* STOP NOW BUTTON STYLES */
.pacbb-stop-now {
  background: #ff3b3b !important;
  color: white !important;
  border-color: #e62e2e !important;
  box-shadow: 0 0 15px rgba(255, 59, 59, 0.6) !important;
  animation: stopPulse 1.2s infinite alternate !important;
  transform: scale(1.02);
  font-weight: 900 !important;
  letter-spacing: 0.05em;
}

@keyframes stopPulse {
  from { box-shadow: 0 0 10px rgba(255, 59, 59, 0.4); }
  to { box-shadow: 0 0 30px rgba(255, 59, 59, 0.9); }
}

.pacbb-stop-flash {
  animation: stopFlash 0.4s ease-out forwards !important;
}

@keyframes stopFlash {
  0% { background: white; color: black; transform: scale(1.15); box-shadow: 0 0 50px white; }
  100% { background: #ff3b3b; color: white; transform: scale(1.02); box-shadow: 0 0 15px rgba(255, 59, 59, 0.6); }
}

.pacbb-pointer-glow {
  filter: drop-shadow(0 0 15px rgba(255, 59, 59, 0.9)) !important;
  transform: scale(1.15) !important;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@media (max-width: 600px) {
  .pacbb-stop-now {
    transform: scale(1.08) !important;
    font-size: 1.1rem !important;
  }

  .pacbb-stop-flash {
    animation: stopFlashMobile 0.4s ease-out forwards !important;
  }

  @keyframes stopFlashMobile {
    0% { background: white; color: black; transform: scale(1.2); box-shadow: 0 0 50px white; }
    100% { background: #ff3b3b; color: white; transform: scale(1.08); box-shadow: 0 0 15px rgba(255, 59, 59, 0.6); }
  }
}

/* ========== BLIND BOX 2.0 MARKETING PREVIEW ========== */
.bb-preview-section {
  padding: 80px 24px;
  text-align: center;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: white;
  position: relative;
  overflow: hidden;
}
.bb-preview-container { max-width: 640px; margin: 0 auto; }
.bb-preview-badge {
  display: inline-block;
  background: #FBBF24;
  color: #000;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.bb-preview-title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 0 0 12px;
}
.bb-preview-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin: 0 0 32px;
}
.bb-preview-tiers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
}
.bb-tier {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.bb-tier-common { background: rgba(6,182,212,0.2); color: #67E8F9; }
.bb-tier-rare { background: rgba(236,72,153,0.2); color: #F9A8D4; }
.bb-tier-epic { background: rgba(139,92,246,0.2); color: #C4B5FD; }
.bb-tier-legendary { background: rgba(251,191,36,0.2); color: #FDE68A; }
.bb-tier-special { background: rgba(239,68,68,0.2); color: #FCA5A5; }
.bb-preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FBBF24;
  color: #000;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 16px 48px;
  border-radius: 16px;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
}
.bb-preview-cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}
.bb-preview-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0 #000;
}
.bb-preview-footnote {
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.bb-preview-sep { margin: 0 8px; }
.bb-preview-link {
  color: #FBBF24;
  text-decoration: none;
  font-weight: 700;
}
.bb-preview-link:hover { text-decoration: underline; }

/* =============================================
   BLIND BOX PANEL FRAME (matches Payment Settings)
   ============================================= */

.bb-frame.ds-panel {
  border: 2px solid #111;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
}
.bb-frame.ds-panel > .bb-tab-bar {
  border-bottom: 2px solid #111;
  margin: 0;
  flex-shrink: 0;
}
.bb-frame.ds-panel > .bb-tab-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px;
}
.bb-frame.ds-panel > .bb-save-bar {
  flex-shrink: 0;
  position: static;
  margin-top: 0;
}

/* =============================================
   BLIND BOX TAB NAVIGATION
   ============================================= */

.bb-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 3px solid #111;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}
.bb-tab-bar::-webkit-scrollbar { display: none; }

.bb-tab {
  flex: 1 0 auto;
  padding: 12px 20px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  font-family: inherit;
  min-width: 80px;
  text-align: center;
}
.bb-tab:hover { color: #111; }
.bb-tab.active {
  color: #111;
  border-bottom-color: #111;
}

.bb-tab-panel {
  display: none;
}
.bb-tab-panel.active {
  display: block;
}

/* =============================================
   STICKY SAVE BAR
   ============================================= */

.bb-save-bar {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 2px solid #111;
  padding: 12px 16px;
  margin-top: 24px;
  z-index: 10;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

.bb-save-btn {
  padding: 12px 24px;
  font-size: 0.85rem;
  font-weight: 900;
  border: 2.5px solid #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: inherit;
  transition: background 0.15s;
}
.bb-save-btn.primary {
  background: #111;
  color: #fff;
}
.bb-save-btn.primary:hover { background: #333; }
.bb-save-btn.secondary {
  background: #fff;
  color: #111;
}
.bb-save-btn.secondary:hover { background: #f0f0f0; }

/* =============================================
   JUNK DESIGNER 2-COLUMN GRID
   ============================================= */

.bb-junk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* SFX grid: 2-column responsive */
.bb-sfx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* =============================================
   RESPONSIVE GRID RULES
   ============================================= */

@media (min-width: 1200px) {
  /* GAME: 2-column for related fields */
  #panel-bb-game .ds-widget-flex {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
  }
  /* SOUNDS: 3-column for audio cards */
  #panel-bb-sounds > section > div:last-child {
    grid-template-columns: 1fr 1fr 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Hide hero header on mobile — user already knows they're in Blind Box */
  #page-blindbox > .ds-widget-action-bar {
    display: none;
  }

  /* Hide search bar and icon on mobile top bar */
  #globalSearchCatalogName,
  #globalSearchIcon,
  #globalSearch {
    display: none !important;
  }

  /* ===== MOBILE: Remove outer frame spacing ===== */
  .ds-main {
    padding: 0 !important;
  }
  .ds-content {
    padding: 0 !important;
  }
  #page-blindbox {
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .bb-frame.ds-panel {
    max-height: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    margin: 0;
  }
  .bb-frame.ds-panel > .bb-tab-content {
    padding: 12px;
    padding-bottom: 80px;
  }

  /* Mobile tab bar: fully visible, no clipping */
  .bb-tab {
    padding: 10px 6px;
    font-size: 0.6rem;
    min-width: 48px;
    letter-spacing: 0.02em;
    flex: 1 1 0%;
  }

  /* Theme buttons: stack vertically on mobile */
  #panel-bb-game [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Save bar: mobile-optimized */
  .bb-frame.ds-panel > .bb-save-bar {
    display: flex;
    justify-content: stretch;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    border-radius: 0;
    border-top: 2px solid #111;
    border-bottom: none;
    z-index: 20;
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    gap: 8px;
  }
  .bb-save-btn {
    flex: 1;
    justify-content: center;
    padding: 12px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }
  .bb-save-btn svg {
    width: 14px;
    height: 14px;
  }

  /* ===== RARITY tab: ensure button visibility ===== */
  #panel-bb-rarity > div {
    padding: 16px !important;
  }

  /* ===== ITEMS TAB: Dedicated mobile card layout ===== */
  #panel-bb-items .ds-widget-section > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  #panel-bb-items .ds-widget-section > div:first-child > span {
    align-self: flex-start !important;
  }

  /* Tier article: stack vertically on mobile */
  #panel-bb-items article {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  /* LEFT info column: full width on mobile */
  #panel-bb-items article > div:first-child {
    width: 100% !important;
    flex-shrink: 1 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
  }

  /* Tier label input: flexible width on mobile */
  #panel-bb-items article > div:first-child input[type="text"] {
    width: auto !important;
    flex: 1 !important;
    min-width: 80px !important;
  }

  /* Percentage and sound row: horizontal on mobile */
  #panel-bb-items article > div:first-child > div:nth-child(3),
  #panel-bb-items .bb-tier-editor-pct {
    font-size: 1.2rem !important;
    margin-top: 0 !important;
  }
  #panel-bb-items article > div:first-child > div:last-child {
    margin-top: 0 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  /* Hide vertical divider on mobile */
  #panel-bb-items article > div:nth-child(2) {
    display: none !important;
  }

  /* Rewards container: stack items vertically */
  #panel-bb-items article > div:nth-child(3) {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }

  /* Reward mini cards: full width on mobile */
  #panel-bb-items .collectible-mini-card {
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Add card: full width dash border row */
  #panel-bb-items article > div:nth-child(3) > div:last-child {
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    padding: 12px 16px !important;
    gap: 8px !important;
  }

  /* Chevron: position absolute top-right on mobile */
  #panel-bb-items article > div:nth-child(4) {
    position: absolute !important;
    top: 8px !important;
    right: 4px !important;
    padding: 4px !important;
  }

  /* ===== MORE tab: mobile junk designer ===== */
  #panel-bb-more article {
    padding: 12px !important;
    gap: 12px !important;
  }
  /* Top row: stack vertically */
  #panel-bb-more article > div:first-child {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }
  /* Icon preview: full width on mobile */
  #panel-bb-more article > div:first-child > div:first-child {
    width: 100% !important;
    height: 160px !important;
  }
  /* Right inputs: full width */
  #panel-bb-more article > div:first-child > div:last-child {
    width: 100% !important;
  }
  /* Alignment controls: single column */
  #panel-bb-more article > div:last-child > div:last-child {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  /* Reset fit button: always visible */
  #panel-bb-more article > div:last-child > div:first-child {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  /* ===== GAME tab: full width stack, no heading box ===== */
  #panel-bb-game > section > div:first-child {
    display: none;
  }
  /* Remove section card borders on mobile — edge to edge content */
  #page-blindbox .ds-widget-section {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
  }
  #panel-bb-game .ds-widget-flex {
    flex-direction: column;
  }
  #panel-bb-game .ds-widget-flex-col {
    width: 100% !important;
    flex-shrink: 0;
  }
  #panel-bb-game .ds-widget-grid-2 {
    grid-template-columns: 1fr;
  }
  #panel-bb-game .toggle-switch {
    margin-left: auto;
  }

  /* ===== SOUNDS tab: single column ===== */
  .bb-sfx-grid {
    grid-template-columns: 1fr;
  }
  .bb-sfx-grid .ds-widget-audio-card {
    width: 100%;
  }

  /* ===== MORE tab: single column junk ===== */
  .bb-junk-grid {
    grid-template-columns: 1fr;
  }

  /* GAME tab promo: wrap on small screens */
  #panel-bb-game [style*="background:#FFF5F7"] > div > div {
    flex-wrap: wrap;
    gap: 8px;
  }
}