button.has-info {
    position: relative;
}

.game-info-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    z-index: 2;
    transition: background 0.2s, transform 0.2s;
}
.game-info-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.game-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.game-info-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.game-info-modal {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 28px 24px 24px;
    max-width: 440px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.6;
}

.game-info-modal h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.game-info-modal p {
    margin: 8px 0;
}

.game-info-modal ul {
    margin: 6px 0 10px 22px;
    padding: 0;
}

.game-info-modal li {
    margin-bottom: 5px;
}

.game-info-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #999;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    z-index: 1;
}

.game-info-close:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .game-info-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .game-info-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] .game-info-modal {
    background: #1e1e2e;
    color: #e0e0e0;
}

[data-theme="dark"] .game-info-close {
    color: #777;
}

[data-theme="dark"] .game-info-close:hover {
    color: #ddd;
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 850px) {
    .game-info-overlay { padding: 12px; }
    .game-info-modal { padding: 24px 18px 20px; font-size: 0.88rem; }
    .game-info-modal h2 { font-size: 1.1rem; }
}

@media (max-width: 380px) {
    .game-info-overlay { padding: 8px; }
    .game-info-modal { padding: 20px 14px 16px; font-size: 0.85rem; max-height: 85vh; }
    .game-info-modal h2 { font-size: 1rem; margin-bottom: 10px; }
    .game-info-modal li { font-size: 0.82rem; }
}
