/* carksandik: sandık açma çarkı (kendi çizimimiz, dış görsel yok) */
#cks { position: fixed; inset: 0; z-index: 140; background: #000b; display: flex; align-items: center; justify-content: center; padding: 12px; }
#cks[hidden] { display: none; }
.cks-win { width: min(680px, 100%); background: radial-gradient(ellipse at 50% 0%, #4a2a10 0%, #1f1b2b 62%); border: 2px solid #ffb04a; border-radius: 14px; padding: 14px; box-shadow: 0 0 40px #ff9a3c55, 0 20px 60px #000c; }
.cks-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cks-top h3 { margin: 0; color: #ffd84a; font-size: 18px; flex: 1; }
.cks-reel { position: relative; overflow: hidden; height: calc(var(--cw) + 14px); border-radius: 10px; background: linear-gradient(#120e18, #221a2c 50%, #120e18); border: 1px solid #ffb04a66; box-shadow: inset 0 0 18px #000; }
.cks-reel::before, .cks-reel::after { content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 2; pointer-events: none; }
.cks-reel::before { left: 0; background: linear-gradient(90deg, #120e18, transparent); }
.cks-reel::after { right: 0; background: linear-gradient(270deg, #120e18, transparent); }
.cks-strip { display: flex; height: 100%; align-items: center; will-change: transform; }
.cks-cell { flex: 0 0 var(--cw); height: calc(var(--cw) - 6px); box-sizing: border-box; margin: 0; padding: 4px; display: flex; align-items: center; justify-content: center; position: relative; border: 2px solid var(--c); border-radius: 9px; background: radial-gradient(circle, color-mix(in srgb, var(--c) 28%, transparent) 0%, #0006 75%); transform: scale(.9); }
.cks-cell b { position: absolute; right: 5px; bottom: 2px; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000; }
.cks-cell.win { transform: scale(1); box-shadow: 0 0 18px var(--c), inset 0 0 12px var(--c); animation: cksp 0.9s ease-in-out infinite; }
@keyframes cksp { 50% { box-shadow: 0 0 32px var(--c), inset 0 0 18px var(--c); } }
.cks-mark { position: absolute; z-index: 3; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #ffd84a; box-shadow: 0 0 10px #ffd84a; pointer-events: none; }
.cks-mark::before, .cks-mark::after { content: ''; position: absolute; left: -6px; border: 7.5px solid transparent; }
.cks-mark::before { top: 0; border-top-color: #ffd84a; }
.cks-mark::after { bottom: 0; border-bottom-color: #ffd84a; }
.cks-res { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; font-size: 15px; animation: cksin .35s ease-out; }
.cks-res[hidden] { display: none; }
.cks-res b { font-size: 17px; text-shadow: 0 0 8px #000; }
@keyframes cksin { from { opacity: 0; transform: translateY(6px); } }
@media (max-height: 520px), (max-width: 520px) { .cks-win { padding: 10px; } .cks-top h3 { font-size: 15px; } .cks-top { margin-bottom: 6px; } .cks-res { margin-top: 8px; font-size: 13px; } .cks-res b { font-size: 15px; } }
.cks-cell canvas { width: calc(var(--cw) - 22px) !important; height: calc(var(--cw) - 22px) !important; max-width: none; object-fit: contain; }
/* sandığın içindekiler ve oranları */
.cks-loot { margin-top: 12px; border-top: 1px solid #ffb04a44; padding-top: 8px; }
.cks-lh { color: #ffd84a; font-weight: 700; font-size: 14px; margin-bottom: 6px; } .cks-lh small { color: #cbbfa8; font-weight: 400; }
.cks-sum { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 8px; }
.cks-sum span { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--c); color: var(--c); background: #0005; } .cks-sum b { color: #fff; }
.cks-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 6px; }
.cks-row { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 7px; background: #ffffff08; border-left: 3px solid var(--c); font-size: 12px; min-width: 0; }
.cks-row canvas { flex: 0 0 auto; }
.cks-nm { flex: 1; min-width: 0; color: var(--c); line-height: 1.2; overflow: hidden; } .cks-nm small { display: block; font-size: 10.5px; } .cks-nm em { font-style: normal; }
.cks-row > b { color: #fff; font-size: 12.5px; }
.cks-row.hit { background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: 0 0 10px var(--c); }
@media (max-width: 560px) { .cks-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-height: 520px) { .cks-loot { margin-top: 6px; padding-top: 5px; } .cks-lh { font-size: 12px; margin-bottom: 3px; } .cks-sum { margin-bottom: 4px; } .cks-sum span { font-size: 11px; padding: 1px 6px; } .cks-row { font-size: 11px; padding: 1px 5px; } .cks-nm small { font-size: 9.5px; } .cks-win { max-height: 96vh; overflow-y: auto; } }
.cks-row canvas { width: 26px !important; height: 26px !important; max-width: none; object-fit: contain; }
@media (max-height: 520px) { .cks-row canvas { width: 20px !important; height: 20px !important; } .cks-top i, .cks-top canvas { width: 28px !important; height: 28px !important; } .cks-win { padding: 8px 10px; } }
/* bekleme ve bağlantı hatası */
.cks-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; text-align: center; font-size: 15px; }
.cks-wait p { margin: 0; } .cks-wait small { color: #cbbfa8; font-size: 12.5px; }
.cks-wait.err p { color: #ffb4a8; }
.cks-wait .row { display: flex; gap: 10px; justify-content: center; }
.cks-dot { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #ffb04a44; border-top-color: #ffd84a; animation: cksr 0.9s linear infinite; }
@keyframes cksr { to { transform: rotate(360deg); } }
