/* ── Mystery Box Game ─────────────────────────────────────── */
.mc-mystery-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    padding: 20px 8px 12px;
    flex-wrap: wrap;
}

.mc-mystery-box {
    position: relative;
    width: 80px;
    cursor: pointer;
    transition: transform .2s;
    user-select: none;
}
.mc-mystery-box:hover:not(.mc-mystery-dim) {
    transform: translateY(-6px) scale(1.05);
}

/* Lid */
.mc-mystery-lid {
    width: 100%;
    height: 22px;
    background: linear-gradient(135deg, var(--mc-primary, #7c3aed), #5b21b6);
    border-radius: 6px 6px 0 0;
    position: relative;
    z-index: 2;
    transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s;
    transform-origin: top center;
    box-shadow: 0 -2px 8px rgba(0,0,0,.2);
}
/* Bow on lid */
.mc-mystery-lid::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 14px;
    background: rgba(255,255,255,.35);
    border-radius: 50% 50% 0 0;
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

/* Base */
.mc-mystery-base {
    width: 100%;
    height: 72px;
    background: linear-gradient(160deg, var(--mc-primary, #7c3aed) 0%, #4c1d95 100%);
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    position: relative;
    overflow: hidden;
}
.mc-mystery-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 100%;
    background: rgba(255,255,255,.15);
}
.mc-mystery-icon {
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

/* States */
.mc-mystery-dim {
    opacity: .35;
    cursor: default;
    filter: grayscale(.6);
}

@keyframes mc-mystery-shake {
    0%,100%{ transform: translateX(0) rotate(0); }
    20%    { transform: translateX(-5px) rotate(-3deg); }
    40%    { transform: translateX(5px) rotate(3deg); }
    60%    { transform: translateX(-4px) rotate(-2deg); }
    80%    { transform: translateX(4px) rotate(2deg); }
}
.mc-mystery-shake {
    animation: mc-mystery-shake .5s ease-in-out;
}

/* Open: lid flies up */
.mc-mystery-open .mc-mystery-lid {
    transform: translateY(-28px) rotate(-20deg) scale(1.1);
    opacity: 0;
}

/* Win glow */
@keyframes mc-mystery-glow {
    0%,100% { box-shadow: 0 0 0 0 rgba(251,191,36,.6); }
    50%     { box-shadow: 0 0 0 16px rgba(251,191,36,0); }
}
.mc-mystery-win .mc-mystery-base {
    background: linear-gradient(160deg, #f59e0b 0%, #d97706 100%);
    animation: mc-mystery-glow .8s ease 2;
}
.mc-mystery-win .mc-mystery-icon { font-size: 32px; }

/* Lose */
.mc-mystery-lose .mc-mystery-base {
    background: linear-gradient(160deg, #6b7280 0%, #374151 100%);
}
