* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #1a1a2e; color: #eee; display: flex; justify-content: center; min-height: 100vh; }
#app { display: flex; flex-direction: column; align-items: center; padding: 20px; gap: 16px; }
#header { text-align: center; }
h1 { font-size: 28px; color: #e0e0e0; }
#turn-indicator { font-size: 18px; margin-top: 4px; padding: 6px 20px; border-radius: 20px; background: #16213e; display: inline-block; }
#turn-indicator.black { background: #333; }
#game-area { display: flex; align-items: center; gap: 16px; }
.captured { width: 48px; min-height: 400px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 24px; }
#board-container { position: relative; }
#board { display: grid; grid-template-columns: repeat(8, 70px); grid-template-rows: repeat(8, 70px); border: 3px solid #0f3460; border-radius: 4px; overflow: hidden; }
.square { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; font-size: 46px; cursor: pointer; position: relative; user-select: none; transition: background 0.1s; }
.square.light { background: #e8dcc8; }
.square.dark { background: #7b6b4f; }
.square.selected { background: #f6e58d !important; }
.square.legal { cursor: pointer; }
.square.legal::after { content: ''; position: absolute; width: 20px; height: 20px; background: rgba(0,0,0,0.25); border-radius: 50%; pointer-events: none; }
.square.legal.has-piece::after { width: 100%; height: 100%; border-radius: 0; background: rgba(0,0,0,0.15); border: 4px solid rgba(0,0,0,0.3); box-sizing: border-box; }
.square.check { box-shadow: inset 0 0 20px 6px rgba(255,0,0,0.6); }
.square.last-from, .square.last-to { background: rgba(155,199,0,0.45) !important; }
.square .piece { pointer-events: none; line-height: 1; }
#status { font-size: 20px; font-weight: bold; min-height: 28px; color: #f6e58d; }
#reset-btn { padding: 10px 28px; font-size: 16px; border: none; border-radius: 8px; background: #0f3460; color: #eee; cursor: pointer; transition: background 0.2s; }
#reset-btn:hover { background: #1a5276; }
@media (max-width: 620px) {
  #board { grid-template-columns: repeat(8, 50px); grid-template-rows: repeat(8, 50px); }
  .square { width: 50px; height: 50px; font-size: 32px; }
  .captured { width: 32px; font-size: 18px; }
}
