/* PAKET AÇILIŞI — mağaza, paketi sürükleyerek yırtma, kartları tek tek çekme (Arcade) */
.pk { display: grid; gap: 16px; }
.pk .title { margin-bottom: 2px; font-size: clamp(34px, 5vw, 64px); }
.pk-lead { margin: 0; font-size: 16px; color: var(--ink2); max-width: 76ch; min-height: 1.5em; }
.pk-lead b { color: var(--yellow); }

/* ── Oyuncular: para barı ve 5 yuva ── */
.pk-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pk-players.n3, .pk-players.n4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pk-pl { background: #07061a; border: 3px solid #2b2566; border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "h slots" "bar slots" "note slots"; column-gap: 14px; row-gap: 6px; align-items: center; }
.pk-pl.turn { border-color: var(--t); box-shadow: 0 0 22px color-mix(in oklab, var(--t) 35%, transparent); }
.pk-plh { grid-area: h; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pk-plh b { font-family: var(--disp); font-size: 18px; color: var(--t); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-plh small { font-family: var(--body); font-weight: 700; font-size: 11px; background: var(--t); color: #07061a; padding: 1px 5px; border-radius: 3px; }
.pk-money { margin-left: auto; font-family: var(--disp); font-size: 24px; color: #fff; }
.pk-bar { grid-area: bar; height: 10px; border: 2px solid #000; border-radius: 3px; background: #2a0d18; box-shadow: 0 0 0 2px #3a3470; position: relative; overflow: hidden; }
.pk-bar::after { content: ""; position: absolute; inset: 0; width: calc(var(--m) * 100%); background: linear-gradient(180deg, #ffe15a, var(--yellow) 50%, #c79a00); transition: width .4s; }
.pk-slots { grid-area: slots; display: grid; grid-template-columns: repeat(5, 44px); gap: 5px; }
.pk-slot { aspect-ratio: 5 / 7; border: 2px dashed #3a3470; border-radius: 5px; position: relative; overflow: hidden; }
.pk-slot.full, .pk-slot.back { border: 0; }
.pk-slot .card { width: 100%; height: 100%; }
.pk-slot .card-back { inset: 0; height: 100%; padding: 6%; box-shadow: none; }
.pk-slot .card-back span { font-size: 10px; }
.pk-slot .card-back em, .pk-slot .card-back small { display: none; }
.pk-slot.back { box-shadow: 0 0 0 2px var(--kc, #3a3470); border-radius: 5px; }
.pk-note { grid-area: note; margin: 0; font-family: var(--body); font-weight: 700; font-size: 12px; color: var(--ink2); min-height: 1.3em; }

/* ── Paket renkleri ── */
.k-sokak { --kc: #a9a4e6; --k1: #5b56a8; --k2: #1d1a44; --kt: #fff; }
.k-gizem { --kc: #c08bff; --k1: #7a2cff; --k2: #1f0848; --kt: #fff; }
.k-kat { --kc: #2ef2ff; --k1: #10b3c0; --k2: #062f3c; --kt: #fff; }
.k-evren { --kc: #ff5a76; --k1: #ff2a4f; --k2: #4a0818; --kt: #fff; }
.k-kozmik { --kc: #ffd21f; --k1: #ffe15a; --k2: #e05a00; --kt: #07061a; }

/* ═════════ PAKET (mağazada düğme, açılışta booster) ═════════ */
.pk-pack {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px;
  width: 100%; aspect-ratio: 5 / 7.6; padding: 16% 10% 12%; color: var(--kt); text-align: center; border: 0; border-radius: 6px 6px 10px 10px; cursor: pointer;
  background:
    radial-gradient(90% 55% at 50% 42%, rgba(255, 255, 255, .26), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 11px),
    linear-gradient(165deg, var(--k1), var(--k2));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), 0 0 0 3px #07061a, 0 0 0 5px var(--kc), 0 12px 0 5px #000, 0 0 46px color-mix(in oklab, var(--kc) 45%, transparent);
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.3), box-shadow .2s;
}
/* tırtıklı yapıştırma şeritleri */
.pk-crimp { position: absolute; left: 0; right: 0; height: 9%; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .28) 0 2px, rgba(0, 0, 0, .25) 2px 5px), linear-gradient(180deg, var(--k1), color-mix(in oklab, var(--k1) 60%, #000)); }
.pk-crimp.top { top: 0; border-radius: 6px 6px 0 0; }
.pk-crimp.bot { bottom: 0; border-radius: 0 0 10px 10px; transform: scaleY(-1); }
/* folyo parlaması */
.pk-sheen { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.pk-sheen::before { content: ""; position: absolute; inset: -20% -60%; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .55) 47%, rgba(255, 255, 255, .1) 53%, transparent 60%); transform: translateX(-70%); }
.k-kozmik .pk-sheen::after { content: ""; position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: .35; background: linear-gradient(120deg, #ff2a4f, #ffd21f, #7dff6a, #2ef2ff, #b46bff, #ff2a4f); background-size: 300% 300%; animation: holo 5s linear infinite; }
.pk-series { font-family: var(--body); font-weight: 700; font-size: 10px; letter-spacing: .2em; opacity: .85; }
.pk-emblem { display: grid; place-items: center; width: 52%; aspect-ratio: 1; margin-top: 4%; border-radius: 50%; font-family: var(--disp); font-size: clamp(34px, 4vw, 56px); line-height: 1; color: #07061a;
  background: radial-gradient(circle at 35% 30%, #fff, var(--kc) 55%, color-mix(in oklab, var(--kc) 55%, #000));
  box-shadow: 0 0 0 4px #07061a, 0 0 0 7px rgba(255, 255, 255, .5), 0 8px 24px rgba(0, 0, 0, .5); }
.pk-emblem.img { overflow: hidden; background: #07061a; }
.pk-emblem.img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; filter: saturate(1.15) contrast(1.05); }
.pk-name { font-family: var(--disp); font-weight: 400; font-size: clamp(17px, 1.7vw, 23px); line-height: 1.02; text-shadow: 3px 3px 0 rgba(0, 0, 0, .5); overflow-wrap: anywhere; margin-top: auto; }
.k-kozmik .pk-name { text-shadow: 2px 2px 0 rgba(255, 255, 255, .55); }
.pk-count { font-family: var(--body); font-weight: 700; font-size: 11px; letter-spacing: .14em; padding: 2px 9px; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; }

/* ── Mağaza ── */
.pk-shop { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: center; gap: 34px; padding: 18px 0 4px; }
.pk-offer { display: grid; gap: 14px; align-content: start; }
.pk-pack:is(button):hover:not(:disabled), .pk-pack:is(button):focus-visible { transform: translateY(-10px) rotate(-2deg) scale(1.02); }
.pk-pack:is(button):hover:not(:disabled) .pk-sheen::before, .pk-pack:is(button):focus-visible .pk-sheen::before { animation: sheen .9s ease-out; }
.pk-pack:focus-visible { outline: 3px solid #fff; outline-offset: 10px; }
@keyframes sheen { from { transform: translateX(-70%); } to { transform: translateX(70%); } }
.pk-price { position: absolute; top: -16px; right: -16px; z-index: 2; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: #07061a; font-family: var(--disp); font-size: 21px; box-shadow: 0 0 0 3px #07061a, 0 5px 0 3px #000; transform: rotate(10deg); }
.k-kozmik .pk-price { background: #fff; }
.pk-pack kbd { position: absolute; left: 8px; bottom: 11%; z-index: 2; font-family: var(--pixel); font-size: 9px; background: #07061a; color: var(--yellow); padding: 4px 5px; border-radius: 3px; }
.pk-pack:disabled { cursor: not-allowed; }
.pk-pack:disabled > :not(.pk-no) { filter: grayscale(.9) brightness(.5); }
.pk-pack:disabled { box-shadow: 0 0 0 3px #07061a, 0 0 0 5px #3a3470; background: #16133a; }
.pk-no { position: absolute; left: 8%; right: 8%; top: 40%; z-index: 3; display: grid; gap: 2px; padding: 8px; font-family: var(--body); font-weight: 700; font-size: 14px; background: #07061a; color: #ff8aa0; border: 2px solid #ff2a4f; border-radius: 6px; transform: rotate(-6deg); }
.pk-no small { font-size: 11px; color: var(--ink2); }
.pk-info { display: grid; gap: 6px; text-align: center; }
.pk-desc { font-family: var(--body); font-size: 14px; color: var(--ink); }
.pk-odds { display: flex; height: 10px; border: 2px solid #000; border-radius: 3px; overflow: hidden; background: #000; box-shadow: 0 0 0 2px #2b2566; }
.pk-odds i { flex: var(--w) 0 0; background: var(--c); }
.pk-rare { font-family: var(--body); font-weight: 700; font-size: 12px; color: var(--ink2); letter-spacing: .04em; }
.pk-rare b { color: var(--yellow); }

/* ═════════ AÇILIŞ ═════════ */
.pk-open { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: end; gap: 28px; padding-top: 8px; }
.pk-open:has(.pk-bwrap[hidden]) { grid-template-columns: 1fr; }
.pk-open .pk-actions { grid-column: 1 / -1; }

/* Paket + içindeki deste */
.pk-bwrap { position: relative; width: 220px; aspect-ratio: 5 / 7.6; justify-self: center; margin-top: 120px; --p: 0; --dir: 1; transition: transform .45s, opacity .45s; }
.pk-bwrap .pk-pack { position: absolute; inset: 0; z-index: 2; cursor: default; clip-path: inset(15% 0 0 0 round 0 0 10px 10px); transition: none; }
.pk-open.sealed .pk-bwrap { animation: pkIdle 2.6s ease-in-out infinite; }
.pk-open.sealed .pk-bwrap .pk-sheen::before { animation: sheen 2.6s ease-in-out infinite; }
.pk-bwrap.grab { animation: none !important; transform: rotate(calc(var(--p) * var(--dir) * 3deg)); }
@keyframes pkIdle { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-1.5deg) translateY(-6px); } }

/* Üst kapak: sürükledikçe kalkar, yırtılınca uçar */
.pk-flap { position: absolute; left: 0; right: 0; top: 0; height: 15%; z-index: 3; border-radius: 6px 6px 0 0; pointer-events: none;
  background: linear-gradient(165deg, var(--k1), color-mix(in oklab, var(--k1) 70%, var(--k2)));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 95% 100%, 90% 78%, 85% 100%, 80% 78%, 75% 100%, 70% 78%, 65% 100%, 60% 78%, 55% 100%, 50% 78%, 45% 100%, 40% 78%, 35% 100%, 30% 78%, 25% 100%, 20% 78%, 15% 100%, 10% 78%, 5% 100%, 0 78%);
  transform-origin: calc(50% - var(--dir) * 50%) 100%;
  transform: rotate(calc(var(--p) * var(--dir) * -9deg)) translateY(calc(var(--p) * -8px)); }
.pk-flap .pk-crimp.top { height: 60%; }
.pk-open:not(.sealed) .pk-flap { animation: pkFlapOff .55s cubic-bezier(.3, 0, .6, 1) forwards; }
@keyframes pkFlapOff { to { transform: translate(calc(var(--dir) * 190px), -230px) rotate(calc(var(--dir) * 55deg)); opacity: 0; } }
/* Yırtma şeridi: sürüklenen alan */
.pk-strip { position: absolute; left: -14px; right: -14px; top: -14px; height: calc(15% + 28px); z-index: 4; cursor: ew-resize; touch-action: none; display: grid; place-items: end center; border-radius: 8px; }
.pk-strip:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pk-cut { position: absolute; left: calc(50% - var(--p) * 50%); width: calc(var(--p) * 100%); bottom: 12px; height: 4px; border-radius: 4px; background: #fff; box-shadow: 0 0 10px #fff, 0 0 22px var(--kc); }
.pk-strip small { position: absolute; top: -26px; left: 50%; translate: -50% 0; white-space: nowrap; font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: .08em; color: #07061a; background: var(--yellow); padding: 4px 10px; border-radius: 4px; box-shadow: 0 3px 0 #000; animation: pkNudge 1.4s ease-in-out infinite; }
@keyframes pkNudge { 0%, 100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
.pk-open:not(.sealed) .pk-strip { display: none; }

/* Deste: yırtılınca paketten yükselir, en öndeki kart çekilir */
.pk-stack { position: absolute; left: 7%; right: 7%; top: 8%; aspect-ratio: 5 / 7; z-index: 1; touch-action: none; transition: transform .5s cubic-bezier(.2, .9, .3, 1.2); }
.pk-open.pull .pk-stack, .pk-open.done .pk-stack { transform: translateY(-52%); cursor: grab; }
.pk-sc { position: absolute; inset: 0; z-index: calc(5 - var(--i)); transform: translate(calc(var(--i) * 4px), calc(var(--i) * -5px + var(--dy, 0px))); transition: transform .15s, box-shadow .3s; border-radius: 6px; }
.pk-sc .card-back { height: 100%; box-shadow: 0 0 0 2px #07061a; }
.pk-sc.next { box-shadow: 0 0 0 3px #fff, 0 0 20px rgba(255, 255, 255, .5); }
.pk-open.pull .pk-sc.next:hover { --dy: -10px; }
/* Sıradaki kart nadirse paketten ışık sızar */
.pk-bwrap.hot .pk-sc.next { box-shadow: 0 0 0 3px var(--c), 0 0 34px var(--c), 0 0 70px var(--c); animation: pkPulse .9s ease-in-out infinite; }
.pk-bwrap.hot::before { content: ""; position: absolute; left: -40%; right: -40%; top: -70%; height: 90%; z-index: 0; pointer-events: none;
  background: conic-gradient(from 180deg at 50% 100%, transparent 0 30%, var(--c) 38%, transparent 42%, var(--c) 50%, transparent 58%, var(--c) 62%, transparent 70%);
  opacity: .35; filter: blur(6px); animation: pkPulse .9s ease-in-out infinite; }
@keyframes pkPulse { 50% { filter: brightness(1.5) blur(0); } }
.pk-bwrap.spent { transform: translateY(80px) rotate(10deg); opacity: 0; pointer-events: none; }

/* Çekilen kartların yerleri */
.pk-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 24px; justify-content: center; align-items: start; }
.pk-cw { position: relative; display: grid; gap: 8px; justify-items: center; }
.pk-card { all: unset; position: relative; display: grid; justify-items: center; gap: 10px; width: 100%; cursor: pointer; }
.pk-card:disabled { cursor: default; }
.pk-cw.wait .pk-card { border-radius: 8px; background: rgba(255, 255, 255, .02); box-shadow: inset 0 0 0 2px #3a3470; }
.pk-cw.wait .pk-card::after { content: "?"; position: absolute; inset: 0 0 34px; display: grid; place-items: center; font-family: var(--disp); font-size: 54px; color: #2b2566; }
.pk-cw.wait .pk-flip, .pk-cw.wait .pk-rarity, .pk-cw.wait kbd, .pk-cw.wait .insp-btn { visibility: hidden; }
.pk-flip { display: grid; width: 100%; border-radius: 8px; }
.pk-face { grid-area: 1 / 1; }
.pk-face .card { width: 100%; }
.pk-face .card-back { height: 100%; box-shadow: 0 0 0 3px #07061a, 0 0 0 5px #3a3470; }
.pk-face.back { visibility: hidden; }
/* Çekilince kart yarıda yüz değiştirerek döner (3B arka yüz gizleme kart efektleriyle bozuluyor) */
.pk-cw.in .pk-flip { animation: pkFlip .55s ease-in-out .12s both; }
.pk-cw.in .pk-face.back { visibility: visible; animation: pkOut .28s step-end .12s both; }
.pk-cw.in .pk-face.front { animation: pkIn .28s step-end .12s both; }
@keyframes pkOut { to { visibility: hidden; } }
@keyframes pkIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pkFlip { 0% { transform: perspective(900px) rotateY(0); } 50% { transform: perspective(900px) rotateY(90deg); } 50.01% { transform: perspective(900px) rotateY(-90deg); } 100% { transform: perspective(900px) rotateY(0); } }
.pk-open.static .pk-cw.in * { animation: none !important; }
.pk-open.static .pk-face.back { visibility: hidden; }
/* Lig rengi parlaması */
.pk-card.t-3 .pk-flip, .pk-card.t-4 .pk-flip, .pk-card.t-5 .pk-flip, .pk-card.holo .pk-flip { box-shadow: 0 0 0 3px var(--c), 0 0 26px var(--c); }
.pk-cw.in .pk-card:is(.t-4, .t-5, .holo) .pk-flip { animation: pkFlip .55s ease-in-out .12s both, pkGlow 1.6s ease-out .45s both; }
@keyframes pkGlow { 0% { box-shadow: 0 0 0 0 var(--c); } 25% { box-shadow: 0 0 0 7px var(--c), 0 0 90px var(--c); } 100% { box-shadow: 0 0 0 3px var(--c), 0 0 30px var(--c); } }
.pk-rarity { font-family: var(--body); font-weight: 700; font-size: 13px; letter-spacing: .14em; color: #07061a; background: var(--c); padding: 3px 10px; border-radius: 3px; }
.pk-cw.in .pk-rarity { animation: pkPop .3s cubic-bezier(.2, .9, .3, 1.5) .5s both; }
@keyframes pkPop { from { opacity: 0; transform: scale(.4); } }
.pk-card kbd { position: absolute; top: -10px; left: -10px; z-index: 3; font-family: var(--pixel); font-size: 9px; background: var(--yellow); color: #07061a; padding: 5px 6px; border-radius: 3px; opacity: 0; transition: opacity .2s; }
.pk-open.done .pk-card kbd { opacity: 1; }
.pk-open.done .pk-card:hover .pk-flip, .pk-open.done .pk-card:focus-visible .pk-flip { translate: 0 -10px; transition: translate .15s; }
.pk-card:focus-visible { outline: 3px solid #fff; outline-offset: 6px; border-radius: 8px; }
.pk-cw .insp-btn { position: absolute; top: -10px; right: -10px; z-index: 3; }
.pk-cw.picked .pk-flip { translate: 0 -14px; scale: 1.06; box-shadow: 0 0 0 4px var(--yellow), 0 0 50px var(--yellow); transition: .25s; }
.pk-open:has(.picked) .pk-cw:not(.picked) { opacity: .25; filter: grayscale(1); transition: .4s; }
.pk-actions .btn:disabled { opacity: .45; }
.pk-open.shake { animation: pkShake .45s ease-in-out; }
@keyframes pkShake { 20% { translate: -7px 0; } 40% { translate: 7px 0; } 60% { translate: -4px 0; } 80% { translate: 3px 0; } }

/* ── Parlak kart: gökkuşağı folyo ── */
.card.holo .foil {
  opacity: .55; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 20%, #ff2a4f 32%, #ffd21f 40%, #7dff6a 48%, #2ef2ff 56%, #b46bff 64%, transparent 76%);
  background-size: 250% 250%; animation: holo 3.2s linear infinite;
}
@keyframes holo { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.card.holo .cpw { background: linear-gradient(135deg, #ffd21f, #fff 50%, #2ef2ff); }

/* ── Aynı ekranda sıra değişimi ── */
.pk-hand { display: grid; justify-items: center; gap: 18px; padding: 40px 16px; background: #07061a; border: 3px dashed #3a3470; border-radius: 14px; text-align: center; }
.pk-hand p { margin: 0; font-size: 18px; }
.pk-hand b { color: var(--yellow); }

/* ── Lobi: yeni mod etiketi ── */
.ac-mode.new { position: relative; }
.ac-mode.new::after { content: "YENİ"; position: absolute; top: -8px; right: 10px; font-family: var(--body); font-weight: 700; font-size: 11px; letter-spacing: .1em; background: var(--yellow); color: #07061a; padding: 2px 6px; border-radius: 3px; }

@media (max-width: 760px) {
  .pk-pl { grid-template-columns: 1fr; grid-template-areas: "h" "bar" "slots" "note"; }
  .pk-slots { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pk-money { font-size: 18px; }
  .pk-plh b { font-size: 14px; }
  .pk-shop { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .pk-price { width: 42px; height: 42px; font-size: 14px; top: -12px; right: -10px; }
  .pk-pack { padding: 15% 6% 12%; gap: 6px; }
  .pk-series, .pk-count, .pk-pack kbd { display: none; }
  .pk-name { font-size: 12px; }
  .pk-desc { font-size: 12px; }
  .pk-no { font-size: 11px; padding: 4px; }
  .pk-open { grid-template-columns: 1fr; align-items: start; gap: 14px; }
  .pk-bwrap { width: 160px; margin-top: 96px; }
  .pk-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .pk-rarity { font-size: 10px; letter-spacing: .04em; padding: 2px 5px; }
  .pk-cw .insp-btn { top: auto; bottom: 0; right: 0; transform: scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
  .pk-open *, .pk-open, .card.holo .foil { animation: none !important; }
}

/* Çevrimiçi: tur süresi ve bekleme */
.pk-clock { margin-left: 6px; color: var(--yellow); }
.pk-clock.low { color: #ff5a76; animation: pkPulse .6s ease-in-out infinite; }
.pk-wait p b { color: var(--yellow); }
.pk .room-bar { margin-bottom: 4px; }
