.game-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.game-modal[hidden] {
    display: none;
}

.game-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

.game-modal__dialog {
    position: relative;
    background: #0a1f17;
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    max-width: 1100px;
    width: 100%;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.game-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
}

.game-modal__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.game-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--c-text);
    transition: background .2s ease;
}

.game-modal__close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.game-modal__body {
    flex-grow: 1;
    background: #000;
    aspect-ratio: 16 / 10;
    min-height: 380px;
}

.game-modal__body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

body.is-modal-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .game-modal {
        padding: 0;
    }
    .game-modal__dialog {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    .game-modal__body {
        aspect-ratio: auto;
        flex: 1 1 auto;
    }
}
