/* MATCH — Pack pages */

/* ============ Pack Overview ============ */
.pack-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  padding: 56px 0 48px;
  align-items: end;
  border-bottom: 1px solid var(--line);
}
.pack-hero-r {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pack-clock {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 20px;
}
.pack-clock-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.clock-unit {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 12px 14px;
  text-align: left;
}
.clock-unit-value {
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.clock-unit-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-top: 4px;
  text-transform: uppercase;
}
.pack-progress {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pack-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pack-progress-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

.pack-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

/* ============ Pack Table ============ */
.pack-table {
  padding: 0;
  margin-bottom: 64px;
}
.pack-table-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 1px solid var(--line);
}
.pack-table-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: 100%;
  transition: background 0.12s;
}
.pack-table-row:hover {
  background: var(--bg-1);
}
.pack-table-conf {
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
}
.pack-table-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pack-table-arrow {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
  transition: color 0.15s, transform 0.15s;
}
.pack-table-row:hover .pack-table-arrow {
  color: var(--accent);
  transform: translateX(2px);
}

/* ============ Pack Country ============ */
.pc-head {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}
.pc-back {
  background: none;
  border: none;
  color: var(--fg-3);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.pc-back:hover { color: var(--fg); }
.pc-head-row {
  display: flex;
  align-items: center;
  gap: 32px;
}

.pc-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  padding: 48px 0;
}

.pc-card {
  border: 1px solid var(--line);
  background: var(--bg-1);
}
.pc-card-art {
  position: relative;
  padding: 40px 24px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.pc-card-art svg {
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
}
.pc-card-overlay {
  text-align: center;
}

.pc-card-body { padding: 24px; }
.pc-spec {
  border: 1px solid var(--line);
  margin-bottom: 24px;
}

.pc-buy { margin-top: 8px; }
.pc-qty {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.pc-qty-btn {
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--fg);
  font-family: var(--f-mono);
  font-size: 13px;
  padding: 14px 0;
  cursor: pointer;
  transition: all 0.12s;
  border-radius: 0;
}
.pc-qty-btn:hover:not(:disabled) {
  border-color: var(--fg);
  color: var(--fg);
}
.pc-qty-btn.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.pc-qty-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.pc-total {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.pc-total-arrow {
  font-family: var(--f-mono);
  color: var(--fg-3);
  font-size: 20px;
}

.pc-burn-note {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 87, 12, 0.2);
  background: rgba(226, 87, 12, 0.04);
  display: flex;
  gap: 8px;
  align-items: center;
}

.pc-cta {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  padding: 18px;
  font-size: 13px;
}

.pc-spin {
  width: 10px; height: 10px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pc-success {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--bull);
  background: rgba(111,167,123,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pc-success-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

/* ============ Recent activity ============ */
.recent {
  border: 1px solid var(--line);
  background: var(--bg-1);
}
.recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.recent-row:last-child { border-bottom: none; }
.recent-row-l { display: flex; align-items: center; gap: 12px; }
.recent-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.recent-row-r { text-align: right; }

/* ============ Pack Player ============ */
.pp-head {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}
.pp-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-top: 24px;
}
.pp-head-left { display: flex; align-items: center; gap: 24px; }
.pp-balance {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 16px 20px;
  text-align: right;
}

.pp-stage {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  padding: 48px 0;
}

/* Pools */
.pp-pools { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.pool-bar {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pool-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pool-bar-meta { display: flex; align-items: center; gap: 14px; }
.pool-bar-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.pool-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-2);
}
.badge-CPT, .pp-recent-badge.badge-CPT { background: rgba(192,192,192,0.12); color: var(--rare-captain); border-color: var(--rare-captain); }
.badge-BST, .pp-recent-badge.badge-BST { background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(255,235,100,0.08)); color: var(--rare-best); border-color: var(--rare-best); }
.badge-RKE, .pp-recent-badge.badge-RKE { background: rgba(205,127,50,0.10); color: var(--rare-rookie); border-color: var(--rare-rookie); }

.pp-recent { }
.pp-recent-list {
  border: 1px solid var(--line);
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
}
.pp-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.pp-recent-row:last-child { border-bottom: none; }
.pp-recent-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 24px;
  font-family: var(--f-mono);
  font-size: 10px;
  border: 1px solid var(--line-2);
}

/* The box */
.pp-box {
  border: 1px solid var(--line);
  background: var(--bg-1);
  overflow: hidden;
  position: relative;
}
.pp-box-bar {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.status-light { display: flex; align-items: center; gap: 8px; }
.status-light-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.status-light-dot.is-pulse {
  animation: statusPulse 1s infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  50% { opacity: 0.5; box-shadow: 0 0 0 4px transparent; }
}

/* Slot */
.pp-slot {
  position: relative;
  background: var(--bg);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pp-slot-window {
  position: relative;
  width: 100%;
  height: 84px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  background: rgba(104,104,255,0.04);
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(104,104,255,0.08);
}
.pp-slot-window::before, .pp-slot-window::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 30px;
  pointer-events: none;
  z-index: 2;
}
.pp-slot-window::before {
  top: 0;
  background: linear-gradient(180deg, var(--bg), transparent);
}
.pp-slot-window::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--bg), transparent);
}
.pp-slot-bracket {
  position: absolute;
  left: 12px; right: 12px;
  height: 1px;
  background: var(--accent);
  z-index: 3;
}
.pp-slot-bracket-top { top: -1px; }
.pp-slot-bracket-bot { bottom: -1px; }

.pp-reel {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.pp-reel-item {
  height: 84px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.pp-reel-item-jersey {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.pp-reel-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}
.pp-reel-item-tag {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
}
.pp-reel-item-label {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.pp-reel-item.is-CPT .pp-reel-item-label { color: var(--rare-captain); }
.pp-reel-item.is-BST .pp-reel-item-label { color: var(--rare-best); text-shadow: 0 0 12px rgba(255,215,0,0.4); }
.pp-reel-item.is-RKE .pp-reel-item-label { color: var(--rare-rookie); }
.pp-reel-item-rarity {
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pp-slot-ground {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.pp-slot-light {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-2);
  transition: background 0.3s, box-shadow 0.3s;
}
.pp-slot-light.is-on {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* Status block */
.pp-status {
  padding: 24px;
  border-top: 1px solid var(--line);
  min-height: 110px;
}
.pp-status-revealed {
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  position: relative;
  overflow: hidden;
}
.pp-status-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* BST — gold burst (rarest, most visceral) */
.pp-status-BST {
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 215, 0, 0.18), transparent 60%);
  border-top: 1px solid rgba(255, 215, 0, 0.4);
}
.pp-status-BST .pp-status-burst {
  background:
    radial-gradient(circle at 20% 40%, rgba(255, 215, 0, 0.35) 0%, transparent 4%),
    radial-gradient(circle at 35% 70%, rgba(255, 235, 100, 0.3) 0%, transparent 3%),
    radial-gradient(circle at 60% 20%, rgba(255, 215, 0, 0.4) 0%, transparent 5%),
    radial-gradient(circle at 80% 60%, rgba(255, 235, 100, 0.35) 0%, transparent 3%),
    radial-gradient(circle at 90% 30%, rgba(255, 215, 0, 0.3) 0%, transparent 4%),
    radial-gradient(circle at 50% 80%, rgba(255, 235, 100, 0.4) 0%, transparent 4%);
  animation: bstSparkle 2.2s ease-in-out infinite;
}
.pp-status-BST .f-display {
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 12px rgba(255, 215, 0, 0.4);
  animation: bstReveal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bstSparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.05); }
}
@keyframes bstReveal {
  0%   { opacity: 0; transform: scale(0.7); filter: blur(8px); }
  100% { opacity: 1; transform: scale(1);   filter: blur(0); }
}

/* CPT — silver halo */
.pp-status-CPT {
  background: radial-gradient(ellipse at 50% 0%, rgba(192, 192, 192, 0.14), transparent 55%);
  border-top: 1px solid rgba(192, 192, 192, 0.3);
}
.pp-status-CPT .pp-status-burst {
  background:
    radial-gradient(circle at 30% 50%, rgba(192, 192, 192, 0.25) 0%, transparent 4%),
    radial-gradient(circle at 70% 40%, rgba(230, 230, 230, 0.25) 0%, transparent 4%);
  animation: cptShimmer 2.6s ease-in-out infinite;
}
.pp-status-CPT .f-display {
  text-shadow: 0 0 18px rgba(192, 192, 192, 0.5);
  animation: cptReveal 0.5s ease-out;
}
@keyframes cptShimmer {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes cptReveal {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* RKE — bronze (minimal) */
.pp-status-RKE {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.06), transparent);
  border-top: 1px solid rgba(205, 127, 50, 0.25);
}
.pp-status-RKE .f-display {
  animation: cptReveal 0.4s ease-out;
}

/* Badge variants on rarity */
.badge-CPT, .pp-recent-badge.badge-CPT {
  background: rgba(192, 192, 192, 0.12);
  color: var(--rare-captain);
  border-color: var(--rare-captain);
  box-shadow: 0 0 0 1px rgba(192, 192, 192, 0.1) inset;
}
.badge-BST, .pp-recent-badge.badge-BST {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.18), rgba(255, 235, 100, 0.08));
  color: var(--rare-best);
  border-color: var(--rare-best);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.2) inset, 0 0 8px rgba(255, 215, 0, 0.15);
}
.badge-RKE, .pp-recent-badge.badge-RKE {
  background: rgba(205, 127, 50, 0.10);
  color: var(--rare-rookie);
  border-color: var(--rare-rookie);
}

.dots {
  display: inline-flex;
  gap: 6px;
}
.dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 1.2s infinite ease-in-out;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

.pp-actions { padding: 16px 24px 24px; }
.pp-cta {
  width: 100%;
  justify-content: center;
  padding: 18px;
  font-size: 13px;
}
