.game-play {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: var(--shadow-mid);
    overflow: hidden;
    background: var(--bg-card);
}

.game-play.is-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 9999;
    border-radius: 0;
}

/* Ẩn các elements khi game-play có class is-fullscreen */
html:has(.game-play.is-fullscreen) .site-header,
html:has(.game-play.is-fullscreen) .site-footer,
html:has(.game-play.is-fullscreen) .menu-list,
html:has(.game-play.is-fullscreen) .game-about,
html:has(.game-play.is-fullscreen) .similar-games-list {
    display: none;
}

/* Disable scroll và ẩn overflow khi fullscreen */
html:has(.game-play.is-fullscreen),
html:has(.game-play.is-fullscreen) body {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.game-play-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@media (width < 48rem) {
    .game-play-content {
        aspect-ratio: 1;
    }
}

.game-play-preview {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.game-play-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

.game-play-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.game-preview-image {
    object-fit: cover;
    border-radius: var(--card-game-border-radius);
    box-shadow: var(--shadow-angle);
    aspect-ratio: 16 / 10;
}

.game-preview-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 1rem 0;
    padding: 0 1rem;
    text-align: center;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

    @media (width < 48rem) {
        font-size: 1rem;
    }
}

.button-play-game {
    color: rgb(20, 20, 20);
    text-transform: capitalize;
    font-weight: 900;
    cursor: pointer;
    background-color: var(--button-play-bg);
    align-items: center;
    display: inline-flex;
    justify-content: center;
    position: relative;
    border-radius: 999px;
    border-width: 0px;
    animation: 1s ease-out 0s infinite normal none running pulsePopOut;
    transform-origin: center center;
    user-select: none;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.1s;
    padding: 1rem 3rem;
    font-size: 1.25rem;
}

.button-play-game:hover {
    animation: auto ease 0s 1 normal none running none;
}

.button-play-game::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 999px;
    border: 1px solid var(--button-play-bg);
    opacity: 0;
    transition: opacity 0.2s, top 0.2s, left 0.2s, right 0.2s, bottom 0.2s;
    z-index: 0;
    pointer-events: none;
}

.button-play-game:hover::after {
    opacity: 0.8;
    inset: -7px;
    border: 3px solid var(--button-play-bg);
}

.button-play-game:hover .button-text {
    animation: 0.3s ease 0s 1 normal none running textJump;
}

@keyframes textJump {
    0% {
        transform: translateY(0px);
    }

    10% {
        transform: translateY(-14px);
    }

    40% {
        transform: translateY(5px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulsePopOut {
    0% {
        transform: scale(1);
        background-color: var(--button-play-bg);
        box-shadow: rgba(247, 188, 68, 0.3) 0px 0px 0px;
    }

    20% {
        transform: scale(1.08);
        background-color: rgb(237, 177, 57);
        box-shadow: rgba(247, 188, 68, 0.3) 0px 0px 20px;
    }

    100% {
        transform: scale(1);
        background-color: var(--button-play-bg);
        box-shadow: rgba(247, 188, 68, 0.3) 0px 0px 0px;
    }
}

/* .game-play.is-mobile:not(.is-fullscreen) {
    border-radius: var(--card-game-border-radius);
} */


.game-iframe {
    display: none;
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

.game-play-footer {
    height: 44px;
    width: 100%;
    background: var(--bg-card);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-top: 1px solid var(--border-color);
    box-sizing: border-box;
}

.game-play-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    overflow: hidden;
}

.game-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.game-company {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: -0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-play-actions {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
    align-items: center;
}

.btn-fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.2s;
}

.similar-games-list li {
    border-radius: var(--card-game-border-radius);
    aspect-ratio: 1;
    position: relative;
}

.is-mobile .btn-fullscreen {
    display: none;
}

.game-play.is-mobile:not(.is-fullscreen) .game-play-footer {
    display: none;
}

.icon-expand {
    display: block;
}

.icon-compress {
    display: none;
}

.is-fullscreen .icon-expand {
    display: none;
}

.is-fullscreen .icon-compress {
    display: block;
}

.rotate-screen-warning {
    position: absolute;
    display: none;
    padding: 1rem;
    padding-right: 0;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    border-radius: 1rem;
    border-width: 2px;
    border-color: #ffffff;
    width: 100%;
    top: 10%;
    max-width: 250px;
    background: rgba(149, 149, 149, 0.2);
    overflow: hidden;
}

.rotate-screen-warning span {
    flex: 1 1 0%;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
    line-height: 1.25rem;
    color: #fff;
}

.rotate-screen-warning button {
    position: absolute;
    background: transparent;
    color: #fff;
    border: none;
    height: 100%;
    right: 0;
    padding: 0 0.5rem;
    background: rgba(149, 149, 149, 0.2);
}

.animate-rotate-90 {
    animation: rotate-90 2s infinite;
}

@keyframes rotate-90 {
    0% {
        transform: rotate(0deg);
    }

    70% {
        transform: rotate(135deg);
    }

    100% {
        transform: rotate(135deg);
    }
}