/* =====================================================================
 * v39.css — ห้องเปิด GACHAPON • ปุ่มใส่อัตโนมัติ
 * ===================================================================== */
.ga-mixbtns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ga-autobtn { background: linear-gradient(180deg, #7ff0ff, #25c6ff) !important; color: #002433 !important; border: 0 !important; font-weight: 800; box-shadow: 0 4px 12px rgba(37,198,255,.35); }
.ga-autobtn:disabled { filter: grayscale(1); opacity: .5; }

#ga-show { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; pointer-events: auto; font-family: inherit; }
#ga-show .gs-dim { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(60,20,110,.72), rgba(5,2,15,.92)); backdrop-filter: blur(4px); animation: gsFade .3s both; }
#ga-show.pet .gs-dim { background: radial-gradient(circle at 50% 45%, rgba(10,70,90,.72), rgba(2,8,15,.92)); }
#ga-show .gs-flash { position: absolute; inset: 0; background: var(--fc, #fff); opacity: 0; pointer-events: none; z-index: 3; }
#ga-show .gs-flash.go { animation: gsFlash .6s ease-out; }
@keyframes gsFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes gsFade { from { opacity: 0; } }
#ga-show .gs-box { position: relative; z-index: 2; width: min(760px, 94vw); max-height: 92vh; overflow: visible; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; color: #fff; animation: gsIn .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes gsIn { from { transform: scale(.85); opacity: 0; } }
#ga-show .gs-box.shake { animation: gsShake .5s; }
@keyframes gsShake { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-8px,4px); } 40% { transform: translate(7px,-5px); } 60% { transform: translate(-5px,-3px); } 80% { transform: translate(4px,3px); } }
#ga-show .gs-t { font-size: 20px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 14px rgba(255,79,163,.8); }
#ga-show .gs-sum { min-height: 20px; font-size: 13px; color: rgba(255,255,255,.85); text-align: center; } #ga-show .gs-sum b { color: #ffd740; } #ga-show .gs-sum b.ep { color: #ea80fc; }
#ga-show .gs-foot { display: flex; gap: 10px; }
#ga-show .gs-foot button { padding: 9px 26px; border-radius: 999px; border: 0; font: inherit; font-weight: 800; cursor: pointer; }
#ga-show .gs-skip { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3) !important; }
#ga-show .gs-ok { background: linear-gradient(180deg, #ffe57a, #ffb300); color: #2a1a00; box-shadow: 0 6px 18px rgba(255,179,0,.45); font-size: 15px; }
#ga-show .hidden { display: none !important; }

/* แคปซูล */
#ga-show .gs-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 700px; }
#ga-show .gs-cap { position: relative; width: 104px; height: 124px; display: grid; place-items: center; animation: gsDrop .45s cubic-bezier(.3,1.6,.5,1) both; }
#ga-show.n1 .gs-cap { width: 170px; height: 190px; } #ga-show.n1 .gs-cap .cap { transform: scale(1.5); } #ga-show.n1 .gs-card { transform: scale(1.35); }
@keyframes gsDrop { from { transform: translateY(-60px) scale(.6); opacity: 0; } }
#ga-show .cap { position: relative; width: 64px; height: 64px; }
#ga-show .cap b { position: absolute; left: 0; width: 64px; height: 32px; transition: transform .45s cubic-bezier(.3,1.4,.5,1), opacity .45s; }
#ga-show .cap .top { top: 0; border-radius: 32px 32px 0 0; background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), var(--c1); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
#ga-show .cap .bot { bottom: 0; border-radius: 0 0 32px 32px; background: linear-gradient(#f5f5f5, #d9d9e3); border-top: 3px solid rgba(0,0,0,.18); }
#ga-show .gs-cap.shake .cap { animation: capShake .12s infinite; }
@keyframes capShake { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
#ga-show .gs-cap.charge .cap { animation: capShake .07s infinite, capGlow .5s infinite alternate; filter: drop-shadow(0 0 14px #d500f9); }
@keyframes capGlow { to { filter: drop-shadow(0 0 26px #ea80fc) brightness(1.4); } }
#ga-show .gs-cap.charge::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, #d500f9aa, transparent 40%); animation: czSpin .5s linear infinite; }
#ga-show .gs-cap.open .top { transform: translate(-26px,-42px) rotate(-40deg); opacity: 0; }
#ga-show .gs-cap.open .bot { transform: translate(26px,34px) rotate(35deg); opacity: 0; }
#ga-show .gs-card { position: absolute; inset: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transform: scale(.3); transition: transform .4s cubic-bezier(.3,1.7,.5,1), opacity .25s; }
#ga-show .gs-cap.open .gs-card { opacity: 1; transform: scale(1); }
#ga-show .gs-card .gc-it { width: 92px; }
#ga-show .gs-card em { font-style: normal; font-size: 10px; font-weight: 800; margin-top: 3px; letter-spacing: .5px; color: #cfd8dc; }
#ga-show .gs-card.t-rare em { color: #80d8ff; } #ga-show .gs-card.t-epic em { color: #ea80fc; } #ga-show .gs-card.t-limited em { color: #ffd740; }
#ga-show .gs-tag { position: absolute; top: 2px; right: 0; font: 800 9px/1 system-ui, sans-serif; font-style: normal; padding: 2px 5px; border-radius: 6px; color: #fff; z-index: 2; }
#ga-show .gs-tag.new { background: #ff3355; } #ga-show .gs-tag.dup { background: #8a7fa6; }
#ga-show .gs-cap.open.t-rare::after { content: ''; position: absolute; inset: 4px; border-radius: 14px; box-shadow: 0 0 18px #40c4ff; animation: gsGlow 1.4s infinite alternate; pointer-events: none; }
#ga-show .gs-cap.open.t-epic::before { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(234,128,252,.55) 0 10deg, transparent 10deg 30deg); animation: czSpin 6s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
#ga-show .gs-cap.open.t-epic::after { content: ''; position: absolute; inset: 2px; border-radius: 14px; box-shadow: 0 0 26px #d500f9, 0 0 50px rgba(213,0,249,.5); animation: gsGlow .9s infinite alternate; pointer-events: none; }
#ga-show .gs-cap.open.t-epic .gs-card { animation: gsBounce .6s; }
@keyframes gsGlow { to { opacity: .45; } }
@keyframes gsBounce { 0% { transform: scale(.3); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
#ga-show .gs-p { position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); background: var(--c); border-radius: 50%; pointer-events: none; z-index: 5; animation: gsP var(--d) ease-out forwards; box-shadow: 0 0 6px var(--c); }
#ga-show .gs-p.star { border-radius: 1px; transform: rotate(45deg); }
@keyframes gsP { from { transform: translate(0,0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2) rotate(180deg); opacity: 0; } }

/* ผสม */
#ga-show .gs-ring { position: relative; width: 340px; height: 340px; max-width: 86vw; max-height: 86vw; }
#ga-show .gs-orbit { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; transform: rotate(var(--a)) translateY(-130px) rotate(calc(-1 * var(--a))); transition: transform 1.1s cubic-bezier(.6,0,.9,.4), opacity .8s; }
#ga-show .gs-orbit img { width: 56px; height: 56px; image-rendering: pixelated; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.4); box-shadow: 0 0 12px rgba(179,136,255,.6); }
#ga-show .gs-ring.spin { animation: czSpin 1.3s cubic-bezier(.5,0,.5,1); }
#ga-show .gs-ring.suck .gs-orbit { transform: rotate(var(--a)) translateY(0) rotate(calc(-1 * var(--a))) scale(.2); opacity: 0; }
#ga-show .gs-orb { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #b388ff 40%, #4a148c 75%); box-shadow: 0 0 30px #b388ff, 0 0 60px rgba(124,77,255,.6); animation: orbPulse 1s infinite alternate; transition: transform .8s, opacity .3s; }
#ga-show.pet .gs-orb { background: radial-gradient(circle at 40% 35%, #fff, #4fd8ff 40%, #01579b 75%); box-shadow: 0 0 30px #4fd8ff, 0 0 60px rgba(0,188,255,.6); }
@keyframes orbPulse { to { box-shadow: 0 0 46px #fff, 0 0 90px rgba(124,77,255,.8); } }
#ga-show .gs-ring.suck .gs-orb { transform: scale(1.8); animation: orbPulse .15s infinite alternate; }
#ga-show .gs-ring.boom .gs-orb { transform: scale(4); opacity: 0; }
#ga-show .gs-result { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transform: scale(.4); transition: transform .6s cubic-bezier(.3,1.6,.5,1), opacity .3s; }
#ga-show .gs-ring.reveal .gs-result { opacity: 1; transform: scale(1); }
#ga-show .gs-card.big { position: relative; inset: auto; opacity: 1; transform: scale(1.6); }
#ga-show .gs-rname { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
#ga-show .gs-rname b { font-size: 18px; } #ga-show .gs-rname span { font-size: 13px; color: rgba(255,255,255,.85); }
#ga-show .gs-rays { position: absolute; left: 50%; top: 42%; width: 520px; height: 520px; margin: -260px; border-radius: 50%; opacity: 0; pointer-events: none; }
#ga-show .gs-ring.t-epic .gs-rays, #ga-show .gs-ring.t-rare .gs-rays { opacity: .5; background: repeating-conic-gradient(from 0deg, rgba(179,136,255,.4) 0 8deg, transparent 8deg 24deg); animation: czSpin 12s linear infinite; mask: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask: radial-gradient(circle, #000 20%, transparent 65%); }
/* LIMITED — ใหญ่สุด */
#ga-show .gs-ring.lim .gs-rays { opacity: 1; background: repeating-conic-gradient(from 0deg, #ff4fa3 0 6deg, #ffd740 6deg 12deg, #7cffb2 12deg 18deg, #4fd8ff 18deg 24deg, #b388ff 24deg 30deg, transparent 30deg 40deg); animation: czSpin 5s linear infinite; mask: radial-gradient(circle, #000 18%, transparent 68%); -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); }
#ga-show .gs-ring.lim .gs-result::before { content: ''; position: absolute; left: 50%; top: 42%; width: 190px; height: 190px; margin: -95px; border-radius: 50%; border: 6px solid transparent; background: conic-gradient(#ff4fa3, #ffd740, #7cffb2, #4fd8ff, #b388ff, #ff4fa3) border-box; -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); animation: czSpin 2s linear infinite, limPulse .8s infinite alternate; }
@keyframes limPulse { to { transform: scale(1.18); filter: brightness(1.5); } }
#ga-show .gs-ring.lim .gs-card.big { animation: limCard 1s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 0 22px #ffd740); }
@keyframes limCard { 0% { transform: scale(.2) rotate(-20deg); } 60% { transform: scale(2.1) rotate(6deg); } 100% { transform: scale(1.6); } }
#ga-show .gs-rname b.lim { font-size: 30px; font-weight: 900; letter-spacing: 3px; background: linear-gradient(90deg, #ff4fa3, #ffd740, #7cffb2, #4fd8ff, #b388ff, #ff4fa3); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: limText 1.2s linear infinite; filter: drop-shadow(0 0 10px rgba(255,215,64,.8)); }
@keyframes limText { to { background-position: 200% 0; } }
#ga-show .gs-ring.lim ~ * { }

/* ---------- 📱 จุดแจ้งเตือนโทรศัพท์ ---------- */
.ph-dot { position: absolute; top: -6px; right: -6px; z-index: 3; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff3355; color: #fff; font: 800 10px/18px system-ui, sans-serif; text-align: center; border: 2px solid #120c24; box-shadow: 0 0 8px rgba(255,51,85,.6); pointer-events: none; white-space: nowrap; }
.ph-gift .ph-dot { animation: phBounce 1.1s ease-in-out infinite; }
@keyframes phBounce { 0%, 60%, 100% { transform: translateY(0) scale(1); } 20% { transform: translateY(-4px) scale(1.15); } 40% { transform: translateY(0) scale(.95); } }
#hud [data-a="phoneToggle"].pxp-has::after { display: none !important; }
#pxp-fab .pxp-badge { display: none !important; }

/* ---------- ผสม: จัดแถวใหม่ ไม่ทับกัน ---------- */
.ga-mixtop { display: grid !important; grid-template-columns: 1fr; justify-items: center; gap: 10px !important; }
.ga-mixtop .ga-prize { justify-self: stretch; }
.ga-mixtop .ga-slots { flex: none; justify-content: center; flex-wrap: wrap; }
.ga-mixtop .ga-mixbtns { justify-content: center; }
#ga-show .gs-rname { padding: 8px 18px; border-radius: 14px; background: rgba(10,4,24,.72); box-shadow: 0 0 20px rgba(0,0,0,.5); position: relative; z-index: 2; }
.ph-dot.in { top: -7px; right: -9px; }
.pxp-head > b .ph-dot.in { position: relative; top: -2px; right: auto; margin-left: 8px; display: inline-block; vertical-align: middle; }
.pxp-seg button .ph-dot.in { top: -8px; right: -4px; }
.pxp-app > i .ph-dot.in { top: -6px; right: -6px; font-size: 11px; }
