/* ============================================================
   Shared "How to Play" / Help overlay for all arcade games.
   Loaded by each game via <link rel="stylesheet" href="../help-overlay.css">
   Pairs with help-overlay.js (reads window.GAME_HELP).
   ============================================================ */

/* Floating help button (always visible during play) */
#gameHelpBtn {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(15, 15, 30, 0.78);
    color: #fff;
    font: 700 22px/1 'Segoe UI', Arial, sans-serif;
    cursor: pointer;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
    -webkit-user-select: none;
    user-select: none;
}
#gameHelpBtn:hover {
    background: rgba(40, 40, 70, 0.95);
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(120, 160, 255, 0.6);
}
#gameHelpBtn:active { transform: scale(0.96); }

/* Full-screen dim + modal */
#gameHelpOverlay {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    padding: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
}
#gameHelpOverlay.open { display: flex; }

#gameHelpModal {
    position: relative;
    width: min(620px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #14141f 0%, #0c0c14 100%);
    border: 1px solid #3a3a55;
    border-radius: 14px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(80, 110, 220, 0.15);
    color: #d8d8e4;
    padding: 28px 30px 26px;
    animation: gameHelpPop 0.18s ease-out;
}
@keyframes gameHelpPop {
    from { transform: scale(0.94) translateY(8px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

#gameHelpModal h2 {
    font-size: 28px;
    letter-spacing: 2px;
    color: #fff;
    margin: 0 0 4px;
    text-transform: uppercase;
}
#gameHelpModal .ghTagline {
    color: #8a90ff;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
#gameHelpModal .ghSection {
    margin-bottom: 18px;
}
#gameHelpModal .ghLabel {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffcc55;
    margin-bottom: 8px;
    border-bottom: 1px solid #2a2a40;
    padding-bottom: 4px;
}
#gameHelpModal .ghObjective {
    font-size: 15px;
    line-height: 1.6;
    color: #cfcfe0;
}
#gameHelpModal .ghControls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 7px 14px;
    align-items: baseline;
}
#gameHelpModal .ghKey {
    justify-self: start;
    background: #21213a;
    border: 1px solid #3c3c5c;
    border-radius: 5px;
    padding: 3px 9px;
    font: 600 12.5px/1.3 'Consolas', 'Courier New', monospace;
    color: #fff;
    white-space: nowrap;
}
#gameHelpModal .ghAct {
    font-size: 14px;
    color: #c4c4d6;
    line-height: 1.4;
}
#gameHelpModal .ghTips {
    margin: 0;
    padding-left: 20px;
}
#gameHelpModal .ghTips li {
    font-size: 14px;
    line-height: 1.6;
    color: #b8b8cc;
    margin-bottom: 4px;
}
#gameHelpModal .ghNote {
    background: rgba(255, 180, 60, 0.08);
    border-left: 3px solid #ffaa33;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #e0c080;
    line-height: 1.5;
    margin-bottom: 18px;
}
#gameHelpModal .ghActions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 22px;
}
#gameHelpStart {
    background: linear-gradient(135deg, #4a7dff, #2a52cc);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font: 700 15px 'Segoe UI', Arial, sans-serif;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
#gameHelpStart:hover {
    transform: scale(1.04);
    box-shadow: 0 0 20px rgba(74, 125, 255, 0.5);
}
#gameHelpClose {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #3c3c5c;
    background: #1a1a2a;
    color: #aaa;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
#gameHelpClose:hover { background: #33334d; color: #fff; }

#gameHelpModal .ghHint {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 12px;
}

/* Scrollbar */
#gameHelpModal::-webkit-scrollbar { width: 8px; }
#gameHelpModal::-webkit-scrollbar-thumb { background: #33334d; border-radius: 4px; }
