/* God Pack opening (card-godpack.js, owner 11/14 "own cinematic + fast flips"). Gold lightning on the pack, a white-gold
   burst, "GOD PACK" slams in and docks as a badge, gold-backed cards, a gold finale banner. Transform / opacity only. */

/* sits between the overlay's dim (z 0) and the pack/cards (.tc-open z 1) */
.gp-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; --gx: 50vw; --gy: 45vh; }
.gp-dark { position: absolute; inset: 0; opacity: 0; background: radial-gradient(40% 40% at var(--gx) var(--gy), rgba(40,26,4,.55), #000 70%); }
.gp-rays { position: absolute; left: var(--gx); top: var(--gy); width: 160vmax; height: 160vmax; opacity: 0; transform: translate(-50%,-50%);
    background: repeating-conic-gradient(from 0deg, rgba(255,214,120,.22) 0deg 5deg, transparent 5deg 15deg);
    -webkit-mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 18%, transparent 55%); mask-image: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 18%, transparent 55%); }
.gp-ring { position: absolute; left: var(--gx); top: var(--gy); width: 46vmin; height: 46vmin; border-radius: 50%; opacity: 0; transform: translate(-50%,-50%) scale(.1);
    border: 3px solid rgba(255,236,180,.95); box-shadow: 0 0 40px rgba(255,200,90,.9), inset 0 0 30px rgba(255,220,140,.6); }
.gp-ring.r2 { border-width: 2px; border-color: rgba(255,200,90,.7); }
.gp-flash { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 45%, #fff 0, #fff6dc 35%, #ffd46a 75%, #c98a12 100%); }

/* lightning over the foil (appended inside the pack wrapper) */
.gp-bolts { position: absolute; inset: -4% -6%; width: 112%; height: 108%; z-index: 9; pointer-events: none; overflow: visible; }
.gp-bolts path { fill: none; stroke: #fff4cf; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 100; stroke-dashoffset: 100;
    filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px #ffd46a) drop-shadow(0 0 14px #e4ae39); }
@media (min-width: 700px) { .gp-bolts path { stroke-width: 2.8; } }

/* the title: outer = position + docking, inner = the slam */
.gp-title { position: fixed; left: 50%; top: calc(11vh + var(--safe-top, 0px)); z-index: 25; pointer-events: none; transform: translateX(-50%); transform-origin: 50% 0;
    transition: top .55s cubic-bezier(.4,0,.2,1), transform .55s cubic-bezier(.4,0,.2,1); }
.gp-title-in { display: grid; justify-items: center; gap: 4px; padding: 18px 40px 20px; border-radius: 22px; text-align: center; white-space: nowrap; opacity: 0;
    background: radial-gradient(120% 140% at 50% 0%, rgba(255,214,120,.2), transparent 60%), rgba(10,7,2,.86); border: 2px solid #ffd46a;
    box-shadow: 0 0 70px rgba(255,200,90,.7), 0 0 0 1px rgba(255,240,200,.35) inset; }
.gp-title em { font: 800 13px/1 "Barlow Condensed", system-ui, sans-serif; letter-spacing: .3em; color: #ffe3a0; font-style: normal; }
.gp-title b { font: 900 clamp(46px, 9vw, 92px)/.95 "Barlow Condensed", Impact, sans-serif; letter-spacing: .04em; color: transparent;
    background: linear-gradient(100deg, #c98a12, #ffe3a0 25%, #fffaf0 45%, #ffd46a 60%, #c98a12 85%, #ffe3a0); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 24px rgba(255,200,110,.75)); }
.gp-title span { font: 600 14px/1.2 Barlow, system-ui, sans-serif; color: rgba(255,240,210,.82); }
.gp-title strong { font: 800 30px/1.1 "Barlow Condensed", system-ui, sans-serif; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(255,210,120,.8); }
/* docked = a badge in the top-left corner (the Pack value counter owns the top centre); phones have no room → it fades out */
.gp-title { transition: top .55s cubic-bezier(.4,0,.2,1), left .55s cubic-bezier(.4,0,.2,1), transform .55s cubic-bezier(.4,0,.2,1), opacity .4s; }
.gp-title.gp-docked { top: calc(12px + var(--safe-top, 0px)); left: 16px; transform: translateX(0) scale(.4); transform-origin: 0 0; }
.gp-title.gp-docked span { opacity: 0; transition: opacity .3s; }
@media (max-width: 760px) { .gp-title-in { padding: 14px 20px 16px; } .gp-title.gp-docked { left: 50%; transform: translateX(-50%) scale(.6); transform-origin: 50% 0; opacity: 0; } }
/* the pack's own hint line moves down a bit while the badge sits on top */
.tc-opening.gp-on .tc-open-hint { animation: none; color: #ffe3a0; text-shadow: 0 0 16px rgba(255,200,90,.7); }

/* everything glows gold in a God Pack: the pack's leak light and each card's rarity glow (both set inline → !important) */
.tc-opening.god .tc-tear-wrap { --leak: #ffd46a !important; }
.tc-opening.god .tc-fc { --hc: #ffd46a !important; }
.tc-opening.god { --tc-glow: #ffd46a !important; }
/* gold-backed cards: gold frame + glow, a warm gold wash over the back art */
.tc-opening.god .tc-fc .tc-back { border-color: #ffd46a; box-shadow: 0 0 0 2px #ffd46a, 0 0 30px rgba(255,200,90,.65), 0 14px 30px rgba(0,0,0,.55); }
.tc-opening.god .tc-fc .tc-back::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(135deg, rgba(255,230,160,0) 25%, rgba(255,236,180,.32) 48%, rgba(255,230,160,0) 70%), radial-gradient(80% 60% at 50% 42%, rgba(255,214,120,.28), rgba(140,90,10,.3)); }
.tc-opening.god .tc-fc:first-child .tc-back { box-shadow: 0 0 0 2px #ffe9a8, 0 0 40px rgba(255,210,110,.8), 0 14px 30px rgba(0,0,0,.55); }
.gp-cardring { position: absolute; inset: -4%; border-radius: 16px; pointer-events: none; z-index: 5; border: 3px solid #ffe3a0; box-shadow: 0 0 30px rgba(255,200,90,.9), inset 0 0 24px rgba(255,220,140,.6); }

/* finale banner over the finished row */
.gp-final { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 6px 16px; padding: 12px 26px; border-radius: 16px; opacity: 0;
    background: radial-gradient(120% 160% at 50% 0%, rgba(255,214,120,.22), transparent 60%), rgba(12,8,2,.88); border: 2px solid #ffd46a; box-shadow: 0 0 46px rgba(255,200,90,.5); }
.gp-final b { font: 900 30px/1 "Barlow Condensed", Impact, sans-serif; letter-spacing: .05em; color: transparent; background: linear-gradient(100deg, #c98a12, #ffe3a0 30%, #fffaf0 50%, #ffd46a 70%, #c98a12); -webkit-background-clip: text; background-clip: text; }
.gp-final span { font: 600 15px/1.2 Barlow, system-ui, sans-serif; color: rgba(255,240,210,.85); }
.gp-final strong { font: 800 24px/1 "Barlow Condensed", system-ui, sans-serif; color: #fff; text-shadow: 0 0 14px rgba(255,210,120,.7); }
@media (max-width: 560px) { .gp-final b { font-size: 24px; } .gp-final strong { font-size: 20px; } }
