html{scroll-behavior:auto!important}body,html{overflow-anchor:none!important}:focus{scroll-margin:0!important}:root{--square-light:#f0d9b5;--square-light-accent:#f5e6c8;--square-dark:#b58863;--square-dark-accent:#986f4a;--square-light-gradient-start:#f7e4c7;--square-light-gradient-end:#e8d4a8;--square-dark-gradient-start:#c9956c;--square-dark-gradient-end:#9a6b4a;--square-selected:rgba(186,202,68,0.7);--square-selected-dark:rgba(130,151,35,0.7);--square-last-move-light:rgba(205,210,106,0.55);--square-last-move-dark:rgba(170,162,58,0.55);--valid-move-dot:rgba(20,85,30,0.35);--valid-capture-ring:rgba(220,38,38,0.6);--check-highlight:rgba(255,0,0,0.5);--board-frame-color:#5c3d2e;--board-frame-gradient:linear-gradient(145deg,#6b4423,#3d2415);--board-shadow:0 25px 50px -12px rgba(0,0,0,0.35),0 12px 24px -8px rgba(0,0,0,0.25),inset 0 -2px 4px rgba(0,0,0,0.2);--piece-shadow:drop-shadow(2px 4px 6px rgba(0,0,0,0.35));--piece-hover-shadow:drop-shadow(3px 6px 10px rgba(0,0,0,0.45));--piece-hover-glow:drop-shadow(0 0 12px rgba(59,130,246,0.5));--progress-width:0%;--progress-width-opening:0%;--progress-width-tactical:0%;--progress-width-positional:0%;--progress-width-endgame:0%;--progress-width-aggressiveness:0%;--progress-width-defensiveness:0%;--progress-width-opening-preparation:0%;--progress-width-tactical-awareness:0%;--progress-width-positional-understanding:0%;--chatbox-max-height:15rem}.dark{--square-light:#eeeed2;--square-light-accent:#f5f5dc;--square-dark:#769656;--square-dark-accent:#5d7a3d;--square-light-gradient-start:#f5f5e1;--square-light-gradient-end:#e5e5c3;--square-dark-gradient-start:#8aab5e;--square-dark-gradient-end:#638b46;--board-frame-color:#2d3436;--board-frame-gradient:linear-gradient(145deg,#3d4446,#1a1e1f)}.chess-board-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px))}.chess-board{display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);width:100%;max-width:min(80vh,90vw,600px);max-width:min(80dvh,90vw,600px);aspect-ratio:1/1;border:4px solid var(--board-frame-color);border-radius:4px;background:var(--board-frame-gradient);box-shadow:var(--board-shadow);transform:translateZ(0);backface-visibility:hidden;margin:0 auto;position:relative}.chess-board:before{content:"";position:absolute;inset:-4px;border-radius:6px;background:linear-gradient(135deg,rgba(255,255,255,.1),transparent 50%,rgba(0,0,0,.2));pointer-events:none;z-index:10}.chess-square{display:flex;justify-content:center;align-items:center;position:relative;transition:all .2s cubic-bezier(.4,0,.2,1);overflow:hidden}.chess-square.light-square{background:linear-gradient(135deg,var(--square-light-gradient-start) 0,var(--square-light-gradient-end) 100%);background-image:linear-gradient(135deg,var(--square-light-gradient-start) 0,var(--square-light-gradient-end) 100%),repeating-linear-gradient(90deg,transparent,transparent 2px,rgba(0,0,0,.015) 2px,rgba(0,0,0,.015) 4px)}.chess-square.dark-square{background:linear-gradient(135deg,var(--square-dark-gradient-start) 0,var(--square-dark-gradient-end) 100%);background-image:linear-gradient(135deg,var(--square-dark-gradient-start) 0,var(--square-dark-gradient-end) 100%),repeating-linear-gradient(90deg,transparent,transparent 2px,rgba(0,0,0,.03) 2px,rgba(0,0,0,.03) 4px)}.chess-square.selected{background:var(--square-selected)!important;box-shadow:inset 0 0 0 3px rgba(186,202,68,.9)}.chess-square.dark-square.selected{background:var(--square-selected-dark)!important}.chess-square.last-move{background-color:var(--square-last-move-light)}.chess-square.dark-square.last-move{background-color:var(--square-last-move-dark)}.chess-square.in-check{background:radial-gradient(ellipse at center,var(--check-highlight) 0,var(--check-highlight) 25%,transparent 90%)!important;animation:checkPulse 1s ease-in-out infinite}@keyframes checkPulse{0%,to{box-shadow:inset 0 0 20px rgba(255,0,0,.4)}50%{box-shadow:inset 0 0 30px rgba(255,0,0,.6)}}.chess-square.valid-move:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:28%;height:28%;border-radius:50%;background:var(--valid-move-dot);box-shadow:0 2px 8px rgba(0,0,0,.15);z-index:1;pointer-events:none;transition:all .15s ease}.chess-square.valid-move:hover:before{width:34%;height:34%;background:rgba(20,85,30,.5)}.chess-square.valid-capture:before{content:"";position:absolute;top:6%;left:6%;right:6%;bottom:6%;border:5px solid var(--valid-capture-ring);border-radius:50%;z-index:1;pointer-events:none;box-shadow:inset 0 0 10px rgba(220,38,38,.2),0 0 8px rgba(220,38,38,.15);transition:all .15s ease}.chess-square.valid-capture:hover:before{border-width:6px;border-color:rgba(220,38,38,.8)}.chess-piece{width:85%;height:85%;cursor:pointer;object-fit:contain;z-index:2;-webkit-user-select:none;user-select:none;filter:var(--piece-shadow);transition:transform .18s cubic-bezier(.4,0,.2,1),filter .18s ease;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}.chess-piece:hover{transform:scale(1.12) translateY(-2px);filter:var(--piece-hover-shadow) var(--piece-hover-glow)}.chess-piece:active{cursor:grabbing;transform:scale(1.08) translateY(-1px)}@keyframes movePiece{0%{transform:translate(0) scale(1);filter:var(--piece-shadow)}40%{transform:translate(var(--targetXHalf),var(--targetYHalf)) scale(1.15) translateY(-8px);filter:drop-shadow(4px 12px 16px rgba(0,0,0,.4))}to{transform:translate(var(--targetX),var(--targetY)) scale(1);filter:var(--piece-shadow)}}.chess-piece.moving{position:absolute;animation:movePiece .35s ease forwards;pointer-events:none;z-index:100}@keyframes capturePiece{0%{opacity:1;transform:scale(1)}50%{opacity:.6;transform:scale(.8)}to{opacity:0;transform:scale(.3)}}.chess-piece.captured{animation:capturePiece .3s ease-out forwards}.move-entry{display:grid;grid-template-columns:3rem 1fr 1fr;gap:.5rem;padding:.5rem 0;border-bottom:1px solid #f3f4f6;transition:background-color .15s ease}.move-entry:hover{background-color:rgba(59,130,246,.05)}.move-entry:nth-child(odd){background-color:#f9fafb}.dark .move-entry{border-bottom-color:#374151}.dark .move-entry:nth-child(odd){background-color:rgba(55,65,81,.3)}.dark .move-entry:hover{background-color:rgba(59,130,246,.1)}.progress-bar-fill{width:var(--progress-width,0);transition:width .3s ease-in-out}.player-metric-bar{height:100%;border-radius:9999px;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.5s;background:linear-gradient(90deg,#60a5fa,#2563eb);box-shadow:0 1px 3px rgba(59,130,246,.3)}.player-metric-opening-preparation{width:var(--progress-width-opening-preparation,0)}.player-metric-positional-understanding{width:var(--progress-width-positional-understanding,0)}.player-metric-tactical-awareness{width:var(--progress-width-tactical-awareness,0)}.player-metric-endgame-skill{width:var(--progress-width-endgame-skill,0)}.player-metric-aggressive{width:var(--progress-width-aggressive,60%);background:linear-gradient(90deg,#f87171,#dc2626)}.player-metric-defensive{width:var(--progress-width-defensive,70%);background:linear-gradient(90deg,#4ade80,#16a34a)}.ai-strength-metric-calculation{width:var(--progress-width-calculation,85%)}.ai-strength-metric-strategy{width:var(--progress-width-strategy,90%)}.ai-strength-metric-knowledge{width:var(--progress-width-knowledge,95%)}.ai-strength-metric-creativity{width:var(--progress-width-creativity,75%)}.ai-strength-metric-psychology{width:var(--progress-width-psychology,70%)}.ai-strength-metric-endurance{width:var(--progress-width-endurance,100%)}.player-metric-bar-opening{width:var(--progress-width-opening)}.player-metric-bar-tactical{width:var(--progress-width-tactical)}.player-metric-bar-capture{width:var(--progress-width-capture)}.player-metric-bar-check{width:var(--progress-width-check)}.player-metric-bar-accuracy{width:var(--progress-width-accuracy)}.player-metric-bar-opening-preparation{width:var(--progress-width-opening-preparation)}.player-metric-bar-tactical-awareness{width:var(--progress-width-tactical-awareness)}.player-metric-bar-positional-understanding{width:var(--progress-width-positional-understanding)}.progress-bar-opening{width:var(--progress-width-opening)}.progress-bar-tactical{width:var(--progress-width-tactical)}.progress-bar-positional{width:var(--progress-width-positional)}.progress-bar-endgame{width:var(--progress-width-endgame)}.progress-bar-aggressiveness{width:var(--progress-width-aggressiveness)}.progress-bar-defensiveness{width:var(--progress-width-defensiveness)}.chatbox-messages-container{max-height:var(--chatbox-max-height,15rem);overflow-y:auto}@media (min-width:1280px){.chess-board{max-width:min(75vh,85vw,680px);max-width:min(75dvh,85vw,680px);border-width:6px;border-radius:6px;box-shadow:0 30px 60px -15px rgba(0,0,0,.4),0 15px 30px -10px rgba(0,0,0,.3),inset 0 -3px 6px rgba(0,0,0,.2)}.chess-piece{filter:drop-shadow(3px 5px 8px rgba(0,0,0,.4))}.chess-piece:hover{transform:scale(1.15) translateY(-3px);filter:drop-shadow(4px 8px 12px rgba(0,0,0,.5)) drop-shadow(0 0 15px rgba(59,130,246,.5))}}@media (max-width:1024px){.chess-board{max-width:min(70vh,88vw,560px);max-width:min(70dvh,88vw,560px)}.chess-square{min-height:44px;min-width:44px}}@media (max-width:767px){.chess-board-container{padding:.5rem .5rem calc(.5rem + env(safe-area-inset-bottom, 0px))}.chess-board{max-width:min(calc(100svh - 200px),95vw,450px);max-width:min(calc(100dvh - 200px),95vw,450px);border-width:3px;border-radius:3px;box-shadow:0 15px 35px -10px rgba(0,0,0,.3),0 8px 20px -8px rgba(0,0,0,.25)}.chess-piece{width:88%;height:88%;filter:drop-shadow(1px 2px 4px rgba(0,0,0,.35))}.chess-piece:hover{transform:scale(1.08);filter:drop-shadow(2px 4px 6px rgba(0,0,0,.4))}.chess-board-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none}.chess-square{touch-action:manipulation;-webkit-tap-highlight-color:transparent}.chess-square:active{transform:scale(.98)}}@media (max-width:480px){.chess-board-container{padding:.25rem .25rem calc(.25rem + env(safe-area-inset-bottom, 0px))}.chess-board{max-width:calc(100vw - 1rem);max-height:min(calc(100svh - 280px),calc(100vw - 1rem));border-width:2px}.chess-piece{width:90%;height:90%}.chess-square.valid-move:before{width:24%;height:24%}.chess-square.valid-capture:before{border-width:4px;top:8%;left:8%;right:8%;bottom:8%}}@media (max-width:375px){.chess-board{max-width:100%;max-height:min(calc(100svh - 260px),100vw);border-width:2px;border-radius:2px}.chess-board-container{padding:.125rem .125rem calc(.125rem + env(safe-area-inset-bottom, 0px))}.chess-piece{width:92%;height:92%}}@supports (padding:max(0px)){.chess-board-container{padding-left:max(.5rem,env(safe-area-inset-left));padding-right:max(.5rem,env(safe-area-inset-right));padding-bottom:max(.5rem,env(safe-area-inset-bottom))}}@media screen and (min-height:800px) and (max-width:430px){.chess-board{max-width:min(calc(100dvh - 320px),92vw);max-height:calc(100dvh - 320px)}}@media screen and (max-height:500px) and (orientation:landscape){.chess-board{max-width:min(70vh,60vw);max-width:min(70dvh,60vw);max-height:calc(100dvh - 60px)}.chess-board-container{padding:.25rem}}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;background:linear-gradient(135deg,#60a5fa,#2563eb);cursor:pointer;border-radius:50%;margin-top:-6px;box-shadow:0 2px 6px rgba(59,130,246,.4);transition:transform .15s ease,box-shadow .15s ease}input[type=range]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 3px 10px rgba(59,130,246,.5)}input[type=range]::-moz-range-thumb{width:18px;height:18px;background:linear-gradient(135deg,#60a5fa,#2563eb);cursor:pointer;border-radius:50%;border:none;box-shadow:0 2px 6px rgba(59,130,246,.4)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#e5e7eb;border-radius:10px}.dark ::-webkit-scrollbar-track{background:#374151}::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#d1d5db,#9ca3af);border-radius:10px;border:2px solid transparent;background-clip:padding-box}.dark ::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#6b7280,#4b5563)}.dark ::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#9ca3af,#6b7280)}*{scrollbar-width:thin;scrollbar-color:#9ca3af #e5e7eb}.dark *{scrollbar-color:#6b7280 #374151}@keyframes winCelebration{0%,to{filter:brightness(1)}50%{filter:brightness(1.1) drop-shadow(0 0 20px rgba(34,197,94,.5))}}@keyframes losePulse{0%,to{filter:grayscale(0)}50%{filter:grayscale(.3)}}.chess-board.game-won{animation:winCelebration 1s ease-in-out 3}.chess-board.game-lost{animation:losePulse .8s ease-in-out 2}@media (prefers-reduced-motion:reduce){.chess-piece,.chess-piece.moving,.chess-square{transition:none;animation:none}.chess-square.in-check{animation:none;box-shadow:inset 0 0 20px rgba(255,0,0,.5)}}@media (prefers-contrast:high){.chess-square.light-square{background:#ffffff}.chess-square.dark-square{background:#555555}.chess-square.selected{outline:4px solid #ffff00;outline-offset:-4px}.chess-square.valid-move:before{background:#00ff00}.chess-square.valid-capture:before{border-color:#ff0000;border-width:6px}}