.lootbox {
    --lootbox-item-rarity: gray;
}

.lootbox-case {
    position: relative;
}

.lootbox-case__window {
    position: relative;
    overflow: hidden;
    height: 220px;
    padding: 10px 0;
}

.lootbox-case__shadow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 40px 0 100px -20px rgba(0, 0, 0, 0.7), inset -40px 0 100px -20px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    z-index: 100;
}

.lootbox-case__line {
    position: absolute;
    top: -5px;
    bottom: -5px;
    left: 50%;
    width: 2px;
    margin-left: -2px;
    background-color: red;
    z-index: 101;
}

.lootbox-case__line:before {
    content: '';
    position: absolute;
    left: 50%;
    top: -5px;
    transform: translate(-50%, -100%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 20px solid #f00;
}

.lootbox-case__line:after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translate(-50%, -100%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 20px solid #f00;
    bottom: -45px;
}

.lootbox-case__rotatable {
    display: flex;
    will-change: transform;
    gap: 10px
}

.lootbox-case__item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    border: 3px solid var(--lootbox-item-rarity);
    background-color: var(--lootbox-item-rarity);
    position: relative;
    z-index: 100;
    color: #fff;
    padding: 10px;
}

.lootbox-case__item:before {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #090100 0%, rgb(16 6 6 / 66%) 100%);
    position: absolute;
    left: 0;
    content: "";
    z-index: -1;
}

.lootbox-case__item-name {
    text-align: center;
}

.lootbox-case__item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.lootbox-case__item-image img {
    max-width: 80%;
    max-height: 80%;
}

.lootbox__items {
    margin-top: 2rem;
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(7, 1fr);
}

.lootbox__item {
    min-width: 0;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border: 3px solid var(--lootbox-item-rarity);
    background-color: var(--lootbox-item-rarity);
    position: relative;
    z-index: 100;
    color: #fff;
}

.lootbox__item:before {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #090100 0%, rgb(16 6 6 / 66%) 100%);
    position: absolute;
    left: 0;
    top: 0;
    content: "";
    z-index: -1;
}

.lootbox__item-image {
    flex: 1;
    display: flex;
    max-height: 100px;
    justify-content: center;
    align-items: center;
}

.lootbox__item-image img {
    max-height: 60%;
}

.lootbox__item-percent {
    position: absolute;
    top: .25rem;
    right: .25rem;
}

.lootbox__item-name {
    text-align: center;
    margin-bottom: .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lootbox__item-rarity {
    text-align: center;
    text-transform: uppercase;
    color: var(--lootbox-item-rarity);
    font-weight: bold;
}

.lootbox__price {
    margin: 2rem 0;
    font-size: 1.2rem;
}

.lootbox__price-value {
    font-size: 1.4rem;
    font-weight: bold;
}

.lootbox .balance-box {
    margin: 4rem 0 2rem;
}

@media (max-width: 576px) {
    .lootbox__items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .lootbox__items {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .lootbox__items {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 993px) and (max-width: 1200px) {
    .lootbox__items {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1201px) and (max-width: 1400px) {
    .lootbox__items {
        grid-template-columns: repeat(6, 1fr);
    }
}