/* pack-open.css (2026-11-14): the pack opening, shared by /packs and the front page. Used with pack-open.js.
   Everything is scoped to a .po container: the pack (.pack > .body/.flap), the row of five cards (.row > .slot),
   the face-down backs that pulse by rarity, the 3D flip, the particle burst and the Legendary flash. */

.po .pack { position: relative; width: 240px; height: 360px; cursor: pointer; transition: transform .25s; filter: drop-shadow(0 18px 40px rgba(255,92,26,.25)); }
.po .pack:hover { transform: translateY(-6px) rotate(-1.5deg); }
.po .pack .body, .po .pack .flap { position: absolute; left: 0; right: 0; border-radius: 14px;
  background: linear-gradient(135deg, #ff5c1a 0%, #ff9a3d 18%, #1b0b03 40%, #2a1206 60%, #ff7a2a 82%, #ffd07a 100%); }
.po .pack .body { top: 40px; bottom: 0; border-radius: 0 0 14px 14px; overflow: hidden; }
.po .pack .flap { top: 0; height: 44px; border-radius: 14px 14px 0 0; transform-origin: 0 100%; transition: transform .45s cubic-bezier(.3,1.4,.5,1), opacity .45s; }
.po .pack .flap::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 6px;
  background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,.6) 6px 9px); }
.po .pack .shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 45%, transparent 60%);
  background-size: 250% 100%; animation: po-shine 3s linear infinite; mix-blend-mode: overlay; }
@keyframes po-shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.po .pack .label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.po .pack .label b { font: 700 46px/0.9 'Barlow Condensed', sans-serif; text-transform: uppercase; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.po .pack .label span { font: 700 12px Inter, sans-serif; letter-spacing: .25em; text-transform: uppercase; color: #ffe2c7; }
.po .pack .label i { font-style: normal; font-size: 46px; }
/* a Recruit pack (earned by inviting a friend): gold */
.po .pack.recruit { filter: drop-shadow(0 18px 44px rgba(255,201,74,.4)); }
.po .pack.recruit .body, .po .pack.recruit .flap { background: linear-gradient(135deg, #ffd76a 0%, #fff1b8 16%, #2a2006 40%, #3a2c08 60%, #ffc94a 82%, #fff4c8 100%); }
.po .pack.recruit .label span { color: #fff1c4; }
.po .pack.shake { animation: po-shake .6s ease-in-out; }
@keyframes po-shake { 0%,100% { transform: none; } 20% { transform: rotate(-4deg) scale(1.03); } 40% { transform: rotate(4deg) scale(1.05); } 60% { transform: rotate(-3deg) scale(1.06); } 80% { transform: rotate(2deg) scale(1.07); } }
.po .pack.torn .flap { transform: rotate(-35deg) translate(-30px, -60px); opacity: 0; }
.po .pack.gone { transition: transform .5s ease-in, opacity .5s; transform: translateY(160px) scale(.85); opacity: 0; pointer-events: none; }
.po .pack.locked { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }

/* the five cards */
.po .row { position: absolute; inset: 0; display: flex; gap: 18px; justify-content: center; align-items: center; flex-wrap: wrap; pointer-events: none; }
.po .slot { width: 230px; aspect-ratio: 230 / 340; perspective: 1200px; opacity: 0; transform: translateY(120px) scale(.6); pointer-events: auto;
        transition: opacity .45s, transform .55s cubic-bezier(.2,1.2,.4,1); }
.po .slot.out { opacity: 1; transform: none; }
.po .flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3,1.3,.5,1); cursor: pointer; }
.po .slot.open .flip { transform: rotateY(180deg); cursor: default; }
.po .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.po .face.front { transform: rotateY(180deg); }
.po .back { border-radius: 14px; background: repeating-linear-gradient(45deg, #140904 0 10px, #1c0d05 10px 20px); border: 3px solid #3a1a08;
        display: grid; place-items: center; --glow: transparent; box-shadow: 0 0 0 0 var(--glow); }
.po .back::before { content: '🏀'; font-size: 54px; filter: grayscale(.3); }
.po .back.hint-rare { --glow: rgba(77,134,255,.55); animation: po-pulse 1.4s ease-in-out infinite; }
.po .back.hint-epic { --glow: rgba(180,107,255,.7); animation: po-pulse 1.1s ease-in-out infinite; }
.po .back.hint-legendary { --glow: rgba(255,176,32,.85); animation: po-pulse .8s ease-in-out infinite; }
@keyframes po-pulse { 0%,100% { box-shadow: 0 0 6px 1px var(--glow); } 50% { box-shadow: 0 0 30px 8px var(--glow); } }
.po .slot:not(.open):hover .back { border-color: #FF5C1A; }
.po .slot .bbcard { width: 100%; }                        /* the card fills its slot, whatever size the slot is */

/* the burst and the flash live on <body> */
.po-burst { position: fixed; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; z-index: 5; }
.po-flash { position: fixed; inset: 0; background: radial-gradient(circle, rgba(255,190,80,.45), transparent 60%); pointer-events: none; z-index: 20; animation: po-flash .9s ease-out forwards; }
@keyframes po-flash { from { opacity: 1; } to { opacity: 0; } }

/* swipe to tear (2026-11-15; pack-open.js with swipe: true). The cut is an SVG path that follows the finger. */
.po.po-swipe-area, .po .pack.swipeable { touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.po .pack.dragging { transition: none; transform: translateX(var(--nudge, 0)); }
.po .po-cut { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.po .po-cut path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.po .po-cut .glow { stroke: #ff7a2a; stroke-width: 9; opacity: .55; filter: blur(3px); }
.po .po-cut .core { stroke: #fff6d8; stroke-width: 2.5; }
.po .po-edge { animation: po-edge .8s ease-out forwards; }
@keyframes po-edge { from { opacity: 1; } to { opacity: 0; } }
.po .po-piece { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
/* once cut, the top is the flying piece: keep what's left of the flap where it is */
.po .pack.cut .flap, .po .pack.cut.torn .flap { transform: none; opacity: 1; transition: none; }
.po .pack.ripped { animation: po-ripped .9s ease-in-out infinite; }
@keyframes po-ripped { 0%,100% { filter: drop-shadow(0 18px 40px rgba(255,92,26,.25)); } 50% { filter: drop-shadow(0 10px 50px rgba(255,190,80,.7)); } }
/* "swipe here": a glint that slides along the seam until the pack is touched */
.po .po-cue { position: absolute; top: 33px; left: 0; width: 46px; height: 14px; pointer-events: none; border-radius: 7px;
  background: radial-gradient(ellipse at center, rgba(255,246,216,.95), rgba(255,154,61,.5) 45%, transparent 70%);
  animation: po-cue 2.6s ease-in-out infinite; }
@keyframes po-cue { 0% { left: -10px; opacity: 0; } 15% { opacity: 1; } 55% { left: calc(100% - 36px); opacity: 1; } 65%,100% { left: calc(100% - 36px); opacity: 0; } }
.po .pack.dragging .po-cue, .po .pack.ripped .po-cue, .po .pack.torn .po-cue, .po .pack.locked .po-cue, .po .pack.shake .po-cue { display: none; }
@media (prefers-reduced-motion: reduce) { .po .po-cue { animation: none; opacity: 0; } }

@media (max-width: 760px) {
  /* phones: the pack in the middle, then the five cards in a two-column grid that fills the width */
  .po { display: block; position: relative; }
  .po .pack { margin: 10px auto 0; }
  .po .pack.gone { position: absolute; left: 0; right: 0; top: 0; }
  .po .row { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; pointer-events: auto; }
  .po .row:empty { display: none; }
  .po .slot { width: 100%; }
  .po .slot:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
  .po .bbc-name { font-size: 18px; }
  .po .bbc-top { font-size: 9px; letter-spacing: .06em; }
}

/* (2026-11-20) a face-up card up close (pack-open.js zoom): the collection's big view, here too. Above the site nav. */
.po .slot.open .bbcard { cursor: zoom-in; }
.po-zoom { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.86); display: flex; padding: 60px 16px 24px;
           overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.po-zbox { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; justify-content: center; margin: auto; }
.po-zbox .bbcard { width: min(330px, 86vw, calc((100dvh - 100px) * 230 / 340)); flex-shrink: 0; }
.po-zx { position: fixed; right: 18px; top: 14px; z-index: 1; background: #0b0b0b; border: 1px solid #333; color: #ddd; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 16px; }
.po-zx:hover { border-color: #FF5C1A; color: #fff; }
.po-zinfo { max-width: 300px; color: #bbb; font: 13px/1.5 Inter, system-ui, sans-serif; }
.po-zinfo h3 { color: #fff; font: 700 26px/1.05 'Barlow Condensed', sans-serif; text-transform: uppercase; margin: 0 0 8px; }
.po-zinfo p { margin: 0 0 8px; }
.po-zinfo a { color: #FF5C1A; }
html.po-zoomed, html.po-zoomed body { overflow: hidden; }
html.po-zoomed .bbc-tip { z-index: 210; }                 /* game notes show over the big view */
@media (min-width: 900px) {
  .po-zoom { padding: 60px 20px 20px; }
  .po-zbox { flex-wrap: nowrap; }
  .po-zbox .bbcard { width: clamp(330px, calc((100vh - 130px) * 230 / 340), 700px); max-width: calc(100vw - 400px); }
  .po-zbox .bbcard .bbc-top { font-size: 13px; }
  .po-zbox .bbcard .bbc-name { font-size: 34px; }
  .po-zbox .bbcard .bbc-sub, .po-zbox .bbcard .bbc-stat { font-size: 14px; }
  .po-zbox .bbcard .bbc-in { padding: 14px 14px 12px; }
}
