.gacha-wrap {
    display: flex;
    background: var(--cream);
}

.gacha-grid {
    flex: 1;
    background: repeating-conic-gradient(var(--cream) 0% 25%, #f0d8a8 0% 50%) 0 0/26px 26px;
    padding: 7px;
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 4px;
    border-right: 3px solid var(--dark);
}

.gball {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 2.5px solid var(--dark);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform .15s;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .12);
}

.gball:hover {
    transform: scale(1.1);
}

.gball.sel {
    outline: 3px solid white;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--pink);
    animation: gbounce .4s ease infinite alternate;
}

.gshine {
    position: absolute;
    top: 13%;
    left: 17%;
    width: 27%;
    height: 21%;
    background: rgba(255, 255, 255, .55);
    border-radius: 50%;
    transform: rotate(-25deg);
    pointer-events: none;
}

.gside {
    width: 60px;
    background: #f9c0d0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 4px;
    gap: 5px;
}

.gslot {
    width: 38px;
    height: 56px;
    background: var(--cream);
    border: 2px solid var(--dark);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    text-align: center;
    padding: 2px;
    overflow: hidden;
}

.gslot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gdots {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gdotrow {
    display: flex;
    gap: 2px;
}

.gdot {
    width: 5px;
    height: 5px;
    background: #c05070;
    border-radius: 50%;
}

.gcost {
    font-family: 'Press Start 2P', monospace;
    font-size: 5px;
    color: var(--dark);
    text-align: center;
}

.glever {
    width: 36px;
    height: 36px;
    background: var(--pink);
    border-radius: 50%;
    border: 3px solid var(--dark);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 var(--dark);
    transition: transform .15s, box-shadow .15s;
    margin-top: auto;
}

.glever:active {
    transform: translateY(4px);
    box-shadow: none;
}

/* GACHA RESULT */
#g-result {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 8000;
    background: rgba(0, 0, 0, .85);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0;
}

.gr-gif {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.gr-box {
    background: white;
    border: 4px solid var(--pink);
    border-radius: 20px;
    padding: 20px 28px;
    text-align: center;
    position: relative;
    animation: popIn .4s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 6px 8px 0 var(--dark);
    max-width: 300px;
}

.gr-spark {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
}

.gr-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    color: var(--pink);
    margin-bottom: 8px;
}

.gr-alien {
    width: 110px;
    height: 110px;
    margin: 0 auto 8px;
}

.gr-alien img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gr-name {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 3px;
}

.gr-rarity {
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    margin-bottom: 4px;
}

.gr-rarity.common {
    color: #888;
}

.gr-rarity.uncommon {
    color: #60a5fa;
}

.gr-rarity.rare {
    color: #f5c842;
}

.gr-rarity.toy {
    color: #a78bfa;
}

.gr-rarity.title {
    color: var(--pink);
}

.gr-desc {
    font-family: 'Press Start 2P', monospace;
    font-size: 6px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.8;
}

.gr-btn {
    background: var(--pink);
    color: white;
    border: 2px solid var(--dark);
    border-radius: 16px;
    padding: 8px 20px;
    font-family: 'Press Start 2P', monospace;
    font-size: 7px;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--dark);
}
