.game-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    place-items: center;
}

.game-modal.open {
    display: grid;
}

.game-modal-content {
    background: var(--color-dark-card);
    border-radius: 16px;
    width: 95%;
    max-width: 1400px;
    max-height: 95vh;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

.game-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: var(--color-white);
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 10;
    line-height: 1;
    transition: background 0.3s;
}

.game-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.game-modal-content {
    position: relative;
}

.game-modal-title {
    padding: 16px 60px 16px 24px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid var(--color-border);
}

.game-modal-frame {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.game-modal-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .game-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .game-modal-title {
        font-size: 16px;
        padding: 12px 50px 12px 16px;
    }

    .game-modal-close {
        top: 8px;
        right: 8px;
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
}
