*{box-sizing:border-box;margin:0;padding:0}*:focus{outline:none}*:focus-visible{outline:3px solid var(--focus, #667eea);outline-offset:2px;border-radius:var(--radius-sm, 4px)}.skip-link{position:absolute;top:-40px;left:0;background:var(--primary);color:#fff;padding:.5rem 1rem;z-index:9999;transition:top .2s}.skip-link:focus{top:0}:root{--primary: #667eea;--primary-dark: #5a6fd6;--primary-light: #8b9cf5;--success: #10b981;--danger: #ef4444;--warning: #f59e0b;--focus: #667eea;--bg-primary: #151826;--bg-secondary: #1a1f35;--bg-tertiary: #202B3A;--bg-card: rgba(30, 41, 59, .8);--bg-card-hover: rgba(51, 65, 85, .8);--text-primary: #f8fafc;--text-secondary: #cbd5e1;--text-muted: #94a3b8;--gray-50: #f8fafc;--gray-100: #f1f5f9;--gray-200: #e2e8f0;--gray-300: #cbd5e1;--gray-400: #94a3b8;--gray-500: #64748b;--gray-600: #475569;--gray-700: #334155;--gray-800: #1e293b;--gray-900: #0f172a;--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;--font-display: "Nunito", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;--font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;--space-xs: .25rem;--space-sm: .5rem;--space-md: 1rem;--space-lg: 1.5rem;--space-xl: 2rem;--space-2xl: 3rem;--radius-sm: 4px;--radius-md: 8px;--radius-lg: 12px;--radius-xl: 16px;--radius-full: 9999px;--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1);--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1)}html,body{font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:linear-gradient(180deg,var(--bg-primary) 0%,var(--bg-tertiary) 100%);background-attachment:fixed;min-height:100vh;height:100%;color:var(--text-primary);overflow-x:hidden}body{margin:0;padding:0}code,pre{font-family:var(--font-mono)}h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.2}a{color:var(--primary);text-decoration:none}a:hover{color:var(--primary-dark);text-decoration:underline}button{font-family:inherit}.app{min-height:100vh;height:100%;display:flex;flex-direction:column;width:100%}#root{width:100%;min-height:100vh;height:100%}.app-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 2rem;background:#fff;box-shadow:0 2px 8px #0000001a;position:sticky;top:0;z-index:100}.app-title h1{margin:0;font-size:2rem;color:var(--gray-900)}.app-subtitle{margin:0;font-size:.875rem;color:var(--gray-500);margin-top:.25rem}.btn-settings{padding:.625rem 1.25rem;font-size:1rem;font-weight:600;background:var(--primary-light);color:var(--primary);border:2px solid transparent;border-radius:var(--radius-md);cursor:pointer;transition:all .2s ease;display:flex;align-items:center;gap:.5rem}.btn-settings:hover{background:var(--primary);color:#fff;border-color:var(--primary);transform:translateY(-1px);box-shadow:var(--shadow-md)}.app-main{flex:1;display:flex;flex-direction:column}.app-footer{padding:1.5rem 2rem;background:#fff;border-top:2px solid var(--gray-200);text-align:center;font-size:.875rem;color:var(--gray-600)}.app-footer a{font-weight:600}.text-center{text-align:center}.text-sm{font-size:.875rem}.text-lg{font-size:1.125rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.mt-1{margin-top:var(--space-xs)}.mt-2{margin-top:var(--space-sm)}.mt-4{margin-top:var(--space-md)}.mb-1{margin-bottom:var(--space-xs)}.mb-2{margin-bottom:var(--space-sm)}.mb-4{margin-bottom:var(--space-md)}.p-1{padding:var(--space-xs)}.p-2{padding:var(--space-sm)}.p-4{padding:var(--space-md)}::-webkit-scrollbar{width:12px;height:12px}::-webkit-scrollbar-track{background:var(--gray-100)}::-webkit-scrollbar-thumb{background:var(--gray-400);border-radius:var(--radius-full);border:2px solid var(--gray-100)}::-webkit-scrollbar-thumb:hover{background:var(--gray-500)}@media (max-width: 768px){.app-header{padding:1rem 1.5rem}.app-title h1{font-size:1.5rem}.app-subtitle{font-size:.75rem}.btn-settings{font-size:.875rem;padding:.5rem 1rem}.app-footer{padding:1rem;font-size:.75rem}}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slideDown{0%{transform:translateY(-20px);opacity:0}to{transform:translateY(0);opacity:1}}*:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.openings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.25rem;padding:1rem;max-height:60vh;overflow-y:auto}.opening-card{background:var(--bg-card);border:2px solid var(--border);border-radius:var(--radius);padding:1.25rem;cursor:pointer;transition:all .3s ease;position:relative}.opening-card:hover{border-color:var(--primary);background:var(--bg-tertiary);transform:translateY(-2px);box-shadow:0 8px 25px #667eea26}.opening-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.75rem}.opening-title{flex:1}.opening-title h4{color:var(--text-primary);font-size:1.1rem;font-weight:600;margin-bottom:.25rem}.eco-code{background:var(--primary);color:#fff;padding:.2rem .5rem;border-radius:var(--radius-sm);font-size:.75rem;font-weight:500}.difficulty-badge{font-size:1.25rem;margin-left:.5rem}.opening-description{color:var(--text-secondary);font-size:.9rem;line-height:1.5;margin-bottom:1rem}.opening-themes{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}.theme-tag{background:var(--bg-secondary);color:var(--text-secondary);padding:.25rem .5rem;border-radius:var(--radius-sm);font-size:.8rem;border:1px solid var(--border)}.opening-footer{display:flex;justify-content:space-between;align-items:center;margin-top:auto}.move-count{color:var(--text-secondary);font-size:.85rem}.learn-btn{color:var(--primary);font-weight:500;font-size:.9rem}.opening-card:hover .learn-btn{color:var(--primary-light)}.difficulty-selector{display:flex;gap:.75rem;margin-bottom:1.5rem;justify-content:center}.difficulty-btn{background:var(--bg-secondary);border:2px solid var(--border);color:var(--text-secondary);padding:.6rem 1.2rem;border-radius:var(--radius);cursor:pointer;transition:all .3s ease;font-weight:500}.difficulty-btn:hover{border-color:var(--primary);color:var(--text-primary)}.difficulty-btn.active{background:var(--primary);border-color:var(--primary);color:#fff}.production-diagnostics{position:fixed;bottom:0;right:0;z-index:10000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.diagnostics-toggle{background:#10b981e6;color:#fff;padding:8px 16px;border-radius:8px 8px 0 0;cursor:pointer;font-size:.9rem;font-weight:600;-webkit-user-select:none;user-select:none;box-shadow:0 -2px 10px #0000004d;transition:background .2s}.diagnostics-toggle:hover{background:#10b981}.diagnostics-panel{background:#1a1a1a;border:1px solid rgba(16,185,129,.3);border-radius:8px 8px 0 0;max-width:400px;max-height:80vh;overflow-y:auto;box-shadow:0 -4px 20px #00000080}.diagnostics-header{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-bottom:1px solid rgba(255,255,255,.1);background:#10b9811a}.diagnostics-header h3{margin:0;color:#10b981;font-size:1.1rem}.close-btn{background:none;border:none;color:#94a3b8;font-size:1.5rem;cursor:pointer;padding:0;line-height:1;transition:color .2s}.close-btn:hover{color:#fff}.diagnostics-content{padding:1rem}.diag-section{margin-bottom:1.5rem}.diag-section:last-child{margin-bottom:0}.diag-section h4{margin:0 0 .75rem;color:#93c5fd;font-size:.9rem;font-weight:600}.diag-row{display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid rgba(255,255,255,.05);font-size:.85rem}.diag-row:last-child{border-bottom:none}.diag-row span{color:#94a3b8}.diag-row code{background:#3b82f61a;padding:2px 8px;border-radius:4px;color:#93c5fd;font-size:.8rem;font-family:Courier New,monospace}.diag-row code.status-ok{background:#10b9811a;color:#10b981}.diagnostics-actions{display:flex;gap:.5rem;padding:0 1rem 1rem}.diag-btn{flex:1;padding:8px 12px;background:#3b82f633;color:#93c5fd;border:1px solid rgba(59,130,246,.3);border-radius:6px;cursor:pointer;font-size:.85rem;font-weight:600;transition:all .2s}.diag-btn:hover{background:#3b82f64d;border-color:#3b82f680}.diagnostics-footer{padding:.75rem 1rem;background:#ffffff05;border-top:1px solid rgba(255,255,255,.05);text-align:center}.diagnostics-footer small{color:#64748b;font-size:.75rem}.diagnostics-panel::-webkit-scrollbar{width:6px}.diagnostics-panel::-webkit-scrollbar-track{background:#ffffff0d}.diagnostics-panel::-webkit-scrollbar-thumb{background:#10b9814d;border-radius:3px}.diagnostics-panel::-webkit-scrollbar-thumb:hover{background:#10b98180}.chess-board-container{display:flex;flex-direction:column;align-items:center;gap:1.5rem;padding:2rem;-webkit-user-select:none;user-select:none;min-height:100vh;justify-content:center}.board-wrapper{perspective:1000px;display:flex;justify-content:center;align-items:center;position:relative}.board-frame{padding:16px;background:linear-gradient(135deg,#654321,#8b4513 30%,sienna,#8b4513 70%,#654321);border-radius:20px;box-shadow:0 12px 40px #0006,0 4px 20px #0003,inset 0 2px #ffffff1a,inset 0 -2px #0003;position:relative}.chess-board-premium{display:grid;grid-template-columns:repeat(8,60px);grid-template-rows:repeat(8,60px);gap:0;border-radius:8px;overflow:hidden;position:relative;transform:rotateX(12deg);transform-origin:center center;box-shadow:0 8px 25px #0000004d,inset 0 0 0 1px #0000001a}.chess-square{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);width:60px;height:60px}.chess-square.light{background:linear-gradient(135deg,#f4e4c1,#f0d9b5,#f8ebcd,#f0d9b5,#ede0c4);background-image:repeating-linear-gradient(45deg,transparent 0px,rgba(139,69,19,.02) 1px,transparent 2px,transparent 8px),repeating-linear-gradient(-45deg,transparent 0px,rgba(160,82,45,.015) 1px,transparent 2px,transparent 12px)}.chess-square.dark{background:linear-gradient(135deg,#c19a6b,#b58863,#d4ac73,#b58863,#a67c5a);background-image:repeating-linear-gradient(45deg,transparent 0px,rgba(101,67,33,.08) 1px,transparent 2px,transparent 8px),repeating-linear-gradient(-45deg,transparent 0px,rgba(83,53,27,.06) 1px,transparent 2px,transparent 12px)}.chess-square:hover{box-shadow:inset 0 0 15px #ffffff1a,0 2px 8px #0003;transform:translateZ(1px)}.chess-square.selected{position:relative}.chess-square.selected:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:radial-gradient(circle at center,rgba(255,215,0,.3) 0%,rgba(255,215,0,.15) 60%,transparent 100%);animation:selectedGlow 2s ease-in-out infinite;pointer-events:none;z-index:1}@keyframes selectedGlow{0%,to{background:radial-gradient(circle at center,rgba(255,215,0,.3) 0%,rgba(255,215,0,.15) 60%,transparent 100%)}50%{background:radial-gradient(circle at center,rgba(255,215,0,.5) 0%,rgba(255,215,0,.25) 60%,transparent 100%)}}.chess-square.last-move:after{content:"";position:absolute;top:2px;left:2px;right:2px;bottom:2px;background:linear-gradient(45deg,#00bfff40,#00bfff26,#00bfff40);border-radius:4px;animation:lastMoveGlow .8s ease-out;pointer-events:none;z-index:1}@keyframes lastMoveGlow{0%{opacity:0;transform:scale(.8)}50%{opacity:1;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.chess-square.check{animation:checkAlert .6s ease-in-out 3}@keyframes checkAlert{0%,to{background:inherit}50%{background:#ff3b3099!important;box-shadow:inset 0 0 20px #ff3b3066,0 0 15px #ff3b304d}}.legal-move-indicator{position:absolute;width:16px;height:16px;border-radius:50%;background:#34c759cc;color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;animation:legalMoveIndicator 1.5s ease-in-out infinite;z-index:2;box-shadow:0 2px 4px #0000004d}@keyframes legalMoveIndicator{0%,to{transform:scale(1);opacity:.8}50%{transform:scale(1.15);opacity:1}}.chess-piece{font-size:2.8rem;transition:all .15s cubic-bezier(.4,0,.2,1);cursor:grab;z-index:10;pointer-events:none;filter:drop-shadow(0 2px 4px rgba(0,0,0,.45));text-shadow:0 1px 2px rgba(0,0,0,.3)}.chess-piece:hover{transform:scale(1.05);filter:drop-shadow(0 3px 6px rgba(0,0,0,.5))}.chess-piece:active{cursor:grabbing}.chess-piece.white{color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.8),0 0 8px rgba(255,255,255,.2)}.chess-piece.black{color:#2c3e50;text-shadow:0 1px 3px rgba(0,0,0,.6),0 0 6px rgba(44,62,80,.15)}.drag-preview{position:absolute;font-size:3rem;pointer-events:none;z-index:1000;transform:scale(1.07);filter:drop-shadow(0 6px 12px rgba(0,0,0,.6));animation:dragFloat .2s ease-out}@keyframes dragFloat{0%{transform:scale(1);filter:drop-shadow(0 2px 4px rgba(0,0,0,.45))}to{transform:scale(1.07);filter:drop-shadow(0 6px 12px rgba(0,0,0,.6))}}.chess-square.bounce-back{position:relative}.chess-square.bounce-back:after{content:"❌ Invalid Move";position:absolute;top:-35px;left:50%;transform:translate(-50%);background:#f44336f2;color:#fff;padding:6px 10px;border-radius:6px;font-size:11px;font-weight:700;white-space:nowrap;z-index:1000;animation:invalidMoveMessage .5s ease-in-out;box-shadow:0 2px 8px #f443364d}.chess-square.captured .chess-piece{animation:pieceCapture .5s ease-out forwards}@keyframes pieceCapture{0%{transform:scale(1) translateY(0) rotate(0);opacity:1}30%{transform:scale(1.15) translateY(-15px) rotate(5deg);opacity:.8}70%{transform:scale(.9) translateY(-10px) rotate(-3deg);opacity:.4}to{transform:scale(.7) translateY(20px) rotate(8deg);opacity:0}}.board-labels{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none;z-index:15}.files{position:absolute;bottom:-30px;left:16px;right:16px;display:grid;grid-template-columns:repeat(8,60px);justify-content:center;color:#ffffffb3;font-size:.9rem;font-weight:600;text-align:center}.file-label{display:flex;align-items:center;justify-content:center}.ranks{position:absolute;top:16px;bottom:16px;left:-30px;display:grid;grid-template-rows:repeat(8,60px);align-content:center;color:#ffffffb3;font-size:.9rem;font-weight:600;text-align:center}.rank-label{display:flex;align-items:center;justify-content:center}.files{position:absolute;bottom:-25px;left:0;right:0;display:flex;justify-content:space-around;color:#fff9;font-size:.9rem;font-weight:500}.ranks{position:absolute;top:0;bottom:0;left:-25px;display:flex;flex-direction:column;justify-content:space-around;color:#fff9;font-size:.9rem;font-weight:500}.square-coord{position:absolute;bottom:1px;left:2px;font-size:7px;color:#0006;font-weight:500;pointer-events:none;z-index:1;font-family:Courier New,monospace}.chess-square.light .square-coord{color:#00000080}.chess-square.dark .square-coord{color:#fff9}@media (max-width: 768px){.chess-board-container{padding:1rem}.chess-board-premium{grid-template-columns:repeat(8,45px);grid-template-rows:repeat(8,45px);transform:rotateX(8deg)}.chess-square{width:45px;height:45px}.chess-piece{font-size:2.2rem}.board-frame{padding:12px}.files{grid-template-columns:repeat(8,45px)}.ranks{grid-template-rows:repeat(8,45px)}}@media (max-width: 480px){.chess-board-premium{grid-template-columns:repeat(8,38px);grid-template-rows:repeat(8,38px)}.chess-square{width:38px;height:38px}.chess-piece{font-size:1.8rem}.files{grid-template-columns:repeat(8,38px)}.ranks{grid-template-rows:repeat(8,38px)}}@media (prefers-reduced-motion: reduce){.chess-square,.chess-piece,.legal-move-indicator,.drag-preview{animation:none!important;transition:none!important}.chess-board-premium{transform:none!important}}.chess-board-premium *{will-change:auto}.chess-square:hover,.chess-square.selected,.drag-preview,.chess-piece:hover{will-change:transform,box-shadow,filter}.chess-square,.chess-piece,.drag-preview,.board-frame{transform:translateZ(0);backface-visibility:hidden}@media (-webkit-min-device-pixel-ratio: 2){.chess-piece{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}.debug-toggle-btn{position:fixed;bottom:1rem;right:1rem;width:40px;height:40px;border-radius:50%;background:#2563ebe6;border:none;color:#fff;font-size:1.25rem;cursor:pointer;z-index:1000;box-shadow:0 2px 8px #0000004d;transition:all .2s}.debug-toggle-btn:hover{background:#1d4ed8;transform:scale(1.1)}.debug-panel{position:fixed;bottom:4rem;right:1rem;width:380px;max-height:70vh;background:#0f172afa;border:1px solid rgba(255,255,255,.1);border-radius:12px;box-shadow:0 4px 20px #00000080;z-index:999;overflow:hidden;display:flex;flex-direction:column}.debug-header{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;background:#2563eb33;border-bottom:1px solid rgba(255,255,255,.1)}.debug-header h3{margin:0;font-size:.95rem;color:#e2e8f0}.debug-header-actions{display:flex;gap:.5rem}.debug-header-actions button{background:#ffffff1a;border:none;color:#e2e8f0;padding:.35rem .6rem;border-radius:4px;cursor:pointer;font-size:.8rem;transition:all .2s}.debug-header-actions button:hover{background:#fff3}.debug-content{padding:.75rem;overflow-y:auto;flex:1}.debug-section{margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid rgba(255,255,255,.05)}.debug-section:last-child{margin-bottom:0;border-bottom:none}.debug-section h4{margin:0 0 .5rem;font-size:.8rem;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em}.debug-grid{display:grid;grid-template-columns:auto 1fr;gap:.25rem .75rem;font-size:.85rem}.debug-label{color:#64748b;font-weight:500}.debug-value{color:#e2e8f0;word-break:break-all}.debug-mono{font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:.75rem}.debug-fen,.debug-pgn{background:#0000004d;padding:.4rem .6rem;border-radius:4px;color:#a5f3fc;margin-top:.25rem;margin-bottom:.5rem;word-break:break-all;line-height:1.4}.debug-pgn{color:#fcd34d}.status-active{color:#fbbf24!important}.status-success{color:#4ade80!important}.status-error{color:#f87171!important}.debug-move-history{max-height:150px;overflow-y:auto;font-size:.8rem}.debug-move{display:flex;gap:.5rem;padding:.3rem .5rem;border-radius:4px;margin-bottom:.25rem;align-items:center}.debug-move.human{background:#3b82f626}.debug-move.ai{background:#a855f726}.move-num{color:#64748b;font-weight:600;width:30px}.move-player{font-size:1rem}.move-notation{color:#e2e8f0;font-family:Monaco,monospace;flex:1}.move-time{color:#64748b;font-size:.7rem}.debug-empty{color:#64748b;font-style:italic;padding:.5rem;text-align:center}.debug-actions{display:flex;gap:.5rem;margin-top:.5rem}.debug-health-btn,.debug-recovery-btn{padding:.4rem .8rem;border:1px solid #374151;border-radius:4px;background:#1f2937;color:#e2e8f0;font-size:.8rem;cursor:pointer;transition:all .2s ease}.debug-health-btn:hover{background:#374151;border-color:#60a5fa}.debug-recovery-btn:hover:not(:disabled){background:#374151;border-color:#f59e0b}.debug-recovery-btn:disabled{opacity:.5;cursor:not-allowed}.debug-issues{margin-top:.5rem;padding:.5rem;background:#ef44441a;border-radius:4px;border-left:3px solid #ef4444}.debug-issue{color:#fca5a5;font-size:.8rem;margin:.2rem 0}.status-healthy{color:#10b981!important}.status-error{color:#ef4444!important}.debug-conversation{max-height:200px;overflow-y:auto;margin-top:.5rem;border:1px solid #374151;border-radius:4px;background:#111827}.debug-chat-message{padding:.5rem;border-bottom:1px solid #374151;font-size:.8rem}.debug-chat-message:last-child{border-bottom:none}.debug-chat-message.user{background:#3b82f61a}.debug-chat-message.assistant{background:#a855f71a}.debug-chat-message.system{background:#6b72801a}.chat-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.25rem}.chat-role{font-weight:600;color:#e2e8f0}.chat-time{color:#64748b;font-size:.7rem}.chat-content{color:#cbd5e1;line-height:1.4;white-space:pre-wrap}.chat-move{color:#60a5fa;font-size:.7rem;margin-top:.25rem;font-family:monospace}.debug-last-response{margin-top:.5rem;padding:.5rem;background:#a855f71a;border-radius:4px;border-left:3px solid #a855f7}.ai-response-text{color:#e2e8f0;font-size:.8rem;margin-top:.25rem;white-space:pre-wrap}.debug-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.debug-btn{background:#2196f3;color:#fff;border:none;padding:6px 12px;border-radius:4px;cursor:pointer;font-size:12px;transition:background-color .2s;min-width:fit-content}.debug-btn:hover{background:#1976d2}.debug-btn:disabled{background:#666;cursor:not-allowed;opacity:.6}.status-success{color:#4caf50!important;font-weight:500}.status-warning{color:#ff9800!important;font-weight:500}.status-error{color:#f44336!important;font-weight:500}.status-active{color:#2196f3!important;font-weight:500}@media (max-width: 480px){.debug-panel{width:calc(100vw - 2rem);right:1rem;left:1rem;max-height:50vh}}.game-view{display:flex;flex-direction:column;align-items:center;gap:1.5rem;max-width:none;width:100%;margin:0 auto;padding:2rem;min-width:800px}.game-header{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:800px;padding:1rem;background:var(--bg-card, rgba(30, 41, 59, .8));border:1px solid rgba(100,116,139,.3);border-radius:12px;box-shadow:0 4px 12px #0000004d}.game-info{display:flex;flex-direction:column;gap:.5rem}.game-info h2{margin:0;font-size:1.75rem;color:var(--text-primary, #f8fafc)}.model-badge{display:flex;align-items:center;gap:.5rem;padding:.375rem .75rem;background:#667eea33;border:1px solid rgba(102,126,234,.4);border-radius:6px;font-size:.875rem;color:var(--primary-light, #8b9cf5)}.model-icon{font-size:1rem}.game-actions{display:flex;gap:.75rem}.btn{padding:.625rem 1.25rem;font-size:1rem;font-weight:600;border:none;border-radius:8px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.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}.btn:active:before{width:300px;height:300px}.btn:hover{transform:translateY(-2px);box-shadow:0 6px 16px #00000026}.btn:active{transform:scale(.97)}.btn-resign{background:#fee2e2;color:#991b1b}.btn-resign:hover{background:#fecaca}.btn-new{background:#e0f2fe;color:#075985}.btn-new:hover{background:#bae6fd}.btn-primary{background:#3b82f6;color:#fff}.btn-primary:hover{background:#2563eb}.btn-analyze{font-size:1.125rem;padding:.875rem 1.75rem;animation:pulse-border 2s ease-in-out infinite}@keyframes pulse-border{0%,to{box-shadow:0 0 #3b82f666}50%{box-shadow:0 0 0 8px #3b82f600}}.thinking-banner{display:flex;align-items:center;justify-content:center;gap:1rem;width:100%;max-width:800px;padding:1rem 1.5rem;background:linear-gradient(135deg,#e0f2fe,#ddd6fe);border:2px solid #93c5fd;border-radius:12px;color:#1e3a8a;font-weight:600;font-size:1.05rem;animation:slideDown .3s ease-out}.thinking-knight{font-size:2rem;animation:bobbing 1.5s ease-in-out infinite}@keyframes bobbing{0%,to{transform:translateY(0) rotate(-5deg)}50%{transform:translateY(-8px) rotate(5deg)}}.thinking-dots{display:flex;gap:6px;align-items:center}.thinking-dots .dot{width:8px;height:8px;border-radius:50%;background:#3b82f6;animation:pulse-dot 1.4s ease-in-out infinite}.thinking-dots .dot:nth-child(1){animation-delay:0s}.thinking-dots .dot:nth-child(2){animation-delay:.2s}.thinking-dots .dot:nth-child(3){animation-delay:.4s}@keyframes pulse-dot{0%,80%,to{transform:scale(.8);opacity:.5}40%{transform:scale(1.2);opacity:1}}.turn-indicator{display:flex;align-items:center;justify-content:center;width:100%;max-width:800px;padding:.75rem 1.5rem;border-radius:8px;font-weight:600;font-size:1rem;animation:slideDown .3s ease-out}.turn-indicator.player-turn{background:linear-gradient(135deg,#dcfce7,#bbf7d0);border:2px solid #86efac;color:#166534}.turn-indicator.ai-turn{background:linear-gradient(135deg,#fef3c7,#fde68a);border:2px solid #fcd34d;color:#92400e}.error-banner{display:flex;align-items:center;gap:.75rem;width:100%;max-width:800px;padding:1rem 1.5rem;background:linear-gradient(135deg,#fef2f2,#fee2e2);border:2px solid #fca5a5;border-radius:12px;color:#991b1b;font-weight:500;animation:slideDown .3s ease-out;position:relative}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.error-icon{font-size:1.5rem;flex-shrink:0}.error-banner span:nth-child(2){flex:1}.error-actions{display:flex;gap:.5rem;align-items:center;flex-shrink:0}.btn-retry{background:linear-gradient(135deg,#667eea,#5a67d8);border:none;color:#fff;font-size:.9rem;font-weight:600;cursor:pointer;padding:.5rem 1rem;border-radius:8px;transition:all .2s;display:flex;align-items:center;gap:.25rem}.btn-retry:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.btn-retry:disabled{opacity:.6;cursor:not-allowed}.error-dismiss{background:transparent;border:none;color:#991b1b;font-size:1.25rem;cursor:pointer;padding:0;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:6px;transition:background .2s;flex-shrink:0}.error-dismiss:hover{background:#991b1b1a}.game-stats{display:flex;gap:2rem;padding:1rem 2rem;background:#fff;border-radius:8px;box-shadow:0 2px 8px #0000001a}.stat{display:flex;flex-direction:column;align-items:center;gap:.25rem}.stat-label{font-size:.875rem;color:#6b7280;font-weight:500}.stat-value{font-size:1.25rem;font-weight:700;color:#1a1a1a}.pgn-details{width:100%;max-width:800px;padding:1rem;background:#fff;border-radius:8px;box-shadow:0 2px 8px #0000001a;cursor:pointer}.pgn-details summary{font-weight:600;color:#3b82f6;padding:.5rem;-webkit-user-select:none;user-select:none}.pgn-details summary:hover{color:#2563eb}.pgn-display{margin-top:1rem;padding:1rem;background:#f9fafb;border:1px solid #e5e7eb;border-radius:6px;font-family:Courier New,monospace;font-size:.875rem;white-space:pre-wrap;word-wrap:break-word;color:#374151;max-height:200px;overflow-y:auto}@media (max-width: 768px){.game-view{padding:1rem}.game-header{flex-direction:column;gap:1rem}.game-actions{width:100%;justify-content:stretch}.btn{flex:1}.game-stats{width:100%;gap:1rem}}.chessboard-container{display:flex;flex-direction:column;align-items:center;gap:2rem;padding:3rem;min-width:800px;width:auto;flex-shrink:0;perspective:1200px;transform-style:preserve-3d}.chessboard{display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);width:720px;height:720px;min-width:720px;min-height:720px;aspect-ratio:1 / 1;position:relative;transform-style:preserve-3d;transform:rotateX(15deg) rotateY(-5deg);animation:boardFloat 6s ease-in-out infinite;border-radius:12px;overflow:hidden;background:linear-gradient(145deg,#8b5a3c,#5d3a28);box-shadow:0 30px 60px #0006,inset 0 0 0 8px #6d4c41,inset 0 0 0 12px #8d6e63,0 0 0 4px #4a2c2a,0 0 20px #8b5a3c4d,0 8px 16px #0003,0 16px 32px #00000026,0 24px 48px #0000001a}.chessboard:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(135deg,transparent 0%,rgba(255,255,255,.1) 25%,rgba(255,255,255,.05) 50%,transparent 75%);border-radius:12px;pointer-events:none;z-index:100}.chessboard:after{content:"";position:absolute;top:-4px;left:-4px;right:-4px;bottom:-4px;background:linear-gradient(45deg,rgba(255,215,0,.2) 0%,rgba(255,165,0,.1) 25%,transparent 50%,rgba(139,90,60,.1) 75%,rgba(101,67,33,.2) 100%);border-radius:16px;z-index:-1;animation:edgeGlow 4s ease-in-out infinite alternate}@keyframes boardFloat{0%,to{transform:rotateX(15deg) rotateY(-5deg) translateY(0)}50%{transform:rotateX(15deg) rotateY(-5deg) translateY(-8px)}}@keyframes edgeGlow{0%{opacity:.6;filter:blur(2px)}to{opacity:1;filter:blur(0px)}}@media (max-width: 768px){.chessboard-container{perspective:800px;padding:2rem;min-width:560px}.chessboard{width:520px;height:520px;min-width:520px;min-height:520px;transform:rotateX(10deg) rotateY(-3deg)}}@media (max-width: 480px){.chessboard-container{perspective:600px;padding:1rem;min-width:440px}.chessboard{width:400px;height:400px;min-width:400px;min-height:400px;transform:rotateX(8deg) rotateY(-2deg)}@keyframes boardFloat{0%,to{transform:rotateX(8deg) rotateY(-2deg) translateY(0)}50%{transform:rotateX(8deg) rotateY(-2deg) translateY(-4px)}}}.chessboard.dragging{cursor:grabbing!important}.chessboard.turn-locked{cursor:not-allowed!important;pointer-events:none;opacity:.85}.chessboard.turn-locked:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:#0000000d;pointer-events:none;z-index:10}.square{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .4s cubic-bezier(.4,0,.2,1);user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;transform-style:preserve-3d;border-radius:2px;overflow:hidden}.square:before{content:"";position:absolute;top:1px;right:1px;bottom:1px;left:1px;border-radius:1px;pointer-events:none;transition:all .3s ease;z-index:-1}.square:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;transition:all .3s ease;border-radius:2px}.square:focus-visible{outline:3px solid #667eea;outline-offset:-3px;z-index:5;box-shadow:0 0 15px #667eea80}.square:hover{transform:translateY(-1px) translateZ(2px);box-shadow:0 4px 8px #00000026}.square.light{background:linear-gradient(145deg,#fff8e7,beige 20%,#f0d9b5,#e8d5a3);box-shadow:inset 0 2px 4px #fff6,inset 0 -1px 2px #b48c6426,0 1px 3px #0000000d}.square.light:after{background:linear-gradient(180deg,rgba(255,255,255,.3) 0%,transparent 50%,rgba(0,0,0,.03) 100%)}.square.light:hover{background:linear-gradient(145deg,#fffcf0,#f8f8e0 20%,#f3dcc0,#ebd8a8);box-shadow:inset 0 2px 6px #ffffff80,inset 0 -1px 3px #b48c6433,0 4px 12px #0000001a}.square.dark{background:linear-gradient(145deg,#e4a574,#d18b47 20%,#b58863,#a0724d);box-shadow:inset 0 2px 4px #ffc89640,inset 0 -1px 2px #643c2840,0 1px 3px #0000001a}.square.dark:after{background:linear-gradient(180deg,rgba(255,200,150,.2) 0%,transparent 50%,rgba(0,0,0,.08) 100%)}.square.dark:hover{background:linear-gradient(145deg,#e8aa7a,#d58f4c 20%,#b98c68,#a47652);box-shadow:inset 0 2px 6px #ffc8964d,inset 0 -1px 3px #643c284d,0 4px 12px #00000026}.square.selected{background:linear-gradient(145deg,#d4ed6a,#baca44 30%,#a8b83b 70%,#96a435)!important;box-shadow:inset 0 0 0 3px #baca44cc,inset 0 2px 6px #ffffff4d,0 4px 12px #baca4466,0 0 20px #baca4433;transform:translateY(-2px) translateZ(4px);animation:selectedPulse 2s ease-in-out infinite}@keyframes selectedPulse{0%,to{box-shadow:inset 0 0 0 3px #baca44cc,inset 0 2px 6px #ffffff4d,0 4px 12px #baca4466,0 0 20px #baca4433}50%{box-shadow:inset 0 0 0 3px #baca44,inset 0 2px 6px #fff6,0 6px 16px #baca4499,0 0 30px #baca444d}}.square.legal-move{cursor:pointer;position:relative}.square.legal-move:before{opacity:.6;background:radial-gradient(circle,rgba(100,200,100,.4) 0%,rgba(100,200,100,.2) 40%,transparent 60%)}.square.legal-move:hover{background:linear-gradient(145deg,#e8f4a6,#d4e67b 30%,#c8dc6f 70%,#bcd063)!important;box-shadow:inset 0 2px 6px #fff6,0 4px 12px #64c8644d,0 0 15px #64c86433;transform:translateY(-2px) translateZ(3px)}.square.in-check{background:linear-gradient(145deg,#ff8a8a,#ff6b6b 30%,#ff5252 70%,#e53e3e)!important;animation:checkPulse 1.2s ease-in-out infinite;box-shadow:inset 0 0 0 3px #ff6b6be6,inset 0 2px 6px #ffffff4d,0 4px 16px #ff6b6b80,0 0 25px #ff6b6b4d;transform:translateY(-1px) translateZ(3px)}@keyframes checkPulse{0%,to{box-shadow:inset 0 0 0 3px #ff6b6be6,inset 0 2px 6px #ffffff4d,0 4px 16px #ff6b6b80,0 0 25px #ff6b6b4d}50%{box-shadow:inset 0 0 0 4px #ff6b6b,inset 0 2px 8px #fff6,0 6px 20px #ff6b6bb3,0 0 35px #ff6b6b66}}@keyframes pulse-check{0%,to{box-shadow:inset 0 0 0 3px #ff6b6bcc}50%{box-shadow:inset 0 0 0 3px #ff6b6b,0 0 20px #ff6b6b80}}.square.last-move{background:linear-gradient(135deg,#fbbf244d,#f59e0b4d);box-shadow:inset 0 0 0 2px #fbbf2480}.square.hovered{background:linear-gradient(135deg,#93c5fd,#7dd3fc)!important;box-shadow:inset 0 0 0 3px #93c5fdcc}.square.dragging-from{background:linear-gradient(135deg,#baca4466,#a8b83b66)!important;opacity:.6}.rank-label,.file-label{position:absolute;font-size:.85rem;font-weight:600;color:#00000080;-webkit-user-select:none;user-select:none;pointer-events:none}.square.light .rank-label,.square.light .file-label{color:#b58863}.square.dark .rank-label,.square.dark .file-label{color:#f0d9b5}.rank-label{top:4px;left:4px}.file-label{bottom:4px;right:4px}.piece{font-size:clamp(3rem,7vw,5rem);cursor:grab;user-select:none;-webkit-user-select:none;transition:all .3s cubic-bezier(.4,0,.2,1);will-change:transform;pointer-events:none;transform-style:preserve-3d;filter:drop-shadow(0 4px 8px rgba(0,0,0,.3)) drop-shadow(0 2px 4px rgba(0,0,0,.2)) drop-shadow(0 8px 16px rgba(0,0,0,.1));text-shadow:0 0 10px rgba(255,255,255,.3),0 2px 4px rgba(0,0,0,.4),0 4px 8px rgba(0,0,0,.2);transform:translateZ(2px)}.piece.draggable{cursor:grab;pointer-events:auto;animation:pieceIdle 3s ease-in-out infinite}@keyframes pieceIdle{0%,to{transform:translateZ(2px) rotateY(0)}50%{transform:translateZ(2px) rotateY(2deg)}}.piece.draggable:hover{transform:scale(1.08) translateZ(6px) rotateY(5deg);filter:drop-shadow(0 8px 16px rgba(0,0,0,.4)) drop-shadow(0 4px 8px rgba(0,0,0,.3)) drop-shadow(0 12px 24px rgba(0,0,0,.15)) brightness(1.1);text-shadow:0 0 15px rgba(255,255,255,.4),0 3px 6px rgba(0,0,0,.5),0 6px 12px rgba(0,0,0,.3);animation:none}.piece.draggable:active{cursor:grabbing}.dragged-piece{position:fixed;font-size:clamp(2.5rem,6vw,4rem);pointer-events:none;z-index:1000;user-select:none;-webkit-user-select:none;will-change:transform;transform-origin:center;cursor:grabbing;animation:lift-piece .15s ease-out forwards}@keyframes lift-piece{0%{transform:translate(-50%,-50%) scale(1) rotate(0);filter:drop-shadow(0 2px 4px rgba(0,0,0,.2))}to{transform:translate(-50%,-50%) scale(1.15) rotate(3deg);filter:drop-shadow(0 8px 24px rgba(0,0,0,.4))}}.move-dot{width:25%;height:25%;border-radius:50%;background:radial-gradient(circle,#60a5fa99,#3b82f666);pointer-events:none;animation:fade-in .2s ease-out}.capture-ring{position:absolute;top:8%;right:8%;bottom:8%;left:8%;border:4px solid rgba(239,68,68,.6);border-radius:50%;pointer-events:none;animation:fade-in .2s ease-out,pulse-ring 1.5s ease-in-out infinite}@keyframes fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes pulse-ring{0%,to{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.05)}}@media (prefers-reduced-motion: reduce){.square,.piece,.dragged-piece,.move-dot,.capture-ring{animation:none!important;transition:none!important}.piece.draggable:hover{transform:none;filter:none}.square.in-check{animation:none}}@media (max-width: 768px){.chessboard{width:520px;height:520px;border-width:4px}.piece{font-size:clamp(2.5rem,8vw,4rem)}.dragged-piece{font-size:clamp(2rem,8vw,3rem)}.rank-label,.file-label{font-size:.6rem}}@media (max-width: 480px){.chessboard-container{padding:.5rem;gap:1rem;min-width:440px}.chessboard{width:400px;height:400px;border-width:3px;border-radius:4px}.piece,.dragged-piece{font-size:clamp(2rem,10vw,3rem)}.rank-label,.file-label{font-size:.5rem}.move-dot{width:20%;height:20%}.capture-ring{top:10%;right:10%;bottom:10%;left:10%;border-width:3px}}.square:focus{outline:3px solid #3b82f6;outline-offset:-3px}.square:focus:not(:focus-visible){outline:none}.chessboard *{backface-visibility:hidden;-webkit-backface-visibility:hidden}.dragged-piece,.piece{transform:translateZ(0)}.coaching-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000d9;display:flex;align-items:center;justify-content:center;z-index:10000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn .3s ease}.coaching-modal-content{background:linear-gradient(135deg,#1a1a2e,#16213e);border-radius:16px;padding:32px;max-width:800px;width:90%;max-height:85vh;overflow-y:auto;box-shadow:0 20px 60px #00000080;position:relative;animation:slideUp .4s ease;border:1px solid rgba(255,255,255,.1)}.coaching-chat-view{display:flex;flex-direction:column;padding:20px;max-height:85vh;overflow:hidden}.chat-header{display:flex;align-items:center;gap:16px;padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.modal-close-btn{position:absolute;top:16px;right:16px;background:#ffffff1a;border:none;color:#fff;font-size:24px;width:40px;height:40px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .3s ease}.modal-close-btn:hover{background:#fff3;transform:rotate(90deg)}.modal-title{color:#fff;font-size:28px;margin:0 0 24px;text-align:center;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.game-summary{background:#ffffff0d;border-radius:12px;padding:16px;margin-bottom:24px;display:flex;gap:24px;justify-content:center;border:1px solid rgba(255,255,255,.1)}.game-summary p{margin:0;color:#ffffffe6;font-size:14px}.game-summary strong{color:#fff;font-weight:600}.section-title{color:#fff;font-size:20px;margin:0 0 20px;display:flex;align-items:center;gap:8px}.takeaways-list{display:flex;flex-direction:column;gap:16px;margin-bottom:32px}.takeaway-card{background:#ffffff0d;border-radius:12px;padding:20px;border-left:4px solid;transition:all .3s ease;animation:slideInLeft .5s ease;animation-fill-mode:both}.takeaway-card:nth-child(1){animation-delay:.1s}.takeaway-card:nth-child(2){animation-delay:.2s}.takeaway-card:nth-child(3){animation-delay:.3s}.takeaway-card:nth-child(4){animation-delay:.4s}.takeaway-card:nth-child(5){animation-delay:.5s}@keyframes slideInLeft{0%{transform:translate(-30px);opacity:0}to{transform:translate(0);opacity:1}}.priority-high{border-left-color:#f093fb;background:linear-gradient(135deg,#f093fb1a,#f5576c1a)}.priority-medium{border-left-color:#667eea;background:linear-gradient(135deg,#667eea1a,#764ba21a)}.priority-low{border-left-color:#4facfe;background:linear-gradient(135deg,#4facfe1a,#00f2fe1a)}.takeaway-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px #0000004d;background:#ffffff14}.takeaway-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.takeaway-icon{font-size:32px}.takeaway-number{background:#ffffff1a;color:#ffffffb3;padding:4px 12px;border-radius:12px;font-size:12px;font-weight:600}.takeaway-title{color:#fff;font-size:18px;margin:0 0 8px;font-weight:600}.takeaway-description{color:#fffc;font-size:14px;line-height:1.6;margin:0}.modal-actions{display:flex;gap:16px;justify-content:center;padding-top:24px;border-top:1px solid rgba(255,255,255,.1)}.btn-primary,.btn-secondary{padding:14px 32px;border-radius:8px;font-size:16px;font-weight:600;border:none;cursor:pointer;transition:all .3s ease;min-width:180px}.btn-primary{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff;box-shadow:0 4px 15px #f5576c66}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 6px 20px #f5576c99}.btn-secondary{background:#ffffff1a;color:#fff;border:1px solid rgba(255,255,255,.2)}.btn-secondary:hover{background:#ffffff26;transform:translateY(-2px)}.coaching-modal-content::-webkit-scrollbar{width:8px}.coaching-modal-content::-webkit-scrollbar-track{background:#ffffff0d;border-radius:4px}.coaching-modal-content::-webkit-scrollbar-thumb{background:#fff3;border-radius:4px}.coaching-modal-content::-webkit-scrollbar-thumb:hover{background:#ffffff4d}@media (max-width: 768px){.coaching-modal-content{width:95%;padding:24px 16px;max-height:90vh}.modal-title{font-size:22px}.game-summary{flex-direction:column;gap:8px;text-align:center}.takeaway-card{padding:16px}.takeaway-title{font-size:16px}.takeaway-description{font-size:13px}.modal-actions{flex-direction:column}.btn-primary,.btn-secondary{width:100%;min-width:unset}}.coaching-modal{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000d9;display:flex;align-items:center;justify-content:center;z-index:1000;padding:20px;overflow-y:auto}.coaching-content{background:linear-gradient(135deg,#1a1a2e,#16213e);border-radius:20px;max-width:900px;width:100%;max-height:90vh;overflow-y:auto;padding:40px;box-shadow:0 20px 60px #00000080;position:relative;color:#fff}.coaching-content.analyzing{text-align:center;padding:60px}.coaching-content.error{text-align:center;padding:60px;background:linear-gradient(135deg,#2e1a1a,#3e1621)}.spinner{width:60px;height:60px;border:4px solid rgba(16,185,129,.2);border-top-color:#10b981;border-radius:50%;animation:spin 1s ease-in-out infinite;margin:0 auto 20px}@keyframes bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}@keyframes wave{0%,to{transform:rotate(0)}25%{transform:rotate(-10deg)}75%{transform:rotate(10deg)}}@keyframes pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.05);opacity:.9}}.close-button-x{position:absolute;top:20px;right:20px;background:#ffffff1a;border:none;color:#fff;font-size:28px;width:40px;height:40px;border-radius:50%;cursor:pointer;transition:all .3s;display:flex;align-items:center;justify-content:center;line-height:1}.close-button-x:hover{background:#fff3;transform:rotate(90deg)}.coaching-header{text-align:center;margin-bottom:40px}.coaching-header h1{font-size:36px;margin:0 0 10px;color:#fff;font-weight:700}.game-result{font-size:18px;color:#4caf50;font-weight:600}.statistics-card{background:#ffffff0d;border-radius:15px;padding:25px;margin-bottom:30px;border:1px solid rgba(255,255,255,.1)}.statistics-card h3{margin:0 0 20px;color:#fff;font-size:20px}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:15px}.stat-item{background:#ffffff0d;padding:15px;border-radius:10px;text-align:center;border:1px solid rgba(255,255,255,.1)}.stat-label{display:block;font-size:12px;color:#fff9;margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}.stat-value{display:block;font-size:28px;font-weight:700;color:#fff}.stat-item.blunders .stat-value{color:#f44336}.stat-item.mistakes .stat-value{color:#ff9800}.stat-item.inaccuracies .stat-value{color:#ffc107}.stat-item.missed .stat-value{color:#2196f3}.stat-item.violations .stat-value{color:#9c27b0}.improvements-section{margin-bottom:30px}.improvements-section h2{font-size:28px;margin:0 0 20px;color:#fff}.improvement-card{background:#ffffff0d;border-radius:15px;padding:25px;margin-bottom:15px;border-left:4px solid #4CAF50;transition:all .3s}.improvement-card:hover{background:#ffffff14;transform:translate(5px)}.improvement-card.priority-3{border-left-color:#f44336}.improvement-card.priority-2{border-left-color:#ff9800}.improvement-card.priority-1{border-left-color:#ffc107}.improvement-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:15px}.improvement-header h3{margin:0;font-size:20px;color:#fff;flex:1}.move-badge{background:#ffffff1a;color:#fff;padding:4px 12px;border-radius:12px;font-size:12px;font-weight:600;margin-left:10px}.improvement-description{color:#fffc;line-height:1.6;margin:0 0 15px}.category-badge{display:inline-block;padding:6px 12px;border-radius:12px;font-size:12px;font-weight:600}.category-badge.tactical{background:#f4433633;color:#f44336}.category-badge.strategic{background:#2196f333;color:#2196f3}.phase-analysis-section{margin-bottom:30px}.phase-analysis-section h2{font-size:28px;margin:0 0 20px;color:#fff}.phase-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:15px}.phase-card{background:#ffffff0d;border-radius:15px;padding:20px;border:1px solid rgba(255,255,255,.1)}.phase-card h4{margin:0 0 10px;color:#4caf50;font-size:16px}.phase-card p{margin:0;color:#fffc;line-height:1.5;font-size:14px}.focus-section{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:20px;margin-bottom:30px}.focus-card{background:#ffffff0d;border-radius:15px;padding:25px;border:1px solid rgba(255,255,255,.1)}.focus-card.tactical{border-top:3px solid #f44336}.focus-card.strategic{border-top:3px solid #2196f3}.focus-card h3{margin:0 0 15px;font-size:20px;color:#fff}.focus-card p{margin:0;color:#fffc;line-height:1.6}.encouragement-section{background:linear-gradient(135deg,#4caf501a,#2196f31a);border-radius:15px;padding:30px;margin-bottom:30px;border:1px solid rgba(76,175,80,.3)}.encouragement-section h2{margin:0 0 15px;font-size:28px;color:#4caf50}.encouragement-text{margin:0;color:#ffffffe6;line-height:1.7;font-size:16px}.coaching-footer{display:flex;gap:15px;justify-content:center;padding-top:20px;border-top:1px solid rgba(255,255,255,.1)}.primary-button,.secondary-button,.close-button{padding:14px 28px;border-radius:10px;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s;border:none}.primary-button{background:linear-gradient(135deg,#4caf50,#45a049);color:#fff}.primary-button:hover{transform:translateY(-2px);box-shadow:0 5px 15px #4caf5066}.secondary-button{background:#ffffff1a;color:#fff;border:1px solid rgba(255,255,255,.2)}.secondary-button:hover{background:#ffffff26}.insights-chat-button{margin-left:8px}.close-button{background:#ffffff1a;color:#fff;padding:14px 28px}.close-button:hover{background:#ffffff26}.metadata-debug{text-align:center;margin-top:20px;padding-top:15px;border-top:1px solid rgba(255,255,255,.1)}.metadata-debug small{color:#fff6;font-size:11px}@media (max-width: 768px){.coaching-content{padding:25px;max-height:95vh}.coaching-header h1{font-size:28px}.stats-grid{grid-template-columns:repeat(2,1fr)}.phase-grid,.focus-section{grid-template-columns:1fr}.coaching-footer,.improvement-header{flex-direction:column}.move-badge{margin-left:0;margin-top:10px;align-self:flex-start}}.player-progress-section{margin-top:2rem;padding:1.5rem;background:#10b9811a;border:1px solid rgba(16,185,129,.3);border-radius:12px}.player-progress-section h2{color:#10b981;margin-bottom:1rem;font-size:1.5rem}.player-progress-section h3{color:#e2e8f0;margin:1rem 0 .5rem;font-size:1.1rem}.skills-overview{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;margin-bottom:1rem}.skill-item{background:#ffffff0d;padding:.75rem;border-radius:8px;text-align:center;border:1px solid rgba(255,255,255,.1)}.skill-item span{font-weight:600;color:#e2e8f0}.recent-progress{margin-top:1rem;padding:1rem;background:#3b82f61a;border-radius:8px;border:1px solid rgba(59,130,246,.2)}.recent-progress p{margin:.5rem 0;color:#93c5fd}.next-milestone{margin-top:1rem;padding:1rem;background:#fbbf241a;border-radius:8px;border:1px solid rgba(251,191,36,.2);text-align:center}.next-milestone p{margin:0;color:#fde68a;font-size:1rem}.coaching-content::-webkit-scrollbar{width:8px}.coaching-content::-webkit-scrollbar-track{background:#ffffff0d;border-radius:10px}.coaching-content::-webkit-scrollbar-thumb{background:#fff3;border-radius:10px}.coaching-content::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.coaching-mode{min-height:100vh;background:linear-gradient(135deg,#0f172a,#1e293b);color:#e2e8f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.practice-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 2rem;background:#0f172acc;border-bottom:1px solid rgba(148,163,184,.2);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.practice-header h1{margin:0;font-size:1.875rem;font-weight:700;background:linear-gradient(135deg,#f59e0b,#eab308);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.practice-info{display:flex;flex-direction:column;align-items:center;gap:.5rem}.turn-indicator{font-size:1.1rem;padding:.5rem 1rem;background:#3b82f633;border:1px solid rgba(59,130,246,.3);border-radius:8px}.game-result{font-size:1.2rem;font-weight:700;color:#10b981;background:#10b9811a;padding:.5rem 1rem;border-radius:8px;border:1px solid rgba(16,185,129,.3)}.practice-controls{display:flex;gap:1rem}.game-mode-controls{display:flex;flex-direction:column;align-items:center;gap:1rem;margin:1rem 0}.mode-selector{display:flex;gap:.5rem}.mode-btn{padding:.5rem 1rem;border:2px solid rgba(148,163,184,.3);background:#0f172a99;color:#e2e8f0;border-radius:6px;cursor:pointer;transition:all .2s;font-weight:500}.mode-btn.active{background:#3b82f6;border-color:#3b82f6;color:#fff}.mode-btn:hover:not(.active){background:#3b82f633;border-color:#3b82f680}.cpu-controls{display:flex;gap:1rem;align-items:center}.difficulty-select,.color-select{padding:.5rem 1rem;background:#0f172acc;border:1px solid rgba(148,163,184,.3);border-radius:6px;color:#e2e8f0;font-size:.9rem}.difficulty-select:focus,.color-select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f633}.thinking{color:#f59e0b;animation:pulse 1.5s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.6}}.control-btn{padding:.75rem 1.5rem;border:none;border-radius:8px;font-weight:600;cursor:pointer;transition:all .2s;font-size:.95rem}.control-btn.new-game{background:#10b981;color:#fff}.control-btn.new-game:hover{background:#059669;transform:translateY(-1px)}.control-btn.undo{background:#6366f1;color:#fff}.control-btn.undo:hover:not(:disabled){background:#4f46e5;transform:translateY(-1px)}.control-btn.debug{background:#f59e0b;color:#fff}.control-btn.debug:hover{background:#d97706;transform:translateY(-1px)}.control-btn:disabled{background:#64748b;cursor:not-allowed;opacity:.6}.practice-content{display:flex;gap:2rem;padding:2rem;max-width:1400px;margin:0 auto}.board-container{flex:0 0 auto}.chess-board-practice{display:grid;grid-template-columns:repeat(8,60px);grid-template-rows:repeat(8,60px);gap:0;border:4px solid #8b5a3c;border-radius:8px;background:#8b5a3c;box-shadow:0 10px 30px #00000080,inset 0 0 0 2px #8b5a3c4d;transform:perspective(1000px) rotateX(12deg);transform-origin:center bottom}.chess-square{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;-webkit-user-select:none;user-select:none}.chess-square.light{background:linear-gradient(135deg,#f4e4c1,#ede0c4)}.chess-square.dark{background:linear-gradient(135deg,#c19a6b,#a67c5a)}.chess-square:hover{filter:brightness(1.1)}.chess-square.selected{background:radial-gradient(circle,#22c55e66,#22c55e1a 70%);box-shadow:inset 0 0 0 3px #22c55e}.chess-square.legal-move:after{content:"";position:absolute;width:20px;height:20px;background:#3b82f699;border-radius:50%;pointer-events:none}.chess-square.last-move{background:radial-gradient(circle,rgba(251,191,36,.3) 0%,transparent 70%);box-shadow:inset 0 0 0 2px #fbbf2499}.chess-piece{font-size:2.5rem;line-height:1;transition:all .2s;filter:drop-shadow(2px 2px 4px rgba(0,0,0,.3))}.square-coordinates{position:absolute;bottom:2px;right:4px;font-size:8px;font-weight:700;color:#0006;pointer-events:none}.chess-square.light .square-coordinates{color:#0006}.chess-square.dark .square-coordinates{color:#ffffff80}.chess-square.bounce-back .chess-piece{animation:bounceBack .5s cubic-bezier(.68,-.55,.265,1.55)}.chess-square.bounce-back:before{content:"❌ Invalid Move";position:absolute;top:-35px;left:50%;transform:translate(-50%);background:#f44336f2;color:#fff;padding:6px 10px;border-radius:6px;font-size:11px;font-weight:700;white-space:nowrap;z-index:1000;animation:invalidMoveMessage .5s ease-in-out;box-shadow:0 2px 8px #f443364d}@keyframes bounceBack{0%{transform:scale(1)}25%{transform:scale(1.15) translate(10px);filter:drop-shadow(0 0 8px rgba(244,67,54,.6))}50%{transform:scale(.9) translate(-6px)}75%{transform:scale(1.1) translate(3px)}to{transform:scale(1) translate(0)}}@keyframes invalidMoveMessage{0%{opacity:0;transform:translate(-50%) translateY(10px) scale(.8)}30%{opacity:1;transform:translate(-50%) translateY(0) scale(1)}70%{opacity:1;transform:translate(-50%) translateY(0) scale(1)}to{opacity:0;transform:translate(-50%) translateY(-10px) scale(.9)}}.practice-sidebar{flex:1;display:flex;flex-direction:column;gap:1.5rem}.game-info,.move-history,.position-info{background:#0f172a99;border:1px solid rgba(148,163,184,.2);border-radius:12px;padding:1.5rem;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.game-info h3,.move-history h3,.position-info h3{margin:0 0 1rem;font-size:1.2rem;color:#f1f5f9}.info-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;align-items:center}.info-label{color:#94a3b8;font-size:.9rem}.info-value{font-weight:600;color:#e2e8f0;text-align:right}.moves-list{max-height:300px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}.move-item{display:flex;align-items:center;gap:.75rem;padding:.5rem;background:#1e293b80;border-radius:6px;font-size:.9rem}.move-number{color:#94a3b8;min-width:20px}.move-player{color:#60a5fa;min-width:50px}.move-notation{font-family:Courier New,monospace;color:#e2e8f0;font-weight:500}.no-moves{color:#64748b;font-style:italic;text-align:center;padding:1rem}.position-fen{display:flex;flex-direction:column;gap:.5rem}.fen-string{font-family:Courier New,monospace;background:#1e293b80;padding:.75rem;border-radius:6px;font-size:.8rem;word-break:break-all;color:#94a3b8}@media (max-width: 1024px){.practice-content{flex-direction:column;align-items:center}.practice-sidebar{max-width:500px;width:100%}}@media (max-width: 640px){.practice-header{flex-direction:column;gap:1rem;text-align:center}.practice-controls{flex-wrap:wrap;justify-content:center}.chess-board-practice{grid-template-columns:repeat(8,45px);grid-template-rows:repeat(8,45px)}.chess-piece{font-size:2rem}.coaching-content{padding:1rem}}nnn.opening-selector-overlay{n position: fixed;n top: 0;n left: 0;n right: 0;n bottom: 0;n background: rgba(0,0,0,.8);n display: flex;n align-items: center;n justify-content: center;n z-index: 1000;n backdrop-filter: blur(5px);n}nn.opening-selector-modal{n background: linear-gradient(135deg,#0f172a 0%,#1e293b 100%);n border-radius: 16px;n box-shadow: 0 20px 40px rgba(0,0,0,.3);n max-width: 900px;n max-height: 90vh;n overflow-y: auto;n color: #e2e8f0;n border: 1px solid rgba(148,163,184,.2);n padding: 0;n}nn.modal-header{n display: flex;n justify-content: space-between;n align-items: center;n padding: 1.5rem 2rem;n border-bottom: 1px solid rgba(148,163,184,.2);n background: rgba(15,23,42,.5);n}nn.modal-header h2{n margin: 0;n font-size: 1.5rem;n font-weight: 700;n background: linear-gradient(135deg,#f59e0b,#eab308);n -webkit-background-clip: text;n -webkit-text-fill-color: transparent;n background-clip: text;n}nn.difficulty-selector{n padding: 1.5rem 2rem;n border-bottom: 1px solid rgba(148,163,184,.1);n}nn.difficulty-selector h3{n margin: 0 0 1rem 0;n color: #f59e0b;n font-size: 1.1rem;n}nn.difficulty-buttons{n display: flex;n gap: 1rem;n}nn.difficulty-btn{n background: rgba(15,23,42,.6);n border: 1px solid rgba(148,163,184,.3);n border-radius: 8px;n color: #e2e8f0;n padding: .75rem 1.5rem;n cursor: pointer;n transition: all .2s;n font-weight: 600;n}nn.difficulty-btn:hover{n border-color: rgba(148,163,184,.5);n transform: translateY(-2px);n}nn.difficulty-btn.active{n background: linear-gradient(135deg,#3b82f6,#1d4ed8);n border-color: #3b82f6;n color: white;n}nn.openings-grid{n display: grid;n grid-template-columns: repeat(auto-fit,minmax(300px,1fr));n gap: 1.5rem;n padding: 2rem;n}nn.opening-card{n background: rgba(15,23,42,.4);n border: 1px solid rgba(148,163,184,.2);n border-radius: 12px;n padding: 1.5rem;n cursor: pointer;n transition: all .2s;n}nn.opening-card:hover{n border-color: rgba(148,163,184,.4);n transform: translateY(-4px);n box-shadow: 0 8px 24px rgba(0,0,0,.2);n}nn.opening-header{n display: flex;n justify-content: space-between;n align-items: center;n margin-bottom: 1rem;n}nn.opening-header h4{n margin: 0;n font-size: 1.2rem;n color: #f59e0b;n}nn.eco-code{n background: rgba(59,130,246,.2);n color: #93c5fd;n padding: .25rem .5rem;n border-radius: 6px;n font-size: .8rem;n font-weight: 600;n}nn.opening-description{n color: #cbd5e1;n line-height: 1.5;n margin-bottom: 1rem;n font-size: .9rem;n}nn.opening-themes{n display: flex;n flex-wrap: wrap;n gap: .5rem;n margin-bottom: 1rem;n}nn.theme-tag{n background: rgba(34,197,94,.2);n color: #4ade80;n padding: .25rem .5rem;n border-radius: 12px;n font-size: .75rem;n border: 1px solid rgba(34,197,94,.3);n}nn.opening-stats{n display: flex;n justify-content: space-between;n align-items: center;n color: #94a3b8;n font-size: .85rem;n}nn.move-count{n display: flex;n align-items: center;n gap: .25rem;n}nnn.tutorial-panel{n background: rgba(15,23,42,.8);n border-radius: 12px;n padding: 1.5rem;n border: 1px solid rgba(148,163,184,.2);n}nn.tutorial-header{n display: flex;n justify-content: space-between;n align-items: center;n margin-bottom: 1rem;n}nn.tutorial-header h3{n margin: 0;n color: #f59e0b;n font-size: 1.2rem;n}nn.exit-tutorial-btn{n background: rgba(239,68,68,.2);n border: 1px solid rgba(239,68,68,.3);n border-radius: 6px;n color: #fca5a5;n width: 32px;n height: 32px;n display: flex;n align-items: center;n justify-content: center;n cursor: pointer;n transition: all .2s;n}nn.exit-tutorial-btn:hover{n background: rgba(239,68,68,.3);n border-color: rgba(239,68,68,.5);n}nn.tutorial-progress{n margin-bottom: 1.5rem;n}nn.progress-bar{n width: 100%;n height: 8px;n background: rgba(148,163,184,.2);n border-radius: 4px;n overflow: hidden;n margin-bottom: .5rem;n}nn.progress-fill{n height: 100%;n background: linear-gradient(90deg,#f59e0b,#eab308);n transition: width .3s ease;n}nn.progress-text{n color: #94a3b8;n font-size: .9rem;n}nn.current-move-info{n background: rgba(30,41,59,.4);n border-radius: 8px;n padding: 1rem;n margin-bottom: 1.5rem;n border-left: 4px solid #f59e0b;n}nn.current-move-info h4{n margin: 0 0 .5rem 0;n color: #fbbf24;n font-size: 1rem;n}nn.move-explanation{n color: #e2e8f0;n line-height: 1.5;n margin-bottom: .75rem;n}nn.concept-highlight{n background: rgba(59,130,246,.1);n border: 1px solid rgba(59,130,246,.2);n border-radius: 6px;n padding: .5rem;n color: #93c5fd;n font-size: .9rem;n}nn.tutorial-controls{n display: flex;n gap: 1rem;n margin-bottom: 1rem;n}nn.tutorial-btn{n flex: 1;n background: rgba(59,130,246,.2);n border: 1px solid rgba(59,130,246,.3);n border-radius: 8px;n color: #93c5fd;n padding: .75rem;n cursor: pointer;n transition: all .2s;n font-weight: 600;n}nn.tutorial-btn:hover:not(:disabled){n background: rgba(59,130,246,.3);n border-color: rgba(59,130,246,.5);n transform: translateY(-1px);n}nn.tutorial-btn:disabled{n opacity: .5;n cursor: not-allowed;n}nn.tutorial-btn.next{n background: linear-gradient(135deg,#10b981,#059669);n border-color: #10b981;n color: white;n}nn.tutorial-btn.next:hover:not(:disabled){n background: linear-gradient(135deg,#059669,#047857);n border-color: #059669;n}nn.tutorial-completion{n background: rgba(16,185,129,.1);n border: 1px solid rgba(16,185,129,.2);n border-radius: 8px;n padding: 1rem;n margin-top: 1rem;n}nn.tutorial-completion h4{n margin: 0 0 .75rem 0;n color: #4ade80;n}nn.tutorial-completion p{n color: #e2e8f0;n margin-bottom: .75rem;n line-height: 1.5;n}nn.tutorial-completion ul{n color: #cbd5e1;n margin: .5rem 0;n padding-left: 1.5rem;n}nn.tutorial-completion li{n margin-bottom: .25rem;n}nnn.practice-content{n n}nn.practice-header{n n}nn.practice-sidebar{n n}nn.practice-controls{n n}nn@media (max-width: 768px){n .opening-selector-modal{n max-width: 95vw;n margin: 1rem;n}n n .openings-grid{n grid-template-columns: 1fr;n padding: 1rem;n}n n .difficulty-buttons{n flex-direction: column;n}n n .tutorial-controls{n flex-direction: column;n}n}"
.debug-panel{background:#0f172acc;border:2px solid #f59e0b;border-radius:12px;padding:1.5rem;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 0 20px #f59e0b33}.debug-panel h3{color:#f59e0b;margin:0 0 1rem}.debug-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;align-items:center;margin-bottom:1rem}.debug-label{color:#94a3b8;font-size:.9rem}.debug-value{font-weight:600;color:#e2e8f0;text-align:right}.status-thinking{color:#f59e0b!important;animation:pulse 1.5s infinite}.last-move-debug{margin:1rem 0;padding:.75rem;background:#1e293b80;border-radius:6px}.move-result{font-family:Courier New,monospace;margin-top:.5rem;padding:.5rem;border-radius:4px}.move-result.valid{background:#22c55e1a;color:#22c55e}.move-result.invalid{background:#f443361a;color:#ef4444}.validity{font-weight:700}.debug-actions{display:flex;gap:.5rem;flex-wrap:wrap}.debug-btn{background:#6366f1;color:#fff;border:none;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.8rem;transition:background-color .2s}.debug-btn:hover{background:#4f46e5}.debug-btn.copy-btn{background:#10b981}.debug-btn.copy-btn:hover{background:#059669}.status-success{color:#10b981!important;font-weight:600}.status-warning{color:#f59e0b!important;font-weight:600}.status-error{color:#ef4444!important;font-weight:600}.promotion-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;justify-content:center;align-items:center;z-index:1000;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.promotion-dialog{background:linear-gradient(135deg,#1e293b,#334155);padding:2rem;border-radius:16px;border:1px solid rgba(148,163,184,.2);box-shadow:0 25px 50px -12px #00000080;text-align:center;min-width:300px}.promotion-dialog h3{margin:0 0 1.5rem;font-size:1.5rem;color:#f1f5f9}.promotion-pieces{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.promotion-btn{padding:1rem;background:#3b82f633;border:1px solid rgba(59,130,246,.3);border-radius:12px;color:#e2e8f0;font-size:1.1rem;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.promotion-btn:hover{background:#3b82f64d;border-color:#3b82f680;transform:translateY(-2px);box-shadow:0 10px 25px #3b82f633}.analysis-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;justify-content:center;align-items:center;z-index:1000;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);padding:2rem}.analysis-dialog{background:linear-gradient(135deg,#1e293b,#334155);border-radius:16px;border:1px solid rgba(148,163,184,.2);box-shadow:0 25px 50px -12px #00000080;max-width:600px;max-height:80vh;width:100%;display:flex;flex-direction:column;overflow:hidden}.analysis-header{display:flex;justify-content:space-between;align-items:center;padding:1.5rem 2rem;border-bottom:1px solid rgba(148,163,184,.2);background:#0f172a80}.analysis-header h3{margin:0;font-size:1.5rem;color:#f1f5f9;display:flex;align-items:center;gap:.5rem}.close-analysis{background:#ef444433;border:1px solid rgba(239,68,68,.3);color:#fca5a5;padding:.5rem;border-radius:8px;cursor:pointer;font-size:1.2rem;transition:all .2s ease;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.close-analysis:hover{background:#ef44444d;border-color:#ef444480}.analysis-content{flex:1;padding:2rem;overflow-y:auto}.analyzing{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;min-height:200px}.spinner{font-size:3rem;animation:spin 2s linear infinite}.analyzing p{font-size:1.1rem;color:#94a3b8}.analysis-text{line-height:1.6;color:#e2e8f0}.analysis-text p{margin:0 0 1rem}.analysis-text p:last-child{margin-bottom:0}.analysis-actions{display:flex;gap:1rem;padding:1.5rem 2rem;border-top:1px solid rgba(148,163,184,.2);background:#0f172a80}.analysis-actions .control-btn{flex:1}.new-game{background:linear-gradient(135deg,#16a34a,#15803d)!important;border:1px solid rgba(34,197,94,.3)!important}.new-game:hover{background:linear-gradient(135deg,#15803d,#166534)!important;border-color:#22c55e80!important}.tips-section{padding:0}.tips-section h4{margin:0 0 1.5rem;font-size:1.25rem;color:#f1f5f9;display:flex;align-items:center;gap:.5rem}.tips-list{display:flex;flex-direction:column;gap:1rem}.tip-item{display:flex;align-items:flex-start;gap:1rem;padding:1rem;background:#3b82f61a;border:1px solid rgba(59,130,246,.2);border-radius:12px;transition:all .2s ease}.tip-item:hover{background:#3b82f626;border-color:#3b82f64d;transform:translateY(-1px)}.tip-number{background:linear-gradient(135deg,#3b82f6,#1d4ed8);color:#fff;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:.9rem;flex-shrink:0}.tip-text{color:#e2e8f0;line-height:1.5;font-size:.95rem}.chat-mode{display:flex;flex-direction:column;height:400px}.chat-messages{flex:1;overflow-y:auto;padding:1rem 0;display:flex;flex-direction:column;gap:1rem}.message{display:flex;flex-direction:column}.message.user{align-items:flex-end}.message.assistant{align-items:flex-start}.message-content{max-width:80%;padding:.75rem 1rem;border-radius:12px;color:#f1f5f9;line-height:1.4;font-size:.9rem}.message.user .message-content{background:linear-gradient(135deg,#3b82f6,#1d4ed8);border-bottom-right-radius:4px}.message.assistant .message-content{background:#475569cc;border:1px solid rgba(148,163,184,.2);border-bottom-left-radius:4px}.chat-input-area{display:flex;gap:.75rem;padding:1rem 0 0;border-top:1px solid rgba(148,163,184,.2)}.chat-input{flex:1;padding:.75rem 1rem;background:#334155cc;border:1px solid rgba(148,163,184,.3);border-radius:8px;color:#e2e8f0;font-size:.9rem;outline:none;transition:all .2s ease}.chat-input:focus{border-color:#3b82f680;background:#334155e6}.chat-input::placeholder{color:#94a3b8}.send-btn{padding:.75rem;background:linear-gradient(135deg,#3b82f6,#1d4ed8);border:1px solid rgba(59,130,246,.3);border-radius:8px;color:#fff;cursor:pointer;transition:all .2s ease;font-size:1.1rem;display:flex;align-items:center;justify-content:center;min-width:44px}.send-btn:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af);border-color:#3b82f680;transform:translateY(-1px)}.insights-btn{background:linear-gradient(135deg,#8b5cf6,#7c3aed)!important;border:1px solid rgba(139,92,246,.3)!important}.insights-btn:hover{background:linear-gradient(135deg,#7c3aed,#6d28d9)!important;border-color:#8b5cf680!important}.chess-piece{font-size:2.5rem;display:flex;align-items:center;justify-content:center;transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:center;cursor:pointer;-webkit-user-select:none;user-select:none}.chess-piece.black-piece{color:#1e1e1e!important;text-shadow:0 0 3px rgba(255,255,255,.8),1px 1px 2px rgba(255,255,255,.5),0 0 1px rgba(255,255,255,.3)!important;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}.chess-piece.white-piece{color:#f8f8f8!important;text-shadow:0 0 3px rgba(0,0,0,.9),1px 1px 3px rgba(0,0,0,.7),0 0 1px rgba(0,0,0,.5)!important;filter:drop-shadow(0 2px 4px rgba(0,0,0,.4))}.chess-piece:hover{transform:scale(1.05);filter:drop-shadow(0 4px 12px rgba(0,0,0,.5))}.chess-square.selected .chess-piece{transform:scale(1.08);animation:selectedPiece 1.5s ease-in-out infinite alternate}@keyframes selectedPiece{0%{transform:scale(1.08)}to{transform:scale(1.12)}}.chess-square{transition:all .25s ease;position:relative;cursor:pointer}.chess-square:hover{transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.chess-square.selected{background:radial-gradient(circle,#3b82f666,#3b82f633)!important;border:2px solid #3b82f6;box-shadow:0 0 20px #3b82f64d,inset 0 0 20px #3b82f61a;animation:selectedSquare 2s ease-in-out infinite}.chess-square.legal-move:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:24px;height:24px;border-radius:50%;background:#22c55ecc;box-shadow:0 0 10px #22c55e99;animation:legalMoveIndicator 2s ease-in-out infinite}.chess-square.legal-move.has-piece:after{width:calc(100% - 8px);height:calc(100% - 8px);border-radius:8px;background:#ef444433;border:3px solid #ef4444;box-shadow:0 0 15px #ef444466,inset 0 0 10px #ef44441a}.chess-square.last-move{background:linear-gradient(135deg,#fbbf244d,#fbbf241a,#fbbf244d)!important;box-shadow:inset 0 0 20px #fbbf2433;animation:lastMoveGlow 3s ease-in-out}@keyframes selectedSquare{0%,to{box-shadow:0 0 20px #3b82f64d,inset 0 0 20px #3b82f61a}50%{box-shadow:0 0 30px #3b82f680,inset 0 0 30px #3b82f633}}@keyframes legalMoveIndicator{0%,to{opacity:.7;transform:translate(-50%,-50%) scale(1)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.1)}}@keyframes lastMoveGlow{0%{box-shadow:inset 0 0 20px #fbbf2466}50%{box-shadow:inset 0 0 30px #fbbf2433}to{box-shadow:inset 0 0 10px #fbbf241a}}@keyframes pieceCapture{0%{transform:scale(1) rotate(0);opacity:1}50%{transform:scale(1.2) rotate(180deg);opacity:.8}to{transform:scale(0) rotate(360deg);opacity:0}}@keyframes pieceLanding{0%{transform:scale(.8) translateY(-10px);opacity:.7}50%{transform:scale(1.1) translateY(-5px);opacity:.9}to{transform:scale(1) translateY(0);opacity:1}}@keyframes pieceHover{0%{transform:scale(1);filter:brightness(1)}to{transform:scale(1.08);filter:brightness(1.2)}}@keyframes boardShimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@keyframes checkWarning{0%,to{box-shadow:0 0 20px #ef444499;border:2px solid rgba(239,68,68,.8)}50%{box-shadow:0 0 40px #ef4444e6;border:2px solid rgba(239,68,68,1)}}.chess-square.captured-piece{animation:pieceCapture .6s ease-out forwards}.chess-square.new-piece{animation:pieceLanding .4s ease-out}.chess-piece:hover{animation:pieceHover .3s ease forwards;cursor:grab}.chess-piece:active{cursor:grabbing;transform:scale(1.12) rotate(2deg);filter:brightness(1.3) drop-shadow(0 8px 16px rgba(0,0,0,.4))}.chess-square.king-in-check{animation:checkWarning 1.5s ease-in-out infinite;background:radial-gradient(circle,#ef44444d,#ef44441a)!important}.chess-board{position:relative;overflow:visible}.chess-board:before{content:"";position:absolute;top:-5px;left:-5px;right:-5px;bottom:-5px;background:linear-gradient(45deg,#8b5cf61a,#3b82f61a,#10b9811a,#fbbf241a);background-size:400% 400%;animation:boardShimmer 3s ease-in-out infinite;border-radius:12px;z-index:-1}.cpu-thinking .chess-board{filter:brightness(.9)}.cpu-thinking .chess-board:after{content:"CPU Thinking...";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#000c;color:#f1f5f9;padding:1rem 2rem;border-radius:8px;font-weight:600;z-index:100;animation:pulse 1.5s ease-in-out infinite}.copy-btn,.copy-debug-btn{background:linear-gradient(135deg,#10b981,#059669)!important;border:1px solid rgba(16,185,129,.3)!important;transition:all .3s ease!important;font-weight:500!important;position:relative;overflow:hidden}.copy-btn:hover,.copy-debug-btn:hover{background:linear-gradient(135deg,#059669,#047857)!important;border-color:#10b98180!important;transform:translateY(-2px)!important;box-shadow:0 6px 20px #10b98166!important}.copy-debug-btn.copied{background:linear-gradient(135deg,#22c55e,#16a34a)!important;border-color:#22c55e80!important}.chess-piece{transition:all .3s cubic-bezier(.4,0,.2,1);transform-origin:center;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}.chess-piece:hover{transform:scale(1.05);filter:drop-shadow(0 4px 8px rgba(0,0,0,.4))}.chess-piece.black-piece{color:#1a1a1a!important;text-shadow:0 0 2px rgba(255,255,255,.3)}.chess-piece.white-piece{color:#f8f8f8!important;text-shadow:0 0 2px rgba(0,0,0,.5)}.chess-square{transition:all .2s ease;position:relative}.chess-square.selected{background:radial-gradient(circle,#3b82f666,#3b82f633)!important;border:2px solid #3b82f6;animation:pulse 1.5s ease-in-out infinite alternate}.chess-square.legal-move{position:relative}.chess-square.legal-move:before{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:20px;height:20px;border-radius:50%;background:#22c55ecc;animation:moveIndicator 2s ease-in-out infinite}.chess-square.legal-move.has-piece:before{width:100%;height:100%;border-radius:0;background:#ef44444d;border:3px solid #ef4444}.chess-square.last-move{background:linear-gradient(45deg,rgba(251,191,36,.3) 25%,transparent 25%,transparent 75%,rgba(251,191,36,.3) 75%);animation:lastMoveGlow 3s ease-in-out}@keyframes pulse{0%{box-shadow:0 0 #3b82f666}to{box-shadow:0 0 20px 10px #3b82f61a}}@keyframes moveIndicator{0%,to{opacity:.6;transform:translate(-50%,-50%) scale(1)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.2)}}@keyframes lastMoveGlow{0%{box-shadow:inset 0 0 20px #fbbf2480}50%{box-shadow:inset 0 0 30px #fbbf244d}to{box-shadow:inset 0 0 10px #fbbf2433}}@keyframes pieceMove{0%{transform:scale(1)}50%{transform:scale(1.1)}to{transform:scale(1)}}.chess-piece.moving{animation:pieceMove .3s ease-in-out}.debug-actions{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(148,163,184,.2)}.debug-btn{width:100%;padding:.75rem;font-size:.9rem;border-radius:8px;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;justify-content:center;gap:.5rem;margin-bottom:.5rem;background:#475569cc;border:1px solid rgba(148,163,184,.3);color:#e2e8f0}.debug-btn:hover{background:#475569;border-color:#94a3b880;transform:translateY(-1px)}.debug-btn.performance-btn{background:linear-gradient(135deg,#f59e0b,#d97706);border-color:#f59e0b4d}.debug-btn.performance-btn:hover{background:linear-gradient(135deg,#d97706,#b45309);border-color:#f59e0b80}.debug-btn.analysis-btn{background:linear-gradient(135deg,#8b5cf6,#7c3aed);border-color:#8b5cf64d}.debug-btn.analysis-btn:hover{background:linear-gradient(135deg,#7c3aed,#6d28d9);border-color:#8b5cf680}.debug-btn.validation-btn{background:linear-gradient(135deg,#06b6d4,#0891b2);border-color:#06b6d44d}.debug-btn.validation-btn:hover{background:linear-gradient(135deg,#0891b2,#0e7490);border-color:#06b6d480}.board-wrapper{display:flex;flex-direction:column;align-items:center}.file-labels{display:flex;align-items:center;margin:4px 0}.file-labels .rank-space{width:20px;height:20px}.file-label{width:60px;height:20px;display:flex;align-items:center;justify-content:center;font-weight:700;color:#94a3b8;font-size:14px}.board-with-ranks{display:flex;align-items:center}.rank-labels{display:flex;flex-direction:column;margin:0 4px}.rank-label{width:20px;height:60px;display:flex;align-items:center;justify-content:center;font-weight:700;color:#94a3b8;font-size:14px}.piece{font-size:48px!important;text-shadow:2px 2px 4px rgba(0,0,0,.8);filter:drop-shadow(1px 1px 2px rgba(0,0,0,.9))}.piece.wk,.piece.wq,.piece.wr,.piece.wb,.piece.wn,.piece.wp{color:#fff;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,2px 2px 4px rgba(0,0,0,.8)}.piece.bk,.piece.bq,.piece.br,.piece.bb,.piece.bn,.piece.bp{color:#1f2937;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,1px 1px 2px rgba(255,255,255,.8)}.cpu-debug-panel{background:linear-gradient(135deg,#1e293b,#334155);border:2px solid #475569;border-radius:12px;padding:20px;margin:20px 0;color:#e2e8f0}.cpu-debug-panel h3{color:#fbbf24;margin:0 0 15px;font-size:18px}.debug-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-bottom:15px}.debug-item{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#0f172a99;border-radius:6px;border:1px solid #475569}.debug-item label{font-weight:700;color:#94a3b8}.debug-item span.thinking{color:#fbbf24;animation:pulse 1.5s infinite}.debug-item span.idle{color:#64748b}.debug-item span.cpu-turn{color:#10b981}.debug-item span.human-turn{color:#06b6d4}.cpu-thinking{background:#fbbf241a;border:1px solid #fbbf24;border-radius:8px;padding:15px;margin:15px 0}.cpu-thinking h4{color:#fbbf24;margin:0 0 10px}.thinking-details p{margin:5px 0;color:#e2e8f0}.debug-actions{display:flex;gap:10px;margin-top:15px}.debug-btn{background:linear-gradient(135deg,#6366f1,#4f46e5);border:1px solid rgba(99,102,241,.3);color:#fff;padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px;transition:all .2s ease}.debug-btn:hover{background:linear-gradient(135deg,#4f46e5,#4338ca);border-color:#6366f180}.debug-btn.force-cpu{background:linear-gradient(135deg,#f59e0b,#d97706);border-color:#f59e0b4d}.debug-btn.force-cpu:hover{background:linear-gradient(135deg,#d97706,#b45309);border-color:#f59e0b80}.debug-btn:disabled{background:#374151;color:#6b7280;cursor:not-allowed;border-color:#374151}@keyframes pulse{0%,to{opacity:1}50%{opacity:.7}}.game-history-section{background:#10b9811a;border:1px solid #10b981;border-radius:8px;padding:15px;margin:15px 0}.game-history-section h4{color:#10b981;margin:0 0 10px;font-size:16px}.history-list{max-height:200px;overflow-y:auto;background:#0f172a99;border:1px solid #475569;border-radius:6px;padding:10px}.history-entry{display:flex;align-items:center;gap:8px;padding:4px 0;border-bottom:1px solid #475569;font-size:12px;line-height:1.3;color:#e2e8f0}.history-entry:last-child{border-bottom:none}.history-entry.success{color:#10b981}.history-entry.failed{color:#ef4444}.history-time{font-weight:700;min-width:70px;color:#94a3b8;font-family:monospace}.history-icon{min-width:35px}.history-player{min-width:60px;font-weight:700;color:#fbbf24}.history-action{min-width:90px;text-transform:capitalize}.history-square{background:#3b82f633;color:#3b82f6;padding:2px 6px;border-radius:4px;font-family:monospace;font-weight:700}.history-move{background:#10b98133;color:#10b981;padding:2px 6px;border-radius:4px;font-family:monospace;font-weight:700}.history-reason{color:#94a3b8;font-style:italic;opacity:.9}.history-empty{text-align:center;color:#64748b;font-style:italic;padding:20px}.debug-btn.clear-history{background:linear-gradient(135deg,#ef4444,#dc2626);border-color:#ef44444d}.debug-btn.clear-history:hover{background:linear-gradient(135deg,#dc2626,#b91c1c);border-color:#ef444480}.coaching-header{padding:20px;background:#0f172acc;border-bottom:2px solid #475569}.header-row-1,.header-row-2,.header-row-3,.header-row-4,.header-row-5{margin:10px 0;display:flex;align-items:center;justify-content:center}.header-row-1 h1{margin:0;color:#fbbf24;font-size:28px;text-align:center}.mode-controls{display:flex;align-items:center;gap:15px;flex-wrap:wrap;justify-content:center}.mode-btn{padding:10px 20px;border:2px solid #475569;border-radius:8px;background:linear-gradient(135deg,#1e293b,#334155);color:#e2e8f0;cursor:pointer;transition:all .2s ease;font-weight:700}.mode-btn.active{background:linear-gradient(135deg,#3b82f6,#2563eb);border-color:#3b82f6;color:#fff}.difficulty-select{padding:8px 12px;border:1px solid #475569;border-radius:6px;background:#334155;color:#e2e8f0;font-size:14px}.color-indicator{background:#3b82f61a;border:1px solid #3b82f6;border-radius:8px;padding:8px 16px;color:#93c5fd;font-weight:700;text-align:center}.game-status{background:#0f172a99;border:1px solid #475569;border-radius:8px;padding:10px 20px;color:#cbd5e1;text-align:center;font-weight:700;width:100%;max-width:600px}.game-controls{display:flex;gap:15px;flex-wrap:wrap;justify-content:center}.control-btn{padding:10px 20px;border:2px solid #475569;border-radius:8px;background:linear-gradient(135deg,#059669,#047857);color:#fff;cursor:pointer;transition:all .2s ease;font-weight:700}.control-btn:hover{background:linear-gradient(135deg,#047857,#065f46);border-color:#059669}.control-btn.debug{background:linear-gradient(135deg,#f59e0b,#d97706);border-color:#f59e0b4d}.control-btn.debug:hover{background:linear-gradient(135deg,#d97706,#b45309);border-color:#f59e0b80}.control-btn:disabled{background:#374151;color:#6b7280;cursor:not-allowed;border-color:#374151}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.debug-panel-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000d9;display:flex;align-items:center;justify-content:center;z-index:2000;animation:fadeIn .2s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.debug-panel-enhanced{background:#0f172afa;border:1px solid rgba(59,130,246,.3);border-radius:16px;width:90%;max-width:900px;max-height:90vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px #000c,0 0 0 1px #3b82f633;animation:slideUp .3s ease-out}@keyframes slideUp{0%{transform:translateY(50px);opacity:0}to{transform:translateY(0);opacity:1}}.debug-panel-header{display:flex;justify-content:space-between;align-items:center;padding:1.25rem 1.5rem;background:linear-gradient(135deg,#2563eb33,#3b82f61a);border-bottom:1px solid rgba(59,130,246,.3)}.debug-panel-header h2{margin:0;font-size:1.4rem;color:#e2e8f0;font-weight:600}.debug-close-btn{background:#ffffff1a;border:1px solid rgba(255,255,255,.2);color:#e2e8f0;font-size:1.5rem;width:36px;height:36px;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s}.debug-close-btn:hover{background:#ef44444d;border-color:#ef444480;transform:scale(1.1)}.debug-panel-content{padding:1.5rem;overflow-y:auto;flex:1}.debug-section{margin-bottom:1.5rem;padding:1rem;background:#1e293b66;border:1px solid rgba(148,163,184,.2);border-radius:10px}.debug-section:last-child{margin-bottom:0}.debug-section h4{margin:0 0 .75rem;font-size:.95rem;color:#94a3b8;text-transform:uppercase;letter-spacing:.05em;font-weight:600}.debug-grid{display:grid;grid-template-columns:auto 1fr;gap:.5rem 1rem;font-size:.9rem}.debug-label{color:#94a3b8;font-weight:500}.debug-value{color:#e2e8f0;font-family:Courier New,monospace}.debug-value.status-active{color:#fbbf24;font-weight:600}.debug-value.status-idle,.debug-value.status-success{color:#10b981}.debug-value.status-warning{color:#f59e0b}.debug-value.status-error{color:#ef4444;font-weight:600}.debug-value.turn-white{color:#f1f5f9;font-weight:600}.debug-value.turn-black{color:#64748b;font-weight:600}.debug-error-box{margin-top:.75rem;padding:.75rem;background:#ef44441a;border:1px solid rgba(239,68,68,.3);border-radius:6px}.debug-error-box strong{color:#fca5a5;display:block;margin-bottom:.25rem}.debug-error-box p{margin:0;color:#fecaca;font-size:.85rem}.debug-actions{margin-top:.75rem;display:flex;gap:.5rem;flex-wrap:wrap}.debug-btn{padding:.5rem 1rem;border:1px solid;border-radius:6px;font-size:.85rem;font-weight:500;cursor:pointer;transition:all .2s;display:flex;align-items:center;gap:.25rem}.debug-btn:disabled{opacity:.5;cursor:not-allowed}.debug-btn-primary{background:#3b82f633;border-color:#3b82f666;color:#93c5fd}.debug-btn-primary:hover:not(:disabled){background:#3b82f64d;border-color:#3b82f699;transform:translateY(-1px)}.debug-btn-warning{background:#f59e0b33;border-color:#f59e0b66;color:#fbbf24}.debug-btn-warning:hover:not(:disabled){background:#f59e0b4d;border-color:#f59e0b99}.debug-btn-info{background:#6366f133;border-color:#6366f166;color:#a5b4fc}.debug-btn-info:hover:not(:disabled){background:#6366f14d;border-color:#6366f199}.debug-btn-success{background:#10b98133;border-color:#10b98166;color:#6ee7b7}.debug-btn-success:hover:not(:disabled){background:#10b9814d;border-color:#10b98199}.debug-btn-danger{background:#ef444433;border-color:#ef444466;color:#fca5a5}.debug-btn-danger:hover:not(:disabled){background:#ef44444d;border-color:#ef444499}.debug-move-history{max-height:300px;overflow-y:auto}.debug-move-list{display:flex;flex-direction:column;gap:.5rem}.debug-move-item{display:grid;grid-template-columns:50px 100px 1fr 30px;align-items:center;padding:.5rem;background:#1e293b99;border:1px solid rgba(148,163,184,.2);border-radius:6px;font-size:.85rem}.debug-move-item.success{border-left:3px solid #10b981}.move-number{color:#64748b;font-weight:600}.move-player{color:#94a3b8}.move-notation{color:#e2e8f0;font-family:Courier New,monospace;font-weight:500}.move-source{font-size:1.1rem;text-align:center}.debug-empty{color:#64748b;text-align:center;padding:1rem;font-style:italic}.debug-error-list{max-height:200px;overflow-y:auto;display:flex;flex-direction:column;gap:.5rem}.debug-error-item{display:grid;grid-template-columns:100px 100px 1fr;align-items:center;padding:.5rem;background:#ef44441a;border:1px solid rgba(239,68,68,.3);border-left:3px solid #ef4444;border-radius:6px;font-size:.85rem}.error-time{color:#94a3b8;font-size:.75rem}.error-move{color:#fca5a5;font-family:Courier New,monospace;font-weight:600}.error-reason{color:#fecaca}.debug-mono-box{background:#0000004d;padding:.75rem;border-radius:6px;font-family:Courier New,monospace;font-size:.8rem}.mono-label{color:#64748b;font-weight:600;margin-top:.5rem}.mono-label:first-child{margin-top:0}.mono-value{color:#e2e8f0;word-break:break-all;margin-bottom:.5rem}.debug-button-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.5rem}.debug-button-grid .debug-btn{justify-content:center}.coaching-board-container{perspective:1000px;display:flex;justify-content:center;align-items:center;padding:2rem}.chess-board-practice{display:grid;grid-template-columns:repeat(8,70px);grid-template-rows:repeat(8,70px);gap:0;border:4px solid #2d3748;border-radius:12px;box-shadow:0 10px 40px #00000080,0 0 0 1px #ffffff1a,inset 0 0 20px #0000004d;background:linear-gradient(135deg,#1a202c,#2d3748);animation:boardEntrance .6s cubic-bezier(.34,1.56,.64,1)}@keyframes boardEntrance{0%{opacity:0;transform:scale(.9) rotateX(10deg)}to{opacity:1;transform:scale(1) rotateX(0)}}.square{width:70px;height:70px;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer;transition:all .2s cubic-bezier(.4,0,.2,1)}.square.light{background:linear-gradient(135deg,#f0d9b5,#e8d1a7)}.square.dark{background:linear-gradient(135deg,#b58863,#a87852)}.square:hover{filter:brightness(1.1);transform:scale(1.02)}.square.selected{background:linear-gradient(135deg,#7cb342,#689f38)!important;box-shadow:inset 0 0 0 3px #9ccc65,0 0 15px #7cb34299;animation:selectedPulse 1.5s ease-in-out infinite}@keyframes selectedPulse{0%,to{box-shadow:inset 0 0 0 3px #9ccc65,0 0 15px #7cb34299}50%{box-shadow:inset 0 0 0 3px #aed581,0 0 25px #7cb342cc}}.square.legal-move{position:relative}.square.legal-move:after{content:"";position:absolute;width:20px;height:20px;background:#7cb34280;border-radius:50%;border:2px solid rgba(124,179,66,.8);animation:legalMovePulse 1.2s ease-in-out infinite}@keyframes legalMovePulse{0%,to{transform:scale(1);opacity:.7}50%{transform:scale(1.2);opacity:1}}.square.last-move{background:linear-gradient(135deg,#ffd54f,#ffc107)!important;box-shadow:inset 0 0 0 2px #ffeb3b,0 0 12px #ffd54f80;animation:lastMoveGlow 1s ease-in-out}@keyframes lastMoveGlow{0%{box-shadow:inset 0 0 0 2px #ffeb3b,0 0 30px #ffd54f}to{box-shadow:inset 0 0 0 2px #ffeb3b,0 0 12px #ffd54f80}}.piece{font-size:48px;cursor:grab;-webkit-user-select:none;user-select:none;transition:all .3s cubic-bezier(.34,1.56,.64,1);filter:drop-shadow(0 4px 8px rgba(0,0,0,.4));animation:pieceEntrance .4s cubic-bezier(.34,1.56,.64,1)}@keyframes pieceEntrance{0%{opacity:0;transform:scale(0) rotate(-180deg)}to{opacity:1;transform:scale(1) rotate(0)}}.piece:hover{transform:scale(1.15) translateY(-2px);filter:drop-shadow(0 6px 12px rgba(0,0,0,.5)) brightness(1.1)}.piece:active{cursor:grabbing;transform:scale(1.05)}.piece.bp,.piece.br,.piece.bn,.piece.bb,.piece.bq,.piece.bk{color:#1a1a1a;text-shadow:0 2px 4px rgba(0,0,0,.6),0 0 8px rgba(255,255,255,.1)}.piece.wp,.piece.wr,.piece.wn,.piece.wb,.piece.wq,.piece.wk{background:linear-gradient(135deg,#ef4444,#dc2626,#b91c1c);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:redGlow 2s ease-in-out infinite;text-shadow:none;filter:drop-shadow(0 4px 8px rgba(220,38,38,.6)) drop-shadow(0 0 12px rgba(239,68,68,.4))}@keyframes redGlow{0%,to{filter:drop-shadow(0 4px 8px rgba(220,38,38,.6)) drop-shadow(0 0 12px rgba(239,68,68,.4)) brightness(1)}50%{filter:drop-shadow(0 4px 8px rgba(220,38,38,.8)) drop-shadow(0 0 20px rgba(239,68,68,.7)) brightness(1.2)}}.piece.wp:hover,.piece.wr:hover,.piece.wn:hover,.piece.wb:hover,.piece.wq:hover,.piece.wk:hover{animation:redGlowHover .5s ease-in-out infinite}@keyframes redGlowHover{0%,to{filter:drop-shadow(0 6px 12px rgba(220,38,38,.8)) drop-shadow(0 0 24px rgba(239,68,68,.6)) brightness(1.3)}50%{filter:drop-shadow(0 6px 12px rgba(220,38,38,1)) drop-shadow(0 0 30px rgba(239,68,68,.8)) brightness(1.5)}}.piece.wp,.piece.wr,.piece.wn,.piece.wb,.piece.wq,.piece.wk{position:relative}.piece.wp:before,.piece.wr:before,.piece.wn:before,.piece.wb:before,.piece.wq:before,.piece.wk:before{content:"";position:absolute;top:50%;left:50%;width:60px;height:60px;background:radial-gradient(circle,rgba(239,68,68,.3) 0%,transparent 70%);border-radius:50%;transform:translate(-50%,-50%);animation:redPulseRing 2s ease-in-out infinite;pointer-events:none;z-index:-1}@keyframes redPulseRing{0%,to{transform:translate(-50%,-50%) scale(.8);opacity:.5}50%{transform:translate(-50%,-50%) scale(1.2);opacity:.8}}.piece.moving{animation:pieceMove .3s cubic-bezier(.34,1.56,.64,1);z-index:100}@keyframes pieceMove{0%{transform:scale(1.3) rotate(0)}50%{transform:scale(1.5) rotate(5deg)}to{transform:scale(1) rotate(0)}}.square.capturing .piece{animation:pieceCaptured .5s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes pieceCaptured{0%{transform:scale(1) rotate(0);opacity:1}50%{transform:scale(1.3) rotate(180deg);opacity:.5}to{transform:scale(0) rotate(360deg);opacity:0}}.cpu-thinking-overlay{position:fixed;bottom:20px;right:20px;background:linear-gradient(135deg,#ef4444f2,#dc2626f2);color:#fff;padding:16px 24px;border-radius:12px;box-shadow:0 8px 24px #ef444466,0 0 40px #ef444433;display:flex;align-items:center;gap:12px;z-index:1000;animation:cpuThinkingSlide .3s ease-out,cpuThinkingPulse 1.5s ease-in-out infinite}@keyframes cpuThinkingSlide{0%{transform:translate(100px);opacity:0}to{transform:translate(0);opacity:1}}@keyframes cpuThinkingPulse{0%,to{box-shadow:0 8px 24px #ef444466,0 0 40px #ef444433}50%{box-shadow:0 8px 24px #ef444499,0 0 60px #ef444466}}.cpu-thinking-spinner{width:24px;height:24px;border:3px solid rgba(255,255,255,.3);border-top:3px solid white;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.chess-board-practice.cpu-turn{box-shadow:0 10px 40px #00000080,0 0 0 4px #ef444466,0 0 40px #ef44444d;animation:cpuTurnGlow 2s ease-in-out infinite}@keyframes cpuTurnGlow{0%,to{box-shadow:0 10px 40px #00000080,0 0 0 4px #ef44444d,0 0 40px #ef444433}50%{box-shadow:0 10px 40px #00000080,0 0 0 4px #ef444499,0 0 60px #ef444466}}.piece-trail{position:absolute;pointer-events:none;z-index:99}.piece-trail.red{background:radial-gradient(circle,rgba(239,68,68,.6) 0%,transparent 70%);width:60px;height:60px;border-radius:50%;animation:trailFade .5s ease-out forwards}@keyframes trailFade{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(2)}}@media (max-width: 768px){.chess-board-practice{grid-template-columns:repeat(8,50px);grid-template-rows:repeat(8,50px)}.square{width:50px;height:50px}.piece{font-size:36px}}.admin-unlock-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:1000}.admin-unlock-modal{background:#2a2a2a;border-radius:12px;padding:40px;max-width:500px;width:90%;box-shadow:0 10px 40px #00000080}.admin-unlock-modal h2{margin:0 0 8px;color:#fff;text-align:center}.subtitle{text-align:center;color:#999;margin:0 0 24px}.admin-unlock-modal form{display:flex;flex-direction:column;gap:16px}.admin-unlock-modal input[type=password]{padding:12px;background:#1a1a1a;border:2px solid #3a3a3a;border-radius:6px;color:#fff;font-size:16px}.admin-unlock-modal input[type=password]:focus{outline:none;border-color:#4a9eff}.error-message{background:#3a2020;border:1px solid #dc3545;border-radius:4px;padding:12px;color:#ff6b6b;text-align:center}.button-row{display:flex;gap:10px}.admin-unlock-modal button{flex:1;padding:12px;border:none;border-radius:6px;font-size:16px;cursor:pointer;transition:all .2s}.admin-unlock-modal button[type=submit]{background:#4a9eff;color:#fff}.admin-unlock-modal button[type=submit]:hover:not(:disabled){background:#3a8eef}.admin-unlock-modal button[type=submit]:disabled{background:#3a3a3a;color:#666;cursor:not-allowed}.diagnostics-button{background:#6c757d;color:#fff}.diagnostics-button:hover:not(:disabled){background:#5a6268}.diagnostics-results{margin-top:20px;padding:16px;background:#1a1a1a;border-radius:6px;border:1px solid #3a3a3a}.diagnostics-results h3{margin-top:0;color:#fff}.diagnostic-item{margin:12px 0;padding:8px;background:#2a2a2a;border-radius:4px}.diagnostic-item strong{color:#4a9eff}.status-healthy{color:#28a745}.status-degraded{color:#ffc107}.status-unhealthy,.status-error{color:#dc3545}.diagnostic-item ul{margin:8px 0;padding-left:20px}.diagnostic-item li{color:#ffc107;margin:4px 0}.system-health-tab{display:flex;flex-direction:column;gap:20px}.health-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.health-header h2{margin:0;color:#fff}.health-controls{display:flex;align-items:center;gap:15px}.health-controls label{display:flex;align-items:center;gap:8px;color:#999}.health-controls button{padding:8px 16px;background:#4a9eff;color:#fff;border:none;border-radius:4px;cursor:pointer}.health-card{background:#1a1a1a;border:2px solid #3a3a3a;border-radius:8px;padding:20px}.health-card h3{margin:0 0 16px;color:#fff}.health-card.status-healthy{border-color:#28a745}.health-card.status-degraded{border-color:#ffc107}.health-card.status-unhealthy{border-color:#dc3545}.status-badge{font-size:24px;font-weight:700;margin:12px 0}.status-healthy .status-badge{color:#28a745}.status-degraded .status-badge{color:#ffc107}.status-unhealthy .status-badge{color:#dc3545}.timestamp,.uptime{color:#999;font-size:14px;margin:4px 0}.health-details{display:flex;flex-direction:column;gap:8px}.detail-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #3a3a3a}.detail-row:last-child{border-bottom:none}.detail-row span:first-child{color:#999}.detail-row span:last-child{color:#fff;font-weight:500}.text-success{color:#28a745!important}.text-error{color:#dc3545!important}.text-warning{color:#ffc107!important}.recommendations{border-color:#ffc107}.recommendations h3{color:#ffc107}.recommendations ul{margin:0;padding-left:20px}.recommendations li{color:#e0e0e0;margin:8px 0}.knowledge-vault-tab{display:flex;flex-direction:column;height:100%}.vault-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.vault-header h2{margin:0;color:#fff}.vault-actions{display:flex;gap:10px}.vault-actions button{padding:8px 16px;background:#4a9eff;color:#fff;border:none;border-radius:4px;cursor:pointer}.diagnostics-btn{background:#6c757d!important}.vault-layout{display:grid;grid-template-columns:1fr 2fr;gap:20px;flex:1}.sources-panel,.chunks-panel{background:#1a1a1a;border-radius:8px;padding:16px;overflow-y:auto;max-height:600px}.sources-panel h3,.chunks-panel h3{margin:0 0 16px;color:#fff}.sources-list{display:flex;flex-direction:column;gap:8px}.source-item{background:#2a2a2a;border:2px solid #3a3a3a;border-radius:6px;padding:12px;cursor:pointer;transition:all .2s;display:flex;justify-content:space-between;align-items:center}.source-item:hover{border-color:#4a9eff}.source-item.selected{border-color:#4a9eff;background:#2a3a4a}.source-info{display:flex;flex-direction:column;gap:4px}.source-info strong{color:#fff}.source-type{font-size:12px;color:#999;text-transform:uppercase}.chunk-count{font-size:12px;color:#4a9eff}.delete-btn{padding:4px 8px;background:#dc3545;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:14px}.delete-btn:hover{background:#c82333}.chunks-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.chunks-header h3{margin:0}.chunks-header button{padding:6px 12px;background:#28a745;color:#fff;border:none;border-radius:4px;cursor:pointer}.chunk-form{background:#2a2a2a;padding:16px;border-radius:6px;margin-bottom:16px;display:flex;flex-direction:column;gap:12px}.chunk-form textarea{min-height:100px;padding:8px;background:#1a1a1a;border:2px solid #3a3a3a;border-radius:4px;color:#fff;resize:vertical}.chunk-form input{padding:8px;background:#1a1a1a;border:2px solid #3a3a3a;border-radius:4px;color:#fff}.form-actions{display:flex;gap:8px}.form-actions button{flex:1;padding:8px;border:none;border-radius:4px;cursor:pointer}.form-actions button[type=submit]{background:#28a745;color:#fff}.form-actions button[type=button]{background:#6c757d;color:#fff}.chunks-list{display:flex;flex-direction:column;gap:12px}.chunk-item{background:#2a2a2a;border:1px solid #3a3a3a;border-radius:6px;padding:12px}.chunk-text{color:#e0e0e0;margin-bottom:8px;line-height:1.5;word-wrap:break-word;overflow-wrap:break-word}.expand-btn{padding:6px 12px;background:#3a3a3a;color:#4a9eff;border:1px solid #4a9eff;border-radius:4px;cursor:pointer;font-size:12px;margin-bottom:8px;transition:all .2s}.expand-btn:hover{background:#4a9eff;color:#fff}.chunk-meta{display:flex;gap:12px;font-size:12px;color:#999;margin-bottom:8px}.chunk-tags{color:#4a9eff}.no-selection{display:flex;align-items:center;justify-content:center;height:100%;color:#666;font-size:18px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000c;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#2a2a2a;border-radius:8px;padding:24px;max-width:500px;width:90%}.modal-content h3{margin:0 0 16px;color:#fff}.modal-content form{display:flex;flex-direction:column;gap:12px}.modal-content input,.modal-content select{padding:8px;background:#1a1a1a;border:2px solid #3a3a3a;border-radius:4px;color:#fff}.diagnostics-panel{position:fixed;bottom:20px;right:20px;background:#2a2a2a;border:2px solid #4a9eff;border-radius:8px;padding:20px;max-width:400px;box-shadow:0 10px 40px #00000080}.diagnostics-panel h3{margin:0 0 12px;color:#4a9eff}.diagnostic-stats{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;color:#e0e0e0}.mismatches{background:#3a2020;border:1px solid #dc3545;border-radius:4px;padding:12px;margin-bottom:16px}.mismatches h4{margin:0 0 8px;color:#dc3545}.mismatches ul{margin:0;padding-left:20px;color:#ff6b6b}.diagnostics-panel button{width:100%;padding:8px;background:#4a9eff;color:#fff;border:none;border-radius:4px;cursor:pointer}.audit-log-tab{display:flex;flex-direction:column;height:100%}.audit-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.audit-header h2{margin:0;color:#fff}.pagination{display:flex;align-items:center;gap:12px}.pagination button{padding:6px 12px;background:#4a9eff;color:#fff;border:none;border-radius:4px;cursor:pointer}.pagination button:disabled{background:#3a3a3a;color:#666;cursor:not-allowed}.pagination span{color:#999}.audit-list{display:flex;flex-direction:column;gap:8px}.audit-entry{background:#1a1a1a;border:1px solid #3a3a3a;border-radius:6px;overflow:hidden}.audit-summary{display:flex;align-items:center;gap:16px;padding:12px;cursor:pointer;transition:background .2s}.audit-summary:hover{background:#2a2a2a}.audit-time{color:#999;font-size:14px;min-width:180px}.audit-action{padding:4px 8px;border-radius:4px;font-size:12px;font-weight:700;text-transform:uppercase}.action-create{background:#28a745;color:#fff}.action-update{background:#4a9eff;color:#fff}.action-delete{background:#dc3545;color:#fff}.audit-entity{color:#e0e0e0;flex:1}.audit-actor{color:#4a9eff;font-size:14px}.expand-icon{color:#999;font-size:12px}.audit-details{padding:16px;background:#0a0a0a;border-top:1px solid #3a3a3a;display:flex;flex-direction:column;gap:16px}.audit-json h4{margin:0 0 8px;color:#4a9eff;font-size:14px}.audit-json pre{background:#1a1a1a;border:1px solid #3a3a3a;border-radius:4px;padding:12px;overflow-x:auto;color:#e0e0e0;font-size:12px;margin:0}.game-logs-tab{padding:20px;max-width:1400px;margin:0 auto}.logs-header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px;gap:20px;flex-wrap:wrap}.logs-info h2{margin:0 0 10px;color:#fff;font-size:24px}.session-info{display:flex;flex-wrap:wrap;gap:15px;font-size:14px}.info-item{background:#ffffff0d;padding:4px 12px;border-radius:4px;color:#fffc}.info-item strong{color:#fff;margin-right:5px}.logs-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.auto-refresh-toggle{display:flex;align-items:center;gap:6px;color:#fffc;cursor:pointer;font-size:14px}.auto-refresh-toggle input{cursor:pointer}.logs-actions button{padding:8px 16px;border:none;border-radius:6px;font-size:14px;cursor:pointer;transition:all .2s;font-weight:500}.btn-refresh{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff}.btn-copy{background:linear-gradient(135deg,#f093fb,#f5576c);color:#fff}.btn-export{background:linear-gradient(135deg,#4facfe,#00f2fe);color:#fff}.btn-clear{background:linear-gradient(135deg,#fa709a,#fee140);color:#fff}.logs-actions button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #0000004d}.logs-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:15px;margin-bottom:20px}.stat-card{background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:15px;text-align:center}.stat-card.error{border-color:#ef444480;background:#ef44441a}.stat-card.warning{border-color:#fbbf2480;background:#fbbf241a}.stat-card.info{border-color:#3b82f680;background:#3b82f61a}.stat-card.debug{border-color:#9ca3af80;background:#9ca3af1a}.stat-value{font-size:28px;font-weight:700;color:#fff;margin-bottom:5px}.stat-label{font-size:12px;color:#fff9;text-transform:uppercase;letter-spacing:.5px}.logs-filter{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}.logs-filter button{padding:8px 16px;border:1px solid rgba(255,255,255,.2);background:#ffffff0d;color:#fffc;border-radius:6px;cursor:pointer;transition:all .2s;font-size:14px}.logs-filter button:hover{background:#ffffff1a;border-color:#ffffff4d}.logs-filter button.active{background:#ffffff26;border-color:#fff6;color:#fff;font-weight:600}.logs-filter button.error{border-color:#ef444480;color:#ef4444}.logs-filter button.warning{border-color:#fbbf2480;color:#fbbf24}.logs-filter button.info{border-color:#3b82f680;color:#3b82f6}.logs-filter button.debug{border-color:#9ca3af80;color:#9ca3af}.logs-container{background:#0000004d;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:15px;max-height:600px;overflow-y:auto;font-family:Courier New,monospace}.logs-container::-webkit-scrollbar{width:10px}.logs-container::-webkit-scrollbar-track{background:#0003;border-radius:5px}.logs-container::-webkit-scrollbar-thumb{background:#fff3;border-radius:5px}.logs-container::-webkit-scrollbar-thumb:hover{background:#ffffff4d}.log-entry{display:flex;align-items:flex-start;gap:12px;padding:8px 12px;margin-bottom:4px;border-radius:4px;font-size:13px;line-height:1.5;background:#ffffff05}.log-entry:hover{background:#ffffff0d}.log-time{color:#ffffff80;min-width:85px;font-size:12px}.log-level{min-width:60px;font-weight:600;font-size:11px;padding:2px 6px;border-radius:3px;text-align:center}.log-level-error{background:#ef444433;color:#ef4444;border:1px solid rgba(239,68,68,.3)}.log-level-warn{background:#fbbf2433;color:#fbbf24;border:1px solid rgba(251,191,36,.3)}.log-level-info{background:#3b82f633;color:#3b82f6;border:1px solid rgba(59,130,246,.3)}.log-level-debug{background:#9ca3af33;color:#9ca3af;border:1px solid rgba(156,163,175,.3)}.log-message{flex:1;color:#ffffffe6;word-break:break-word}.log-data{margin-top:8px;margin-left:157px}.log-data summary{cursor:pointer;color:#fff9;font-size:12px;margin-bottom:8px}.log-data summary:hover{color:#fffc}.log-data pre{background:#0006;padding:12px;border-radius:4px;overflow-x:auto;font-size:12px;color:#fffc;border:1px solid rgba(255,255,255,.1)}.logs-empty,.logs-empty-filter{text-align:center;padding:60px 20px;color:#ffffff80}.logs-empty h3{color:#fff;margin-bottom:10px}.logs-empty p{margin:8px 0;line-height:1.6}@media (max-width: 768px){.logs-header{flex-direction:column}.logs-stats{grid-template-columns:repeat(3,1fr)}.logs-actions{width:100%;justify-content:flex-start}.log-data{margin-left:0}}.coach-engine-test{padding:20px;max-width:1000px;margin:0 auto}.test-header{margin-bottom:30px;text-align:center}.test-header h2{color:#2c3e50;margin-bottom:10px}.test-header p{color:#7f8c8d;font-size:14px}.tabs{display:flex;gap:10px;margin-bottom:30px;border-bottom:2px solid #ecf0f1}.tabs button{padding:12px 24px;border:none;background:transparent;cursor:pointer;font-size:14px;font-weight:500;color:#7f8c8d;border-bottom:3px solid transparent;transition:all .2s}.tabs button:hover{color:#2c3e50;background:#f8f9fa}.tabs button.active{color:#3498db;border-bottom-color:#3498db}.test-content{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:30px;box-shadow:0 2px 4px #0000000d}.form-section h3{color:#2c3e50;margin-bottom:10px}.help-text{color:#7f8c8d;font-size:14px;margin-bottom:25px}.form-group{margin-bottom:20px}.form-group label{display:block;font-weight:500;color:#34495e;margin-bottom:8px;font-size:14px}.form-group input,.form-group select{width:100%;padding:10px 12px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit;transition:border-color .2s}.form-group input:focus,.form-group select:focus{outline:none;border-color:#3498db}.form-section>button{padding:12px 32px;background:#3498db;color:#fff;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background .2s}.form-section>button:hover:not(:disabled){background:#2980b9}.form-section>button:disabled{background:#95a5a6;cursor:not-allowed}.error-message{padding:15px;background:#fee;border:1px solid #fcc;border-radius:6px;color:#c00;margin-top:20px;font-size:14px}.result-section{margin-top:30px;padding-top:30px;border-top:2px solid #ecf0f1}.result-section h3{color:#2c3e50;margin-bottom:20px}.advice-result,.coaching-result,.search-results{background:#f8f9fa;border:1px solid #e0e0e0;border-radius:6px;padding:20px}.advice-result h4,.coaching-result h4,.search-results h4{color:#2c3e50;margin-bottom:15px;font-size:16px}.advice-text,.coaching-text{background:#fff;border:1px solid #e0e0e0;border-radius:4px;padding:15px;font-family:Segoe UI,system-ui,sans-serif;font-size:14px;line-height:1.7;white-space:pre-wrap;color:#2c3e50;max-height:600px;overflow-y:auto}.confidence{margin-top:15px;padding:10px;background:#e8f5e9;border-radius:4px;color:#2e7d32;font-weight:500;font-size:14px}.sources{margin-top:15px;padding:15px;background:#fff;border:1px solid #e0e0e0;border-radius:4px}.sources strong{color:#34495e;display:block;margin-bottom:10px}.sources ul{list-style:none;padding:0;margin:0}.sources li{padding:8px 0;color:#3498db;font-size:14px;border-bottom:1px solid #f0f0f0}.sources li:last-child{border-bottom:none}.search-result-item{background:#fff;border:1px solid #e0e0e0;border-radius:4px;padding:15px;margin-bottom:15px}.search-result-item:last-child{margin-bottom:0}.chunk-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #f0f0f0}.chunk-header strong{color:#2c3e50;font-size:14px}.tags{font-size:12px;color:#7f8c8d;font-style:italic}.chunk-preview{color:#34495e;font-size:14px;line-height:1.6;margin:10px 0}details{margin-top:10px}details summary{cursor:pointer;color:#3498db;font-size:13px;font-weight:500;padding:5px 0}details summary:hover{color:#2980b9}.chunk-full{margin-top:10px;padding:15px;background:#f8f9fa;border:1px solid #e0e0e0;border-radius:4px;font-size:13px;line-height:1.7;white-space:pre-wrap;color:#2c3e50;max-height:400px;overflow-y:auto}.admin-portal{min-height:100vh;background:#1a1a1a;color:#e0e0e0;padding:20px}.admin-header{display:flex;justify-content:space-between;align-items:center;padding:20px;background:#2a2a2a;border-radius:8px;margin-bottom:20px}.admin-header h1{margin:0;font-size:24px;color:#fff}.logout-button{padding:8px 16px;background:#dc3545;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:14px}.logout-button:hover{background:#c82333}.admin-tabs{display:flex;gap:10px;margin-bottom:20px;border-bottom:2px solid #3a3a3a}.tab-button{padding:12px 24px;background:none;border:none;color:#999;cursor:pointer;font-size:16px;border-bottom:3px solid transparent;transition:all .2s}.tab-button:hover{color:#fff;background:#2a2a2a}.tab-button.active{color:#4a9eff;border-bottom-color:#4a9eff}.admin-content{background:#2a2a2a;border-radius:8px;padding:20px;min-height:500px}.loading{text-align:center;padding:40px;color:#999}.error-panel{background:#3a2020;border:2px solid #dc3545;border-radius:8px;padding:20px;text-align:center}.error-panel h3{color:#dc3545;margin-top:0}.error-panel button{margin-top:10px;padding:8px 16px;background:#4a9eff;color:#fff;border:none;border-radius:4px;cursor:pointer}.training-data-manager{padding:40px;max-width:1400px;margin:0 auto;background:linear-gradient(135deg,#1a1a2e,#16213e);min-height:100vh;color:#fff}.manager-header{text-align:center;margin-bottom:50px}.manager-header h1{font-size:42px;margin:0 0 15px;color:#fff;font-weight:700}.manager-header p{font-size:18px;color:#ffffffb3;margin:0}.statistics-overview{background:#ffffff0d;border-radius:20px;padding:35px;margin-bottom:40px;border:1px solid rgba(255,255,255,.1)}.statistics-overview h2{font-size:28px;margin:0 0 25px;color:#fff}.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px;margin-bottom:35px}.stat-card{background:linear-gradient(135deg,#4caf501a,#2196f31a);border-radius:15px;padding:25px;text-align:center;border:1px solid rgba(76,175,80,.3);transition:transform .3s}.stat-card:hover{transform:translateY(-5px)}.stat-value{font-size:42px;font-weight:700;color:#4caf50;margin-bottom:10px}.stat-label{font-size:14px;color:#ffffffb3;text-transform:uppercase;letter-spacing:.5px}.detailed-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:25px;margin-top:30px}.stat-section{background:#ffffff08;border-radius:12px;padding:20px}.stat-section h3{font-size:18px;margin:0 0 15px;color:#4caf50}.distribution-bars{display:flex;flex-direction:column;gap:12px}.bar-item{display:flex;align-items:center;gap:12px}.bar-item>span:first-child{width:60px;font-size:14px;color:#fffc}.bar{flex:1;height:24px;background:#ffffff1a;border-radius:12px;overflow:hidden}.bar-fill{height:100%;transition:width .5s ease}.bar-fill.white{background:linear-gradient(90deg,#fff,#e0e0e0)}.bar-fill.black{background:linear-gradient(90deg,#333,#555)}.bar-item>span:last-child{width:40px;text-align:right;font-size:14px;font-weight:600;color:#ffffffe6}.pattern-list{display:flex;flex-direction:column;gap:10px}.pattern-item{display:flex;justify-content:space-between;align-items:center;padding:10px 15px;background:#ffffff0d;border-radius:8px;transition:background .3s}.pattern-item:hover{background:#ffffff14}.pattern-name{font-size:14px;color:#ffffffe6;text-transform:capitalize}.pattern-count{font-size:16px;font-weight:700;color:#4caf50;background:#4caf5033;padding:4px 12px;border-radius:12px}.action-section{background:#ffffff0d;border-radius:20px;padding:35px;margin-bottom:40px;border:1px solid rgba(255,255,255,.1)}.action-section h2{font-size:28px;margin:0 0 25px;color:#fff}.action-buttons{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px}.action-btn{background:#ffffff0d;border:2px solid rgba(255,255,255,.2);border-radius:12px;padding:20px;color:#fff;font-size:16px;font-weight:600;cursor:pointer;transition:all .3s;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}.action-btn:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 10px 30px #0000004d}.action-btn:disabled{opacity:.4;cursor:not-allowed}.action-btn.export-jsonl{border-color:#4caf50;background:linear-gradient(135deg,#4caf501a,#4caf500d)}.action-btn.export-jsonl:hover:not(:disabled){border-color:#4caf50;box-shadow:0 10px 30px #4caf504d}.action-btn.export-json{border-color:#2196f3;background:linear-gradient(135deg,#2196f31a,#2196f30d)}.action-btn.export-json:hover:not(:disabled){border-color:#2196f3;box-shadow:0 10px 30px #2196f34d}.action-btn.refresh{border-color:#ff9800;background:linear-gradient(135deg,#ff98001a,#ff98000d)}.action-btn.refresh:hover{border-color:#ff9800;box-shadow:0 10px 30px #ff98004d}.action-btn.clear-data{border-color:#f44336;background:linear-gradient(135deg,#f443361a,#f443360d)}.action-btn.clear-data:hover:not(:disabled){border-color:#f44336;box-shadow:0 10px 30px #f443364d}.btn-hint{font-size:12px;font-weight:400;color:#fff9}.training-progress{background:#ffffff0d;border-radius:20px;padding:35px;margin-bottom:40px;border:1px solid rgba(255,255,255,.1)}.training-progress h2{font-size:28px;margin:0 0 25px;color:#fff}.progress-info{margin-bottom:20px}.progress-bar{height:40px;background:#ffffff1a;border-radius:20px;overflow:hidden;margin-bottom:15px}.progress-fill{height:100%;background:linear-gradient(90deg,#4caf50,#45a049);transition:width .5s ease;border-radius:20px}.progress-text{text-align:center;font-size:16px;color:#fffc}.progress-message{padding:15px 20px;border-radius:10px;font-size:16px;margin-top:20px}.progress-message.success{background:#4caf5033;border:1px solid #4CAF50;color:#4caf50}.progress-message.info{background:#2196f333;border:1px solid #2196F3;color:#2196f3}.recent-examples{background:#ffffff0d;border-radius:20px;padding:35px;border:1px solid rgba(255,255,255,.1)}.recent-examples h2{font-size:28px;margin:0 0 25px;color:#fff}.examples-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}.example-card{background:#ffffff0d;border-radius:12px;padding:20px;cursor:pointer;transition:all .3s;border:1px solid rgba(255,255,255,.1)}.example-card:hover{background:#ffffff14;transform:translateY(-3px);box-shadow:0 10px 20px #0000004d}.example-header{display:flex;justify-content:space-between;margin-bottom:12px}.example-id{font-weight:600;color:#4caf50}.example-date{font-size:12px;color:#ffffff80}.example-stats{display:flex;gap:12px;margin-bottom:12px;font-size:13px;color:#ffffffb3}.example-stats span{background:#ffffff1a;padding:4px 8px;border-radius:6px}.example-preview{font-size:14px;color:#ffffffe6;font-weight:500}.no-examples{text-align:center;padding:60px 20px;color:#ffffff80}.no-examples p{margin:10px 0;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000d9;display:flex;align-items:center;justify-content:center;z-index:2000;padding:20px}.modal-content{background:linear-gradient(135deg,#1a1a2e,#16213e);border-radius:20px;max-width:800px;width:100%;max-height:90vh;overflow-y:auto;padding:40px;position:relative}.modal-close{position:absolute;top:20px;right:20px;background:#ffffff1a;border:none;color:#fff;font-size:28px;width:40px;height:40px;border-radius:50%;cursor:pointer;transition:all .3s}.modal-close:hover{background:#fff3;transform:rotate(90deg)}.modal-content h2{margin:0 0 30px;font-size:28px;color:#fff}.detail-section{margin-bottom:30px}.detail-section h3{font-size:20px;margin:0 0 15px;color:#4caf50}.detail-section pre{background:#0000004d;padding:15px;border-radius:8px;overflow-x:auto;color:#4caf50;font-size:13px;line-height:1.6}.coaching-preview{background:#ffffff08;padding:20px;border-radius:10px}.coaching-preview h4{font-size:16px;margin:20px 0 10px;color:#2196f3}.improvement-preview{margin-bottom:15px}.improvement-preview strong{display:block;margin-bottom:5px;color:#fff}.improvement-preview p{margin:0;color:#fffc;line-height:1.5}@media (max-width: 768px){.training-data-manager{padding:20px}.manager-header h1{font-size:32px}.stats-grid,.detailed-stats,.action-buttons,.examples-list{grid-template-columns:1fr}.modal-content{padding:25px}}.modal-content::-webkit-scrollbar{width:8px}.modal-content::-webkit-scrollbar-track{background:#ffffff0d}.modal-content::-webkit-scrollbar-thumb{background:#fff3;border-radius:10px}.modal-content::-webkit-scrollbar-thumb:hover{background:#ffffff4d}
