.game-page {
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    min-width: 100%;
    min-height: 100%;
    text-align: center;
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-content: center;
}

.game-items {
    background: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 99%;
    min-height: 95%;
    width: 95vw;
    height: 95vh;
    overflow: hidden;
    padding: 24px;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    transition: opacity 0.5s ease;
}

.game-items.fade-out {
    opacity: 0;
}

.game-items.fade-in {
    opacity: 1;
}

.game-item {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: solid 3px var(--input-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.game-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.item-info {
    font-family: "Wix", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    width: 100%;
}

.game-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(39, 192, 33, 0.2);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-item:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.game-item:hover {
    border: solid 3px var(--text-accent);
}

.item-info-left {
    text-align: right;
}

.item-info-right {
    text-align: left;
}

.vote-percentage {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 30px;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    text-align: center;
    white-space: nowrap;
}

@keyframes bounce-in {
    0% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }

    80% {
        transform: translateX(-50%) scale(0.9);
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

@keyframes bounce-out {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) scale(0);
        opacity: 0;
    }
}

.vote-percentage.show {
    animation: bounce-in 0.5s forwards;
}

.vote-percentage.hide {
    animation: bounce-out 0.3s forwards;
}

.game-round-info,
#next-round,
#close-game {
    display: none;
}

.game-progress {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    opacity: 0.8;
    padding: 10px 10px;
    border-radius: 25px;
    font-size: 1rem;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-aspect-ratio: 1/1) {
    .game-items {
        flex-direction: column;
        height: 100vh;
        width: 100%;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        gap: 5px;
    }

    .game-item {
        width: 99%;
        height: 50%;
    }

    .game-progress {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1rem;
        padding: 4px 8px;
        background-color: rgb(10, 18, 24);
    }
}