/* Styles for 3d-ai.html.
   Moved verbatim out of the page's inline <style> block — see 3d.css for why. */
        canvas { display: block; width: 100%; height: 100%; touch-action: none; }
        body { margin: 0; overflow: hidden; background: #111; font-family: sans-serif; }

        #ui { position: absolute; top: 20px; left: 20px; color: white; }
        #ui h1 { margin: 0 0 4px; font-size: 18px; }
        #status { pointer-events: none; margin: 4px 0 0; }
        #score  { pointer-events: none; font-size: 12px; margin-top: 4px; opacity: 0.75; }

        /* AI controls */
        #undoBtn {
            margin-top: 8px;
            background: rgba(255,255,255,0.12);
            color: white;
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 4px;
            padding: 4px 12px;
            font-size: 13px;
            cursor: pointer;
            display: block;
        }
        #undoBtn:hover    { background: rgba(255,255,255,0.22); }
        #undoBtn:disabled { opacity: 0.35; cursor: default; }

        #hintBtn {
            margin-top: 6px;
            background: rgba(241,196,15,0.18);
            color: #f1c40f;
            border: 1px solid rgba(241,196,15,0.5);
            border-radius: 4px;
            padding: 4px 12px;
            font-size: 13px;
            cursor: pointer;
            display: block;
        }
        #hintBtn:hover    { background: rgba(241,196,15,0.32); }
        #hintBtn:disabled { opacity: 0.35; cursor: default; }

        #difficulty { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
        #difficulty .diff-row { display: flex; align-items: center; gap: 8px; }
        #difficulty label { font-size: 13px; opacity: 0.8; pointer-events: none; }
        #diffSlider {
            -webkit-appearance: none;
            appearance: none;
            width: 140px; height: 4px;
            border-radius: 2px;
            background: rgba(255,255,255,0.25);
            outline: none;
            cursor: pointer;
        }
        #diffSlider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px; height: 14px;
            border-radius: 50%;
            background: #fff;
            cursor: pointer;
        }
        #diffSlider::-moz-range-thumb {
            width: 14px; height: 14px;
            border-radius: 50%;
            background: #fff;
            border: none;
            cursor: pointer;
        }
        #diffLabel { font-size: 12px; opacity: 0.7; min-width: 80px; pointer-events: none; }

        /* Link to online play */
        #onlineLink {
            display: block;
            margin-top: 12px;
            background: rgba(100,160,255,0.15);
            color: #7eb8ff;
            border: 1px solid rgba(100,160,255,0.4);
            border-radius: 4px;
            padding: 4px 12px;
            font-size: 13px;
            text-decoration: none;
            text-align: center;
        }
        #onlineLink:hover { background: rgba(100,160,255,0.28); }

        /* ── Popups ─────────────────────────────────────────────── */
        #checkPopup {
            display: none;
            position: fixed; top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0.6);
            background: linear-gradient(135deg, #c0392b, #8e0000);
            color: #fff; font-size: 80px; font-weight: 900; letter-spacing: 8px;
            padding: 28px 64px; border-radius: 18px;
            box-shadow: 0 0 60px rgba(255,60,60,0.7), 0 0 120px rgba(255,0,0,0.3);
            pointer-events: none; z-index: 999; opacity: 0;
            transition: opacity 0.15s ease, transform 0.15s ease;
            text-shadow: 0 2px 12px rgba(0,0,0,0.5);
        }
        #checkPopup.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }

        #drawPopup {
            display: none;
            position: fixed; top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0.6);
            background: linear-gradient(135deg, #2471a3, #0a3d62);
            color: #fff; font-size: 80px; font-weight: 900; letter-spacing: 8px;
            padding: 28px 64px; border-radius: 18px;
            box-shadow: 0 0 60px rgba(36,113,163,0.7), 0 0 120px rgba(10,61,98,0.4);
            pointer-events: none; z-index: 999; opacity: 0;
            transition: opacity 0.15s ease, transform 0.15s ease;
            text-shadow: 0 2px 12px rgba(0,0,0,0.5);
        }
        #drawPopup.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }

        #stalematePopup {
            display: none;
            position: fixed; top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0.6);
            background: linear-gradient(135deg, #6c3483, #3b1a5a);
            color: #fff; font-size: 68px; font-weight: 900; letter-spacing: 6px;
            padding: 28px 64px; border-radius: 18px;
            box-shadow: 0 0 60px rgba(155,89,182,0.7), 0 0 120px rgba(108,52,131,0.4);
            pointer-events: none; z-index: 999; opacity: 0;
            transition: opacity 0.15s ease, transform 0.15s ease;
            text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,0.5); line-height: 1.2;
        }
        #stalematePopup.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }

        .gameOverPopup {
            display: none;
            position: fixed; top: 50%; left: 50%;
            transform: translate(-50%, -50%) scale(0.6);
            color: #fff; font-size: 60px; font-weight: 900; letter-spacing: 6px;
            padding: 28px 64px; border-radius: 18px;
            pointer-events: auto; cursor: pointer; z-index: 999; opacity: 0;
            transition: opacity 0.4s ease, transform 0.4s ease;
            text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,0.5); line-height: 1.2;
        }
        .gameOverPopup.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
        #whiteWinsPopup {
            background: linear-gradient(135deg, #b7950b, #7d6608);
            box-shadow: 0 0 60px rgba(241,196,15,0.7), 0 0 120px rgba(183,149,11,0.3);
        }
        #blackWinsPopup {
            background: linear-gradient(135deg, #2e2e2e, #0a0a0a);
            box-shadow: 0 0 60px rgba(180,180,180,0.5), 0 0 120px rgba(100,100,100,0.3);
        }

/* ── Converted from a style="" attribute — see 3d.css for the rationale. ───── */
.gameOverPopup .sub-note {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 2px;
    opacity: 0.75;
}
