/* index.css — extracted from inline <style> blocks. Generated by scripts/h1-extract.mjs */
* { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            background: #0a0a0f;
            color: #e0e0e0;
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
            overflow: hidden;
            height: 100vh;
            display: flex;
        }

        #canvas-container {
            flex: 1;
            min-width: 0;
            position: relative;
            overflow: hidden;
        }

        #game-canvas {
            display: block;
            width: 100%;
            height: 100%;
            cursor: grab;
        }
        #game-canvas:active { cursor: grabbing !important; }

        /* Side Panel */
        #side-panel {
            width: 320px;
            background: #12121a;
            border-left: 1px solid #2a2a3a;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        #game-header {
            padding: 20px;
            border-bottom: 1px solid #2a2a3a;
            text-align: center;
        }

        #game-header h1 {
            font-size: 1.4rem;
            font-weight: 700;
            background: linear-gradient(135deg, #c8a84e, #f0d878);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        #status-bar {
            padding: 12px 20px;
            background: #1a1a28;
            font-size: 0.95rem;
            text-align: center;
            border-bottom: 1px solid #2a2a3a;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #status-bar.check { color: #ff6b6b; font-weight: 600; }
        #status-bar.gameover { color: #c8a84e; font-weight: 700; }

        /* Player info */
        .player-info {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 20px;
            border-bottom: 1px solid #2a2a3a;
        }
        .player-info.active { background: #1a1a2e; }
        .player-name {
            font-weight: 600;
            font-size: 0.95rem;
        }
        .player-name .dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-right: 8px;
        }
        .player-info.white .dot { background: #e8e8e8; }
        .player-info.black .dot { background: #444; border: 1px solid #666; }

        .captured-pieces {
            font-size: 1.1rem;
            letter-spacing: 1px;
            min-height: 24px;
            color: #888;
        }

        /* Move history */
        #move-history-container {
            flex: 1;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        #move-history-header {
            padding: 12px 20px;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #666;
            border-bottom: 1px solid #2a2a3a;
        }

        #move-history {
            flex: 1;
            overflow-y: auto;
            padding: 8px 12px;
            font-family: 'Consolas', 'Courier New', monospace;
            font-size: 0.85rem;
        }

        #move-history::-webkit-scrollbar { width: 6px; }
        #move-history::-webkit-scrollbar-track { background: transparent; }
        #move-history::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

        .move-row {
            display: flex;
            padding: 3px 8px;
            border-radius: 4px;
        }
        .move-row:hover { background: #1a1a2e; }
        .move-num { color: #555; width: 35px; text-align: right; margin-right: 12px; }
        .move-white { width: 80px; color: #ccc; }
        .move-black { width: 80px; color: #888; }

        /* Controls */
        #controls {
            padding: 16px 20px;
            border-top: 1px solid #2a2a3a;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .control-row {
            display: flex;
            gap: 8px;
        }

        .btn {
            flex: 1;
            padding: 10px 12px;
            border: 1px solid #2a2a3a;
            background: #1a1a28;
            color: #ccc;
            font-size: 0.85rem;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s;
            font-family: inherit;
        }
        .btn:hover { background: #252538; border-color: #3a3a5a; color: #fff; }
        .btn:active { transform: scale(0.97); }
        .btn.primary {
            background: linear-gradient(135deg, #8b6914, #c8a84e);
            border-color: #c8a84e;
            color: #000;
            font-weight: 600;
        }
        .btn.primary:hover {
            background: linear-gradient(135deg, #a07818, #dabb5e);
        }

        .difficulty-select {
            width: 100%;
            padding: 8px 12px;
            background: #1a1a28;
            border: 1px solid #2a2a3a;
            color: #ccc;
            font-size: 0.85rem;
            border-radius: 6px;
            font-family: inherit;
            cursor: pointer;
        }

        /* Promotion Modal */
        #promotion-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        #promotion-modal.active { display: flex; }

        .promotion-dialog {
            background: #1a1a28;
            border: 1px solid #3a3a5a;
            border-radius: 12px;
            padding: 24px;
            text-align: center;
        }
        .promotion-dialog h3 {
            margin-bottom: 16px;
            color: #c8a84e;
        }
        .promotion-options {
            display: flex;
            gap: 12px;
        }
        .promotion-btn {
            width: 64px;
            height: 64px;
            font-size: 2rem;
            background: #252538;
            border: 2px solid #3a3a5a;
            border-radius: 8px;
            cursor: pointer;
            color: #e0e0e0;
            transition: all 0.15s;
        }
        .promotion-btn:hover {
            border-color: #c8a84e;
            background: #2a2a40;
            transform: scale(1.1);
        }

        /* Game Over Overlay */
        #gameover-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.6);
            z-index: 999;
            align-items: center;
            justify-content: center;
        }
        #gameover-overlay.active { display: flex; }

        .gameover-dialog {
            background: #12121a;
            border: 2px solid #c8a84e;
            border-radius: 16px;
            padding: 40px;
            text-align: center;
            animation: fadeIn 0.3s ease;
        }
        .gameover-dialog h2 {
            font-size: 1.8rem;
            background: linear-gradient(135deg, #c8a84e, #f0d878);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 8px;
        }
        .gameover-dialog p { color: #888; margin-bottom: 24px; }

        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        /* Thinking indicator */
        #thinking {
            display: none;
            padding: 8px 20px;
            background: #1a1a2e;
            border-bottom: 1px solid #2a2a3a;
            font-size: 0.85rem;
            color: #c8a84e;
            text-align: center;
        }
        #thinking.active { display: block; }
        .spinner {
            display: inline-block;
            width: 12px;
            height: 12px;
            border: 2px solid #c8a84e;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
            vertical-align: middle;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* Mobile responsive */
        @media (max-width: 768px) {
            body {
                flex-direction: column;
            }
            #canvas-container {
                flex: 1;
                min-height: 50vh;
            }
            #side-panel {
                width: 100%;
                max-height: 50vh;
                border-left: none;
                border-top: 1px solid #2a2a3a;
                overflow-y: auto;
            }
            #game-header { order: 1; }
            #status-bar { order: 2; }
            #thinking { order: 3; }
            .player-info { order: 4; }
            #controls { order: 5; }
            #move-history-container { order: 6; }
            #game-header {
                padding: 6px 16px;
            }
            #game-header h1 {
                font-size: 0.9rem;
                letter-spacing: 1px;
            }
            #status-bar {
                padding: 6px 16px;
                font-size: 0.8rem;
                min-height: 32px;
            }
            .player-info {
                padding: 4px 16px;
                font-size: 0.85rem;
            }
            .captured-pieces {
                font-size: 0.9rem;
                min-height: 18px;
            }
            #move-history-container {
                max-height: 60px;
            }
            #move-history-header {
                padding: 6px 16px;
                font-size: 0.75rem;
            }
            #move-history {
                font-size: 0.7rem;
                padding: 4px 8px;
            }
            .move-row { padding: 2px 4px; }
            .move-num { width: 24px; margin-right: 6px; }
            .move-white, .move-black { width: 55px; }
            #controls {
                padding: 8px 16px;
                gap: 4px;
            }
            .control-row {
                gap: 4px;
            }
            .btn {
                padding: 10px 8px;
                font-size: 0.75rem;
                min-height: 40px;
            }
            .difficulty-select {
                min-height: 40px;
                font-size: 0.8rem;
                padding: 6px 10px;
            }
            .promotion-dialog {
                padding: 16px;
            }
            .promotion-btn {
                width: 52px;
                height: 52px;
                font-size: 1.6rem;
            }
            .gameover-dialog {
                padding: 24px;
            }
            .gameover-dialog h2 {
                font-size: 1.4rem;
            }
        }

        @media (max-width: 380px) {
            #canvas-container {
                min-height: 45vh;
            }
            #game-header {
                padding: 4px 12px;
            }
            #game-header h1 {
                font-size: 0.85rem;
            }
            #status-bar {
                padding: 4px 12px;
                font-size: 0.75rem;
                min-height: 28px;
            }
            .player-info {
                padding: 3px 12px;
                font-size: 0.8rem;
            }
            #move-history-container {
                max-height: 40px;
            }
            #controls {
                padding: 6px 12px;
            }
            .btn {
                padding: 8px 6px;
                font-size: 0.7rem;
                min-height: 36px;
            }
        }
