:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.chess-container{display:flex;flex-direction:column;align-items:center;padding:2rem;min-height:100vh;background:linear-gradient(135deg,#1a1a2e,#16213e,#0f3460);position:relative;overflow:hidden}.chess-container:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background-image:radial-gradient(circle at 20% 80%,rgba(120,119,198,.3) 0%,transparent 50%),radial-gradient(circle at 80% 20%,rgba(255,119,198,.2) 0%,transparent 50%);pointer-events:none}.chess-container h1{color:#fff;margin-bottom:1rem;text-shadow:2px 2px 4px rgba(0,0,0,.5);font-size:2.5rem;letter-spacing:2px;animation:titleGlow 2s ease-in-out infinite alternate;z-index:1}@keyframes titleGlow{0%{text-shadow:2px 2px 4px rgba(0,0,0,.5),0 0 10px rgba(255,255,255,.3)}to{text-shadow:2px 2px 4px rgba(0,0,0,.5),0 0 20px rgba(255,255,255,.6)}}.game-info{display:flex;align-items:center;gap:1.5rem;margin-bottom:2rem;background:#fffffff2;padding:1rem 2rem;border-radius:15px;box-shadow:0 8px 32px #0003;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);z-index:1}.game-info p{margin:0;font-size:1.2rem;font-weight:600}.turn-info{display:flex;flex-direction:column;align-items:flex-start;gap:.3rem}.move-counter{font-size:.9rem!important;color:#666;font-weight:500!important}.reset-button{padding:.6rem 1.5rem;font-size:1rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:25px;cursor:pointer;transition:all .3s ease;font-weight:600;box-shadow:0 4px 15px #667eea66}.reset-button:hover{transform:translateY(-2px);box-shadow:0 6px 20px #667eea99}.game-area{display:flex;align-items:center;gap:1.5rem;z-index:1}.captured-panel{background:#ffffff1a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:15px;padding:1rem;min-width:100px;min-height:300px;display:flex;flex-direction:column;border:1px solid rgba(255,255,255,.2)}.captured-panel h3{color:#fff;font-size:.9rem;margin:0 0 .8rem;text-align:center;padding-bottom:.5rem;border-bottom:1px solid rgba(255,255,255,.2)}.captured-pieces{display:flex;flex-wrap:wrap;gap:.3rem;flex:1;align-content:flex-start}.captured-piece{font-size:24px;filter:drop-shadow(1px 1px 2px rgba(0,0,0,.5));animation:capturedBounce .5s ease-out}@keyframes capturedBounce{0%{transform:scale(0) rotate(-180deg);opacity:0}50%{transform:scale(1.3) rotate(0)}to{transform:scale(1) rotate(0);opacity:1}}.captured-score{color:#4caf50;font-weight:700;text-align:center;padding-top:.5rem;border-top:1px solid rgba(255,255,255,.2);margin-top:auto}.check-warning{color:#d32f2f;font-weight:700;margin-left:.5rem;animation:blink 1s infinite}@keyframes blink{0%,to{opacity:1}50%{opacity:.5}}.game-info span.white{color:#333;font-weight:700}.game-info span.black{color:#000;font-weight:700}.game-over-message{color:#e91e63;font-weight:700;animation:winnerPulse 1s ease-in-out infinite}@keyframes winnerPulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}.chess-board{border:6px solid #5d4037;border-radius:12px;box-shadow:0 20px 60px #00000080,inset 0 0 20px #0003;background:linear-gradient(135deg,#8b4513,#5d4037);padding:6px;position:relative}.chess-board:before{content:"";position:absolute;top:-3px;left:-3px;right:-3px;bottom:-3px;background:linear-gradient(45deg,#ff6b6b,#ffd93d,#6bcf7f,#4ecdc4,#a8e6cf);border-radius:14px;z-index:-1;opacity:.5;filter:blur(10px);animation:boardGlow 3s ease-in-out infinite alternate}@keyframes boardGlow{0%{opacity:.3}to{opacity:.6}}.chess-row{display:flex}.chess-square{width:65px;height:65px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease;position:relative}.chess-square.light{background-color:#f0d9b5}.chess-square.dark{background-color:#b58863}.chess-square:hover{filter:brightness(1.1)}.chess-square:hover .piece{transform:scale(1.15);filter:drop-shadow(3px 3px 4px rgba(0,0,0,.4))}.chess-square.selected{background:linear-gradient(135deg,#f7f769,gold);box-shadow:inset 0 0 15px #ffd70080}.chess-square.selected .piece{animation:selectedPiece .8s ease-in-out infinite}@keyframes selectedPiece{0%,to{transform:scale(1.1)}50%{transform:scale(1.2)}}.chess-square.last-move-from{background-color:#ffeb3b66!important}.chess-square.last-move-to{background-color:#ffeb3b99!important;box-shadow:inset 0 0 10px #ffeb3bcc}.chess-square.promotion{background-color:#ffeb3b;box-shadow:inset 0 0 15px #ff980080;animation:pulse 1.5s ease-in-out infinite}.chess-square.safe-move,.chess-square.unsafe-move{position:relative}.move-indicator{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:20px;height:20px;border-radius:50%;pointer-events:none;z-index:1}.move-indicator.safe{background-color:#4caf5099}.move-indicator.unsafe{background-color:#ff9800b3;animation:dangerPulse .8s ease-in-out infinite}@keyframes dangerPulse{0%,to{transform:translate(-50%,-50%) scale(1);background-color:#ff9800b3}50%{transform:translate(-50%,-50%) scale(1.2);background-color:#ff5722e6}}.chess-square.safe-move:hover .move-indicator.safe{background-color:#4caf50cc;width:25px;height:25px}.chess-square.unsafe-move:hover .move-indicator.unsafe{background-color:#ff5722;width:25px;height:25px}.chess-square.unsafe-move.capture-move{box-shadow:inset 0 0 0 4px #ff9800b3}.chess-square.unsafe-move.capture-move:hover{box-shadow:inset 0 0 0 5px #ff5722e6;background-color:#ff98004d}.chess-square.capture-move{box-shadow:inset 0 0 0 4px #ff000080}.chess-square.capture-move:hover{box-shadow:inset 0 0 0 5px #ff0000b3;background-color:#f003}.chess-square.king-in-check{background-color:#f006!important;box-shadow:inset 0 0 0 4px #f00c;animation:checkPulse 1s ease-in-out infinite}@keyframes checkPulse{0%,to{box-shadow:inset 0 0 0 4px #f00c}50%{box-shadow:inset 0 0 0 6px red}}@keyframes pulse{0%,to{box-shadow:inset 0 0 15px #ff980080}50%{box-shadow:inset 0 0 20px #ff9800cc}}.piece{font-size:48px;-webkit-user-select:none;user-select:none;line-height:1;filter:drop-shadow(2px 2px 3px rgba(0,0,0,.4));transition:all .2s ease;cursor:grab}.piece:active{cursor:grabbing}.piece.white{color:#fff;text-shadow:1px 1px 2px rgba(0,0,0,.6),0 0 10px rgba(255,255,255,.3)}.piece.black{color:#1a1a1a;text-shadow:1px 1px 2px rgba(255,255,255,.4),0 0 10px rgba(0,0,0,.3)}.confetti-container{position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:9999;overflow:hidden}.confetti-piece{position:absolute;border-radius:2px;animation:confettiFall linear forwards}@keyframes confettiFall{0%{transform:translateY(-100vh) rotate(0);opacity:1}to{transform:translateY(100vh) rotate(720deg);opacity:0}}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000;animation:fadeIn .3s ease-in}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.modal{background:linear-gradient(135deg,#fff,#f5f5f5);padding:2rem;border-radius:20px;box-shadow:0 20px 60px #0006;text-align:center;min-width:320px;animation:modalPopIn .4s cubic-bezier(.175,.885,.32,1.275);border:2px solid rgba(255,255,255,.3)}@keyframes modalPopIn{0%{transform:scale(.5) rotate(-10deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}.modal h2{margin-top:0;color:#333;font-size:2rem}.victory-modal{background:linear-gradient(135deg,#1a1a2e,#16213e);color:#fff;min-width:380px}.victory-modal h2{color:gold;font-size:2.5rem;text-shadow:0 0 20px rgba(255,215,0,.5)}.trophy-icon{font-size:80px;animation:trophyBounce 1s ease-in-out infinite}@keyframes trophyBounce{0%,to{transform:scale(1) rotate(0)}25%{transform:scale(1.1) rotate(-5deg)}75%{transform:scale(1.1) rotate(5deg)}}.winner-name{display:inline-block;font-size:1.5rem;padding:.3rem 1rem;border-radius:20px;margin-bottom:.5rem}.winner-name.white{background:linear-gradient(135deg,#f5f5f5,#e0e0e0);color:#333}.winner-name.black{background:linear-gradient(135deg,#333,#1a1a1a);color:#fff}.winner-message{font-size:1.2rem;margin:1rem 0;font-weight:500;color:#ffffffe6;line-height:1.8}.game-stats{display:flex;justify-content:center;gap:1.5rem;margin:1.5rem 0;padding:1rem;background:#ffffff1a;border-radius:10px}.stat{display:flex;flex-direction:column;align-items:center;gap:.3rem}.stat-label{font-size:.8rem;color:#ffffffb3}.stat-value{font-size:1.3rem;font-weight:700;color:#4caf50}.new-game-button{padding:1rem 2.5rem;font-size:1.2rem;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;border-radius:30px;cursor:pointer;transition:all .3s ease;font-weight:600;box-shadow:0 5px 20px #667eea66}.new-game-button:hover{transform:translateY(-3px);box-shadow:0 8px 30px #667eea99}.promotion-modal{min-width:400px}.promotion-modal p{margin:1rem 0;font-size:1.1rem;color:#666}.promotion-options{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-top:1.5rem}.promotion-button{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:1.5rem;background:linear-gradient(135deg,#f5f5f5,#e0e0e0);border:2px solid #ddd;border-radius:10px;cursor:pointer;transition:all .3s}.promotion-button:hover{background:linear-gradient(135deg,#e3f2fd,#bbdefb);border-color:#2196f3;transform:translateY(-3px);box-shadow:0 5px 15px #2196f34d}.promotion-button .piece{font-size:50px}.promotion-label{font-size:.9rem;font-weight:600;color:#333}@media (max-width: 900px){.game-area{flex-direction:column}.captured-panel{flex-direction:row;min-height:auto;min-width:200px;gap:1rem;align-items:center}.captured-panel h3{margin:0;padding:0;border:none;white-space:nowrap}.captured-pieces{flex:1}.captured-score{margin:0;padding:0;border:none}}@media (max-width: 600px){.chess-square{width:42px;height:42px}.piece{font-size:32px}.chess-container h1{font-size:1.5rem}.game-info{flex-direction:column;padding:1rem;gap:.8rem}.turn-info{align-items:center}.captured-panel{padding:.8rem;min-width:150px}.captured-piece{font-size:18px}.modal{min-width:280px;padding:1.5rem}.victory-modal{min-width:280px}.trophy-icon{font-size:60px}.game-stats{gap:1rem;padding:.8rem}.stat-value{font-size:1.1rem}.promotion-modal{min-width:280px}.promotion-options{grid-template-columns:repeat(2,1fr);gap:.8rem}.promotion-button{padding:1rem}.promotion-button .piece{font-size:35px}}.coin-toss-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.coin-toss-modal{background:linear-gradient(145deg,#2a2a4a,#1a1a2e);border-radius:24px;padding:2.5rem;min-width:400px;max-width:500px;box-shadow:0 25px 50px #00000080,0 0 100px #7877c64d;border:2px solid rgba(255,255,255,.1);text-align:center;animation:modalAppear .5s cubic-bezier(.34,1.56,.64,1)}@keyframes modalAppear{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}.coin-toss-modal h2{color:#fff;font-size:2rem;margin-bottom:.5rem;text-shadow:0 0 20px rgba(255,215,0,.5)}.coin-toss-subtitle{color:#ffffffb3;font-size:1rem;margin-bottom:2rem}.player-input-phase{display:flex;flex-direction:column;gap:1.5rem}.player-input-group{display:flex;flex-direction:column;gap:.5rem;text-align:left}.player-input-group label{color:#fff;font-size:1.1rem;font-weight:600}.player-input-group input{padding:.8rem 1rem;border-radius:12px;border:2px solid rgba(255,255,255,.2);background:#ffffff1a;color:#fff;font-size:1rem;transition:all .3s ease}.player-input-group input:focus{outline:none;border-color:#7877c6;background:#ffffff26;box-shadow:0 0 20px #7877c64d}.player-input-group input::placeholder{color:#fff6}.next-button{padding:1rem 2rem;border-radius:12px;border:none;background:linear-gradient(135deg,#7877c6,#5a59a0);color:#fff;font-size:1.1rem;font-weight:600;cursor:pointer;transition:all .3s ease;margin-top:1rem}.next-button:hover{transform:translateY(-2px);box-shadow:0 10px 30px #7877c666}.choose-side-phase{display:flex;flex-direction:column;gap:1.5rem}.chooser-name{color:gold;font-size:1.2rem;font-weight:600;animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.7}}.coin-preview{display:flex;justify-content:center;margin:1rem 0}.coin-static{width:120px;height:120px;border-radius:50%;background:linear-gradient(145deg,gold,#b8860b,gold);display:flex;align-items:center;justify-content:center;box-shadow:0 10px 40px #ffd7004d,inset 0 5px 15px #ffffff80,inset 0 -5px 15px #0000004d;animation:coinIdle 3s ease-in-out infinite}@keyframes coinIdle{0%,to{transform:rotateY(0)}50%{transform:rotateY(15deg)}}.coin-static .coin-face{font-size:60px;text-shadow:0 2px 5px rgba(0,0,0,.3)}.side-buttons{display:flex;gap:1rem;justify-content:center}.side-button{flex:1;padding:1.2rem 1.5rem;border-radius:16px;border:3px solid transparent;font-size:1rem;font-weight:700;cursor:pointer;transition:all .3s ease;text-transform:uppercase;letter-spacing:1px;white-space:nowrap}.side-button.heads{background:linear-gradient(145deg,gold,#ff8c00);color:#1a1a2e}.side-button.heads:hover{transform:translateY(-3px) scale(1.02);box-shadow:0 15px 40px #ffd70066;border-color:#fff}.side-button.tails{background:linear-gradient(145deg,#6366f1,#8b5cf6);color:#fff}.side-button.tails:hover{transform:translateY(-3px) scale(1.02);box-shadow:0 15px 40px #8b5cf666;border-color:#fff}.flipping-phase{display:flex;flex-direction:column;align-items:center;gap:2rem}.flipping-phase p{color:#fff;font-size:1.3rem;animation:pulse .8s ease-in-out infinite}.coin-container{perspective:1000px;width:150px;height:150px}.coin{width:100%;height:100%;position:relative;transform-style:preserve-3d;transition:transform .1s}.coin.flipping{animation:coinFlip 2.5s cubic-bezier(.35,0,.25,1)}@keyframes coinFlip{0%{transform:translateY(0) rotateX(0)}15%{transform:translateY(-200px) rotateX(540deg)}30%{transform:translateY(-350px) rotateX(1080deg)}50%{transform:translateY(-400px) rotateX(1800deg)}70%{transform:translateY(-250px) rotateX(2520deg)}85%{transform:translateY(-100px) rotateX(3060deg)}to{transform:translateY(0) rotateX(3600deg)}}.coin-face{position:absolute;width:100%;height:100%;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:70px;backface-visibility:hidden;box-shadow:0 10px 40px #0000004d,inset 0 5px 20px #ffffff80,inset 0 -5px 20px #0000004d}.coin-face.heads{background:linear-gradient(145deg,gold,#daa520,gold)}.coin-face.tails{background:linear-gradient(145deg,#8b5cf6,#6366f1,#8b5cf6);transform:rotateX(180deg)}.coin.result-heads{transform:rotateX(0)}.coin.result-tails{transform:rotateX(180deg)}.result-phase{display:flex;flex-direction:column;align-items:center;gap:1.5rem}.result-text{text-align:center}.result-side{font-size:1.8rem;font-weight:700;color:gold;margin-bottom:.5rem;animation:resultReveal .5s ease-out}@keyframes resultReveal{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}.winner-announcement{color:#fff;font-size:1.2rem}.winner-name{color:#4ade80;font-weight:700;font-size:1.4rem}.player-colors{display:flex;align-items:center;gap:1.5rem;margin:1rem 0;padding:1rem 1.5rem;background:#ffffff1a;border-radius:16px}.player-color{display:flex;align-items:center;gap:.5rem;font-size:1.1rem;font-weight:600}.player-color.white-player{color:#f0f0f0}.player-color.black-player{color:#9ca3af}.color-indicator{font-size:1.5rem}.vs-badge{color:#ffffff80;font-weight:700;font-size:.9rem}.start-game-button{padding:1.2rem 3rem;border-radius:16px;border:none;background:linear-gradient(135deg,#4ade80,#22c55e);color:#fff;font-size:1.3rem;font-weight:700;cursor:pointer;transition:all .3s ease;text-transform:uppercase;letter-spacing:2px;margin-top:.5rem}.start-game-button:hover{transform:translateY(-3px) scale(1.05);box-shadow:0 15px 40px #4ade8066}.players-display{display:flex;align-items:center;gap:1rem;margin-bottom:1rem;z-index:1}.player-badge{padding:.6rem 1.2rem;border-radius:30px;font-weight:600;font-size:1rem;transition:all .3s ease;border:3px solid transparent}.player-badge.white{background:linear-gradient(135deg,#f8f8f8,#e0e0e0);color:#333}.player-badge.black{background:linear-gradient(135deg,#4a4a4a,#2a2a2a);color:#fff}.player-badge.active{transform:scale(1.1);box-shadow:0 5px 20px #ffd70080;border-color:gold;animation:activePulse 1s ease-in-out infinite}@keyframes activePulse{0%,to{box-shadow:0 5px 20px #ffd70080}50%{box-shadow:0 5px 30px #ffd700cc}}.vs-badge{color:#fff9;font-weight:700;font-size:.9rem;text-shadow:0 2px 4px rgba(0,0,0,.5)}@media (max-width: 600px){.coin-toss-modal{min-width:90%;padding:1.5rem}.coin-toss-modal h2{font-size:1.5rem}.side-buttons{flex-direction:column}.coin-container{width:120px;height:120px}.coin-face{font-size:50px}.player-colors,.players-display{flex-direction:column;gap:.5rem}.player-badge{font-size:.9rem;padding:.5rem 1rem}}
