.chess-piece{width:90%;aspect-ratio:1 / 1;object-fit:contain;cursor:pointer;user-select:none;position:relative;z-index:3;filter:drop-shadow(2px 2px 3px rgba(0,0,0,.4));will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden}.chess-piece:active{transform:scale(.95)}@media (max-width: 768px){.chess-piece{width:85%}}@media (max-width: 480px){.chess-piece{width:80%}}@media (hover: hover){.chess-piece:hover{transform:scale(1.08)}}.chess-board-container{display:flex;justify-content:center;align-items:center;padding:1rem;max-width:100%}.chess-board{position:relative;width:min(90vw,90vh,600px);aspect-ratio:9/12;background:url(/board.svg) center center / contain no-repeat;border:4px solid #8b4513;border-radius:8px;box-shadow:0 10px 30px #0000004d;overflow:hidden;touch-action:manipulation}.chess-square{position:absolute;display:flex;justify-content:center;align-items:center;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;background:transparent!important;border:none;outline:none;box-shadow:none!important}.chess-square:hover,.chess-square:active,.chess-square.selected,.chess-square.valid-move{background:transparent!important;box-shadow:none!important}.chess-square.selected .chess-piece{filter:drop-shadow(0 0 8px gold) drop-shadow(0 0 12px rgba(255,215,0,.8))}.move-indicator{width:30%;height:30%;border-radius:50%;background:rgba(0,128,0,.6);position:absolute;z-index:2;pointer-events:none}@media (max-width: 768px){.chess-board-container{padding:.5rem}.chess-board{width:min(95vw,95vh,500px);border-width:3px}}@media (max-width: 480px){.chess-board{width:min(98vw,98vh,400px);border-width:2px}.move-indicator{width:25%;height:25%}}.game-controls{display:flex;flex-direction:column;gap:1rem;padding:1rem;background:rgba(255,255,255,.1);backdrop-filter:blur(10px);border-radius:12px;border:1px solid rgba(255,255,255,.2);max-width:400px;width:100%}.game-info{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.5rem}.status-message{font-size:1.1rem;font-weight:700;color:#fff;text-shadow:1px 1px 2px rgba(0,0,0,.5)}.move-count{font-size:.9rem;color:#fffc;background:rgba(0,0,0,.3);padding:.3rem .6rem;border-radius:20px}.mode-selector{display:flex;gap:.5rem;justify-content:center}.mode-btn{flex:1;padding:.8rem 1rem;border:none;border-radius:8px;background:rgba(255,255,255,.2);color:#fff;font-size:.9rem;font-weight:700;cursor:pointer;transition:all .3s ease;backdrop-filter:blur(10px)}.mode-btn:hover{background:rgba(255,255,255,.3);transform:translateY(-2px)}.mode-btn.active{background:rgba(255,215,0,.6);color:#000;box-shadow:0 4px 8px #ffd7004d}.theme-selector{display:flex;align-items:center;gap:.5rem;justify-content:center;flex-wrap:wrap}.theme-label{font-size:.85rem;color:#fffc}.theme-btn{padding:.5rem 1rem;border:none;border-radius:20px;background:rgba(255,255,255,.2);color:#fff;font-size:.8rem;font-weight:700;cursor:pointer;transition:all .3s ease}.theme-btn:hover{background:rgba(255,255,255,.3);transform:translateY(-2px)}.theme-btn.active{background:linear-gradient(145deg,#a29bfe,#6c5ce7);box-shadow:0 4px 8px #6c5ce74d}.ai-level-selector{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:.5rem;background:rgba(0,0,0,.2);border-radius:8px}.ai-level-label{font-size:.85rem;color:#ffffffe6;font-weight:700}.ai-level-slider{width:100%;max-width:200px;height:6px;-webkit-appearance:none;appearance:none;background:rgba(255,255,255,.2);border-radius:3px;outline:none;cursor:pointer}.ai-level-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:linear-gradient(145deg,#74b9ff,#0984e3);cursor:pointer;box-shadow:0 2px 6px #0000004d;transition:transform .2s ease}.ai-level-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.ai-level-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:linear-gradient(145deg,#74b9ff,#0984e3);cursor:pointer;border:none;box-shadow:0 2px 6px #0000004d}.ai-level-marks{display:flex;justify-content:space-between;width:100%;max-width:200px;font-size:.7rem;color:#fff9}.action-buttons{display:flex;gap:.5rem;justify-content:center}.action-btn{flex:1;padding:.8rem 1rem;border:none;border-radius:8px;font-size:.9rem;font-weight:700;cursor:pointer;transition:all .3s ease;min-height:44px}.undo-btn{background:linear-gradient(145deg,#ff7676,#ff5252);color:#fff}.undo-btn:hover:not(:disabled){background:linear-gradient(145deg,#ff5252,#ff3838);transform:translateY(-2px)}.undo-btn:disabled{background:rgba(255,255,255,.1);color:#ffffff80;cursor:not-allowed;transform:none}.restart-btn{background:linear-gradient(145deg,#74b9ff,#0984e3);color:#fff}.restart-btn:hover{background:linear-gradient(145deg,#0984e3,#0770c4);transform:translateY(-2px)}@media (max-width: 768px){.game-controls{padding:.8rem;gap:.8rem;max-width:350px}.status-message{font-size:1rem}.move-count{font-size:.8rem;padding:.2rem .5rem}.mode-btn,.action-btn{padding:.7rem .8rem;font-size:.85rem;min-height:40px}.game-info{flex-direction:column;text-align:center}}@media (max-width: 480px){.game-controls{padding:.6rem;gap:.6rem;max-width:300px}.status-message{font-size:.9rem}.move-count{font-size:.75rem}.mode-btn,.action-btn{padding:.6rem .7rem;font-size:.8rem;min-height:36px}.mode-selector,.action-buttons{flex-direction:column}}@media (hover: none) and (pointer: coarse){.mode-btn:hover,.action-btn:hover{transform:none}.mode-btn:active,.action-btn:active{transform:scale(.98)}}.game-status{display:flex;justify-content:center;align-items:center;padding:1rem;border-radius:12px;background:rgba(255,255,255,.1);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.2);max-width:400px;width:100%;min-height:80px}.status-content{display:flex;flex-direction:column;align-items:center;gap:.5rem;text-align:center}.status-icon{font-size:2rem;filter:drop-shadow(2px 2px 4px rgba(0,0,0,.3))}.status-text{font-size:1.2rem;font-weight:700;color:#fff;text-shadow:1px 1px 2px rgba(0,0,0,.5)}.status-subtext{font-size:.9rem;color:#fffc}.player-indicator{display:flex;align-items:center;gap:.8rem;padding:.8rem 1.2rem;border-radius:25px;background:rgba(255,255,255,.15);backdrop-filter:blur(10px)}.player-indicator.red{border:2px solid rgba(255,82,82,.6);box-shadow:0 4px 12px #ff52524d}.player-indicator.black{border:2px solid rgba(45,52,54,.6);box-shadow:0 4px 12px #2d34364d}.player-color{width:20px;height:20px;border-radius:50%;border:2px solid white}.player-indicator.red .player-color{background:linear-gradient(145deg,#ff6b6b,#ff5252)}.player-indicator.black .player-color{background:linear-gradient(145deg,#2d3436,#1e272e)}.player-text{font-size:1.1rem;font-weight:700;color:#fff;text-shadow:1px 1px 2px rgba(0,0,0,.5)}.thinking-dots{display:flex;gap:4px;margin-top:.5rem}.thinking-dots span{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.6);animation:thinking 1.4s ease-in-out infinite both}.thinking-dots span:nth-child(1){animation-delay:-.32s}.thinking-dots span:nth-child(2){animation-delay:-.16s}@keyframes thinking{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1.2);opacity:1}}.game-status.waiting{background:rgba(116,185,255,.2);border-color:#74b9ff66}.game-status.checkmate{background:rgba(255,107,107,.2);border-color:#ff6b6b66;animation:pulse 2s ease-in-out infinite}.game-status.draw{background:rgba(255,206,86,.2);border-color:#ffce5666}.game-status.in-check{background:rgba(255,82,82,.3);border-color:#ff525299;animation:check-pulse 1s ease-in-out infinite}@keyframes check-pulse{0%,to{transform:scale(1);box-shadow:0 0 #ff525266}50%{transform:scale(1.02);box-shadow:0 0 20px 5px #ff52524d}}@keyframes pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@media (max-width: 768px){.game-status{padding:.8rem;min-height:70px;max-width:350px}.status-icon{font-size:1.8rem}.status-text{font-size:1.1rem}.player-indicator{padding:.6rem 1rem;gap:.6rem}.player-text{font-size:1rem}.player-color{width:18px;height:18px}}@media (max-width: 480px){.game-status{padding:.6rem;min-height:60px;max-width:300px}.status-icon{font-size:1.6rem}.status-text{font-size:1rem}.status-subtext{font-size:.8rem}.player-indicator{padding:.5rem .8rem;gap:.5rem}.player-text{font-size:.9rem}.player-color{width:16px;height:16px}.thinking-dots span{width:6px;height:6px}}.app{min-height:100vh;display:flex;flex-direction:column;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:#fff}.app-header{text-align:center;padding:1rem;background:rgba(0,0,0,.2);backdrop-filter:blur(10px)}.app-header h1{font-size:2.5rem;margin-bottom:.5rem;text-shadow:2px 2px 4px rgba(0,0,0,.3)}.app-header p{font-size:1.2rem;opacity:.9}.app-main{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1rem;gap:1.5rem}.app-footer{text-align:center;padding:1rem;background:rgba(0,0,0,.2);backdrop-filter:blur(10px);font-size:.9rem;opacity:.8}@media (max-width: 768px){.app-header h1{font-size:2rem}.app-header p{font-size:1rem}.app-main{padding:.5rem;gap:1rem}}@media (max-width: 480px){.app-header h1{font-size:1.8rem}.app-header p{font-size:.9rem}.app-main{padding:.25rem}}*{margin:0;padding:0;box-sizing:border-box}html{font-size:16px;-webkit-text-size-adjust:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);min-height:100vh;overflow-x:hidden}#root{min-height:100vh;display:flex;flex-direction:column}button{border:none;outline:none;cursor:pointer;font-family:inherit;-webkit-tap-highlight-color:transparent}input,textarea{font-family:inherit}@media (max-width: 768px){html{font-size:14px}}@media (max-width: 480px){html{font-size:12px}}
