#miniGameOverlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999; display: none;
    align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
}

.game-modal {
    width: 100%; max-width: 450px;
    height: 65vh;
    background: #111;
    border-radius: 15px;
    position: relative;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 10px var(--brand-blue);
    border: 2px solid #333;
}

.gm-header {
    background: #1a1a1a; color: #fff; padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #333;
}
.gm-title { font-family: 'Oswald'; font-size: 1.1rem; letter-spacing: 1px; color: #ccc; }

.gm-close-btn {
    color: #fff; font-size: 1.5rem; cursor: pointer; transition: 0.2s;
    width: 30px; height: 30px; display:flex; align-items:center; justify-content:center;
}
.gm-close-btn:hover { color: var(--brand-red); transform: scale(1.2); }

.gm-body { flex: 1; position: relative; background: #000; overflow: hidden; }

/* RETRO CRT EFEKTİ */
.gm-body::after {
    content: " "; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 2; background-size: 100% 2px, 3px 100%; pointer-events: none;
}

#gameCanvas { display: block; background: #000; touch-action: none; width: 100%; height: 100%; object-fit: contain; }

.gm-score-board {
    position: absolute; top: 20px; width: 100%; text-align: center;
    font-family: 'Oswald'; font-size: 3rem; color: rgba(255,255,255,0.2);
    pointer-events: none; z-index: 1; font-weight: bold;
}

.gm-overlay-msg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; color: white; width: 80%; z-index: 10;
    background: rgba(0,0,0,0.8); padding: 20px; border-radius: 10px;
    border: 1px solid #444; display: none;
}
.gm-btn-restart {
    background: var(--brand-blue); color: white; border: none;
    padding: 10px 25px; font-family: 'Oswald'; font-size: 1.2rem;
    margin-top: 15px; cursor: pointer; border-radius: 5px;
}

.controls-hint {
    position: absolute; bottom: 15px; width: 100%; text-align: center;
    color: rgba(255,255,255,0.4); font-size: 0.75rem; pointer-events: none; z-index: 1;
    text-transform: uppercase; letter-spacing: 1px;
}