.cats-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.cats-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cats-content {
    background: white;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    min-width: 400px;
    margin: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 70vh;
}

.cats-list {
    width: 100%;
    border: 1px solid lightgray;
    border-radius: 10px;
    height: 50vh;
    overflow-y: scroll;
}

.cat-item {
    border: 1px solid lightgray;
    border-radius: 10px;
    height: 8vh;
    margin: 4px;
    padding: 4px;
    display: grid;
    grid-template-columns: 20% 22.5% 25% 22.5%;
    grid-template-rows: 100%;
    gap: 8px;
    align-items: center;
}

.cat-image {
    height: 100%;
    image-rendering: pixelated;
    /*filter: brightness(0);*/
}

.cat-stats {
    font-size: 80%;
}

.pet-cat-button {
    height: 80%;
    width: 100%;
    padding: 8px;
    font-size: 180%;
}
.pet-cat-button:disabled {
    background-color: #9bb6ff;
    font-size: 100%;
}
@media (max-width: 480px) {

    .cats-content {
        min-width: 80%;
        max-width: 300px;
    }

    .pet-cat-button:disabled {
        background-color: #9bb6ff;
        font-size: 60%;
    }

    .pet-cat-button {
        font-size: 120%;

    }
}

.chest-buttons {
    display: flex;
    justify-content: space-between;
    gap: 7px;
}

.chest-buttons > * {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 8px;
}

.chest-buttons > *:disabled {
    background-color: #9bb6ff;
}

.cat-win-modal, .chest-buy-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.cat-win-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 300px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 20px;
}

.egg-image {
    width: 100px;
    height: 100px;
    background: url('chests_images/chest_1.png') no-repeat center/contain;
    margin: 0 auto;
    animation: shake 0.6s infinite;
    image-rendering: pixelated;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    50% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}

/* Кіт */
.cat-chest-image {
    display: none;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background-size: contain;
    background-repeat: no-repeat;
    image-rendering: pixelated;
}

.cat-win-close-button {
    display: none;
}


.chest-buy-content {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    max-width: 300px;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
}
.buy-chest-text {
    font-size: 18px;
}

.chest-buy-content > .chest-buy-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
}
.chest-buy-content > .chest-buy-buttons > * {
    font-size: 28px;
    padding: 4px;
}
.common-bg {
    background-color: #b3e4ff;
}

.rare-bg {
    background-color: #c3ffc8;
}

.epic-bg {
    background-color: #e6d6ff;
}

.legendary-bg {
    background-color: #ffc9c6;
}

.brainrot-bg{
    background: linear-gradient(124deg, rgba(255, 36, 0, 0.5), rgba(232, 29, 29, 0.5), rgba(232, 183, 29, 0.5), rgba(227, 232, 29, 0.5), #1de840, #1ddde8, #2b1de8, #dd00f3, #dd00f3);
    background-size: 1800% 1800%;
    -webkit-animation: rainbow 36s ease infinite;
    -z-animation: rainbow 36s ease infinite;
    -o-animation: rainbow 36s ease infinite;
    animation: rainbow 36s ease infinite;
}

@-webkit-keyframes rainbow {
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}
@-moz-keyframes rainbow {
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}
@-o-keyframes rainbow {
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}
@keyframes rainbow {
    0%{background-position:0% 82%}
    50%{background-position:100% 19%}
    100%{background-position:0% 82%}
}


/* CASES */

.case-container {
    text-align: center;
    padding: 16px;
    max-width: 1200px;
    width: 100%;
}

.case-opener-box {
    position: relative;
    width: 95vw;
    max-width: 800px;
    height: 15vh;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00d0ff;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px auto;
}

.case-selector-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #ff0000, transparent);
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 20px #ff0000;
}

.case-items-strip {
    position: absolute;
    height: 100%;
    display: flex;
    align-items: center;
    transition: transform 15s cubic-bezier(0.1, 0.5, 0.2, 1);
    padding-top: 8px;
    padding-bottom: 8px;
}

.case-item-card {
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid;
    flex-shrink: 0;
}

.case-item-card > img {
    height: 60%;
    image-rendering: pixelated;
}