/*
 * gacha.css — Gacha page. Single ui-panel (banner tabs + detail + rate
 * table), same "nested-on-tan" convention as everywhere else. Result reveal
 * reuses shell.css's .ui-modal-overlay/.ui-modal primitives.
 */

.gacha-main {
    position: relative; z-index: 2; flex: 1;
    display: flex; padding: 16px 20px; min-height: 0; overflow: hidden;
}
.gacha-panel { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }

.gacha-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; margin-bottom: 4px; }
.gacha-tab {
    padding: 8px 14px; border-radius: 7px; cursor: pointer;
    font-size: 12.5px; font-weight: 700; color: #8a6a48; background: rgba(58,36,16,.06);
    border: 1px solid rgba(58,36,16,.15); transition: background .15s, color .15s;
}
.gacha-tab.active { background: rgba(200,100,26,.18); color: #c8641a; border-color: rgba(200,100,26,.5); }

.gacha-banner-card {
    background: rgba(58,36,16,.06); border: 1px solid rgba(58,36,16,.15);
    border-radius: 12px; padding: 20px 18px; text-align: center;
}
.gacha-banner-icon { font-size: 44px; margin-bottom: 6px; }
.gacha-banner-title { font-size: 16px; font-weight: 800; color: #2c1a08; }
.gacha-banner-desc { font-size: 12.5px; color: #6b4520; margin-top: 4px; }

.gacha-pity { margin: 14px 0; }
.gacha-pity-lbl { font-size: 11.5px; color: #8a6a48; margin-bottom: 5px; }
.gacha-pity-track { height: 7px; border-radius: 4px; background: rgba(58,36,16,.12); overflow: hidden; }
.gacha-pity-fill { height: 100%; background: linear-gradient(90deg,#7c3fd1,#a371f7); border-radius: 4px; transition: width .3s ease; }

.gacha-cost { font-size: 12px; color: #6b4520; margin: 14px 0 10px; }
.gacha-cost strong { color: #c8641a; font-family: var(--font-mono); }

.gacha-pull-row { display: flex; gap: 10px; }
.gacha-pull-btn { flex: 1; padding: 12px 6px; font-size: 12.5px; }

.gacha-rates { display: flex; flex-direction: column; gap: 6px; }
.gacha-rate-row {
    display: flex; align-items: center; gap: 10px;
    background: rgba(58,36,16,.05); border: 1px solid rgba(58,36,16,.12);
    border-radius: 8px; padding: 8px 12px; font-size: 12.5px;
}
.gacha-rate-row.main { background: rgba(200,100,26,.1); border-color: rgba(200,100,26,.4); }
.gacha-rate-icon { font-size: 18px; flex-shrink: 0; }
.gacha-rate-lbl { flex: 1; color: #2c1a08; font-weight: 600; }
.gacha-rate-pct { font-family: var(--font-mono); font-weight: 800; color: #8a6a48; flex-shrink: 0; }
.gacha-rate-row.main .gacha-rate-pct { color: #c8641a; }

/* ── Result reveal modal ─────────────────────────────────────────────────── */

.gacha-result-modal { max-width: 460px; text-align: center; }
.gacha-result-title { font-size: 15px; font-weight: 800; color: #2c1a08; margin-bottom: 14px; }
.gacha-result-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
    max-height: 300px; overflow-y: auto; scrollbar-width: none;
}
.gacha-result-grid::-webkit-scrollbar { display: none; }

.gacha-result-item {
    position: relative; background: rgba(58,36,16,.06); border: 1.5px solid rgba(58,36,16,.18);
    border-radius: 9px; padding: 10px 4px 8px; text-align: center;
    animation: gacha-result-pop .35s cubic-bezier(.34,1.56,.64,1) both;
}
.gacha-result-item.main { background: rgba(200,100,26,.14); border-color: rgba(200,100,26,.55); box-shadow: 0 0 0 1px rgba(200,100,26,.3); }
.gacha-result-icon { font-size: 24px; margin-bottom: 4px; }
.gacha-result-lbl { font-size: 9px; color: #6b4520; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gacha-result-amt { font-size: 11.5px; font-weight: 800; color: #2c1a08; font-family: var(--font-mono); margin-top: 2px; }
.gacha-result-pity-tag {
    position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    background: #7c3fd1; color: #fff8ec; font-size: 8px; font-weight: 800; letter-spacing: .5px;
    padding: 2px 6px; border-radius: 999px; white-space: nowrap;
}
@keyframes gacha-result-pop {
    0%   { transform: scale(0); opacity: 0; }
    70%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}

@container (max-width: 600px) {
    .gacha-result-grid { grid-template-columns: repeat(3, 1fr); }
}
