 * {
            box-sizing: border-box
        }
        
        html,
        body {
            height: -100%;
            margin: 0
        }
        
        body {
            font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial;
            background: #0b1220;
            color: #eef;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px
        }
        /* Layout: board on center, controls on right */
        
        .container {
            display: flex;
            gap: 20px;
            align-items: flex-start
        }
        
        .side {
            width: 260px;
            display: flex;
            flex-direction: column;
            gap: 12px
        }
        
        .panel {
            background: #0f1724;
            padding: 12px;
            border-radius: 10px;
            box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6)
        }
        
        .players {
            display: flex;
            flex-direction: column;
            gap: 10px
        }
        
        .player {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px;
            border-radius: 8px;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent)
        }
        
        .player .meta {
            display: flex;
            flex-direction: column
        }
        
        .label {
            font-size: 14px;
            opacity: 0.9
        }
        
        .big {
            font-size: 20px;
            font-weight: 700
        }
        
        .mult {
            font-size: 13px;
            color: #ffd36b
        }
        
        .controls {
            display: flex;
            flex-direction: column;
            gap: 8px
        }
        
        button {
            background: linear-gradient(180deg, #2b6cb0, #2c5282);
            border: none;
            padding: 10px 14px;
            border-radius: 8px;
            color: #fff;
            font-weight: 600;
            cursor: pointer
        }
        
        button.exit {
            background: linear-gradient(180deg, #c53030, #9b2c2c)
        }
        /* Board (2D) */
        
        .board-wrap {
            width: 640px;
            height: 640px
        }
        
        .board {
            width: 100%;
            height: 100%;
            display: grid;
            grid-template-columns: repeat(8, 1fr);
            grid-template-rows: repeat(8, 1fr);
            border-radius: 8px;
            overflow: hidden;
            border: 6px solid #0f1724;
            box-shadow: 0 18px 40px rgba(2, 6, 23, 0.6)
        }
        
        .square {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            user-select: none
        }
        
        .square.light {
            background: #f0d9b5
        }
        
        .square.dark {
            background: #b58863
        }
        
  .piece {
    font-size: 36px;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.piece.white {
    color: white;
}

.piece.black {
    color: black;
}



        .square.selected {
            outline: 4px solid rgba(60, 180, 75, 0.9)
        }
        
        .square.move::after {
            content: '';
            position: absolute;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.18)
        }
        
        .square.capture {
            outline: 4px solid rgba(200, 60, 60, 0.9)
        }
        
        .status {
            margin-top: 10px;
            text-align: center
        }
        
        .log {
            padding: 8px;
            border-radius: 8px;
            background: rgba(255, 255, 255, 0.03)
        }
        /* Modal */
        
        .overlay {
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.6);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 40
        }
        
        .modal {
            background: #0f1724;
            color: #e6eef8;
            padding: 18px;
            border-radius: 12px;
            width: 460px;
            max-width: 94%
        }
        
        .answers {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 12px
        }
   
        .answers button {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.06);
            padding: 8px;
            border-radius: 8px;
            color: #fff;
            text-align: left
        }
        
        @media (max-width:980px) {
            .container {
                flex-direction: column;
                align-items: center
            }
            .side {
                width: 92vw
            }
            .board-wrap {
                width: 92vw;
                height: 92vw
            }
        }
    
