*{margin:0;padding:0;box-sizing:border-box}body{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;overflow:hidden;background:#000}#chess-canvas{display:block;width:100vw;height:100vh}#hud{position:fixed;top:20px;left:20px;z-index:100;pointer-events:none;max-height:calc(100vh - 40px);overflow-y:auto}#hud::-webkit-scrollbar{width:6px}#hud::-webkit-scrollbar-track{background:#0003;border-radius:3px}#hud::-webkit-scrollbar-thumb{background:#ffffff4d;border-radius:3px}.hud-panel{background:linear-gradient(135deg,#141432f2,#1e143cf2);backdrop-filter:blur(20px);border-radius:16px;padding:24px;min-width:300px;max-width:340px;box-shadow:0 8px 32px #0009,0 0 0 1px #ffffff1a;pointer-events:auto;border:1px solid rgba(138,43,226,.3)}.hud-panel h1{color:#fff;font-size:26px;margin-bottom:20px;text-align:center;font-weight:700;background:linear-gradient(135deg,#667eea,#764ba2,#f093fb);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;display:flex;align-items:center;justify-content:center;gap:10px;text-shadow:0 2px 10px rgba(102,126,234,.5)}.title-icon{width:28px;height:28px;stroke:url(#titleGradient);filter:drop-shadow(0 0 8px rgba(102,126,234,.6))}.hud-panel h3{color:#fff;font-size:14px;margin-bottom:10px;font-weight:600;display:flex;align-items:center;gap:8px}.hud-panel h3 svg{width:18px;height:18px;stroke:#667eea}.mode-selector{display:flex;gap:10px;margin-bottom:16px}.mode-btn{flex:1;padding:12px 16px;background:linear-gradient(135deg,#ffffff0d,#ffffff05);color:#aaa;border:1px solid rgba(255,255,255,.15);border-radius:10px;cursor:pointer;font-size:13px;font-weight:600;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;gap:8px;position:relative;overflow:hidden}.mode-btn:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent);transition:left .5s}.mode-btn:hover:before{left:100%}.mode-btn svg{width:18px;height:18px;stroke-width:2}.mode-btn:hover{background:linear-gradient(135deg,#ffffff1a,#ffffff0d);border-color:#667eea80;transform:translateY(-2px);box-shadow:0 4px 12px #667eea4d}.mode-btn.active{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border-color:transparent;box-shadow:0 4px 20px #667eea80,inset 0 1px #fff3}.mode-btn.active svg{filter:drop-shadow(0 0 4px rgba(255,255,255,.5))}.difficulty-selector{display:flex;align-items:center;gap:10px;margin-bottom:18px;padding:12px 14px;background:linear-gradient(135deg,#ffd7001a,#ff8c000d);border-radius:10px;border:1px solid rgba(255,215,0,.2)}.difficulty-icon{width:20px;height:20px;stroke:gold;fill:none;filter:drop-shadow(0 0 6px rgba(255,215,0,.6))}.difficulty-selector label{color:gold;font-size:13px;font-weight:600;text-shadow:0 0 10px rgba(255,215,0,.5)}.difficulty-select{flex:1;padding:8px 12px;background:linear-gradient(135deg,#0006,#0009);color:#fff;border:1px solid rgba(255,215,0,.3);border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:all .3s ease}.difficulty-select:hover{background:linear-gradient(135deg,#00000080,#000000b3);border-color:gold;box-shadow:0 0 12px #ffd7004d}.difficulty-select:focus{outline:none;border-color:gold;box-shadow:0 0 0 3px #ffd70033}.difficulty-select option{background:#1a1a2e;color:#fff}.info{margin-bottom:18px}.info-item{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding:10px 14px;background:linear-gradient(135deg,#ffffff08,#ffffff03);border-radius:10px;border:1px solid rgba(255,255,255,.08)}.label{color:#aaa;font-size:13px;font-weight:500}.value{color:#fff;font-size:15px;font-weight:700;padding:6px 14px;border-radius:8px;background:linear-gradient(135deg,#667eea33,#764ba233);border:1px solid rgba(102,126,234,.3)}.value.white{background:linear-gradient(135deg,#fff3,#c8c8ff33);border-color:#ffffff4d}.value.black{background:linear-gradient(135deg,#0006,#32326466);border-color:#6464964d}.value.playing{color:#4caf50;text-shadow:0 0 10px rgba(76,175,80,.5)}.value.check{color:#ff9800;animation:pulse 1s infinite;text-shadow:0 0 10px rgba(255,152,0,.8)}.value.checkmate{color:#f44336;font-weight:700;text-shadow:0 0 10px rgba(244,67,54,.8)}.value.stalemate{color:#9e9e9e}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}.scores{margin-bottom:18px;padding:14px;background:linear-gradient(135deg,#ffffff0d,#ffffff05);border-radius:12px;border:1px solid rgba(255,255,255,.1)}.score-item{display:flex;align-items:center;gap:12px;margin-bottom:10px;padding:10px;background:linear-gradient(135deg,#0003,#0000001a);border-radius:10px;transition:all .3s ease}.score-item:last-child{margin-bottom:0}.score-item:hover{background:linear-gradient(135deg,#0000004d,#0003);transform:translate(4px)}.score-icon{font-size:24px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.5))}.score-label{color:#aaa;font-size:14px;font-weight:600;flex:1}.score-value{color:#fff;font-size:20px;font-weight:700;padding:6px 16px;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:10px;min-width:50px;text-align:center;box-shadow:0 4px 12px #667eea66,inset 0 1px #fff3}.button-group{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}.action-btn{width:100%;padding:14px 20px;color:#fff;border:none;border-radius:12px;font-size:15px;font-weight:700;cursor:pointer;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;gap:10px;position:relative;overflow:hidden}.action-btn svg{width:20px;height:20px;stroke-width:2.5}.action-btn:before{content:"";position:absolute;top:50%;left:50%;width:0;height:0;border-radius:50%;background:#ffffff4d;transform:translate(-50%,-50%);transition:width .6s,height .6s}.action-btn:hover:before{width:300px;height:300px}.action-btn.primary{background:linear-gradient(135deg,#f093fb,#f5576c);box-shadow:0 6px 20px #f5576c66,inset 0 1px #fff3}.action-btn.primary:hover{transform:translateY(-3px);box-shadow:0 8px 25px #f5576c99,inset 0 1px #ffffff4d}.action-btn.secondary{background:linear-gradient(135deg,#ffffff26,#ffffff0d);border:2px solid rgba(255,255,255,.2)}.action-btn.secondary:hover:not(:disabled){background:linear-gradient(135deg,#ffffff40,#ffffff26);border-color:#fff6;transform:translateY(-3px);box-shadow:0 6px 20px #fff3}.action-btn.secondary:disabled{opacity:.3;cursor:not-allowed;background:linear-gradient(135deg,#6464641a,#6464640d)}.action-btn:active:not(:disabled){transform:translateY(0)}.view-buttons{display:flex;gap:10px;margin-bottom:18px}.view-btn{flex:1;padding:10px 14px;background:linear-gradient(135deg,#ffffff14,#ffffff08);color:#fff;border:1px solid rgba(255,255,255,.15);border-radius:10px;cursor:pointer;font-size:12px;font-weight:600;transition:all .3s ease;display:flex;align-items:center;justify-content:center;gap:6px}.view-btn svg{width:16px;height:16px;stroke-width:2}.view-btn:hover{background:linear-gradient(135deg,#ffffff26,#ffffff14);border-color:#667eea80;transform:translateY(-2px);box-shadow:0 4px 12px #667eea4d}.move-history-container{margin-bottom:18px;padding:14px;background:linear-gradient(135deg,#ffffff08,#ffffff03);border-radius:12px;border:1px solid rgba(255,255,255,.08)}.move-history{max-height:200px;overflow-y:auto;padding:10px;background:linear-gradient(135deg,#0000004d,#0003);border-radius:8px;border:1px solid rgba(255,255,255,.05)}.move-history::-webkit-scrollbar{width:4px}.move-history::-webkit-scrollbar-track{background:#0003}.move-history::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#667eea,#764ba2);border-radius:2px}.move-pair{display:flex;gap:8px;margin-bottom:6px;padding:6px 8px;border-radius:6px;transition:all .2s ease}.move-pair:hover{background:linear-gradient(135deg,#667eea1a,#764ba21a)}.move-num{color:#888;font-size:12px;font-weight:700;min-width:28px}.move{font-size:13px;font-family:Courier New,monospace;font-weight:600;padding:3px 8px;border-radius:4px;min-width:55px;text-align:center}.white-move{color:#fff;background:linear-gradient(135deg,#ffffff26,#ffffff14);border:1px solid rgba(255,255,255,.2)}.black-move{color:#ddd;background:linear-gradient(135deg,#0006,#0000004d);border:1px solid rgba(100,100,150,.3)}.no-moves{color:#666;font-size:12px;text-align:center;padding:16px;font-style:italic}.controls-info{padding-top:18px;border-top:1px solid rgba(255,255,255,.1)}.controls-info p{color:#aaa;font-size:12px;line-height:1.8;margin-bottom:4px}.controls-info strong{color:#fff;display:block;margin-bottom:10px;font-size:13px;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
