*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#f8fafc;color:#1e293b;overflow:hidden}button{font-family:inherit;border:none;background:none;cursor:pointer}textarea{font-family:inherit}::-webkit-scrollbar{width:8px}::-webkit-scrollbar-track{background:#e2e8f0}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#94a3b8}.custom-select{position:relative;display:inline-block}.custom-select-trigger{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;border:2px solid #e2e8f0;border-radius:8px;background:#fff;cursor:pointer;font-size:13px;font-weight:500;color:#374151;transition:all .2s ease;min-height:23px;min-width:120px}.custom-select-trigger:hover{border-color:#cbd5e1;background-color:#f8fafc}.custom-select-trigger:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a;background-color:#f8fafc}.custom-select-arrow{font-size:10px;color:#6b7280;transition:transform .2s ease;-webkit-user-select:none;user-select:none;margin-left:8px}.custom-select-arrow.open{transform:rotate(180deg)}.custom-select-options{position:absolute;top:100%;left:0;background:#fff;border:2px solid #e2e8f0;border-top:none;border-radius:0 0 8px 8px;box-shadow:0 4px 12px #0000001a;z-index:5000;max-height:200px;overflow-y:auto;min-width:max-content;width:max-content}.custom-select-option{padding:8px;cursor:pointer;font-size:13px;color:#374151;transition:all .2s ease;border-bottom:1px solid #f1f5f9;white-space:nowrap}.custom-select-option:last-child{border-bottom:none;border-radius:0 0 6px 6px}.custom-select-option:hover{background:#f8fafc;color:#2563eb}.custom-select-option.selected{background:#2563eb;color:#fff}.custom-select-option.selected:hover{background:#1d4ed8}body.dark-mode .custom-select-trigger{background:#334155;border-color:#475569;color:#e2e8f0}body.dark-mode .custom-select-trigger:hover{background:#475569;border-color:#64748b}body.dark-mode .custom-select-trigger:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a;background:#475569}body.dark-mode .custom-select-arrow{color:#94a3b8}body.dark-mode .custom-select-options{background:#1e293b;border-color:#334155}body.dark-mode .custom-select-option{color:#e2e8f0;border-bottom-color:#334155}body.dark-mode .custom-select-option:hover{background:#334155;color:#3b82f6}body.dark-mode .custom-select-option.selected{background:#3b82f6;color:#fff}body.dark-mode .custom-select-option.selected:hover{background:#2563eb}.portal-dropdown{position:fixed!important;z-index:99999!important;box-shadow:0 8px 24px #00000026!important}body.dark-mode .portal-dropdown{box-shadow:0 8px 24px #0006!important}.grade-select .custom-select-trigger{min-width:60px;width:60px;padding:8px 10px}.grade-select .custom-select-options{min-width:60px}.grade-select .custom-select-option{padding:8px 6px;text-align:center}.graph-canvas{width:100%;height:100%;background:#fff;border-radius:0 0 12px 12px;box-shadow:0 8px 24px #0000001a;position:relative;overflow:hidden;-webkit-user-select:none;user-select:none;border:2px solid #e2e8f0;border-top:none;min-height:400px;background-image:linear-gradient(rgba(0,0,0,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(0,0,0,.05) 1px,transparent 1px);background-size:40px 40px;background-repeat:repeat}.graph-viewport{width:100%;height:100%;position:relative;transform-origin:0 0}.graph-svg{position:absolute;pointer-events:none;z-index:0;overflow:visible;width:100%;height:100%}.graph-svg line{stroke:#cbd5e1;stroke-width:2}.graph-container{position:relative;width:100%;height:100%;z-index:1}.graph-layer{position:absolute;top:0;left:0;width:100%;height:100%}.graph-node{width:60px;height:60px;border-radius:50%;color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;cursor:pointer;transition:transform .2s ease;text-align:center;padding:4px;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:#2563eb;border:none}.graph-node:hover{transform:scale(1.08);background:#1d4ed8}.zoom-controls{position:absolute;bottom:15px;right:15px;display:flex;align-items:center;gap:8px;background:#fffffff2;padding:8px 12px;border-radius:12px;box-shadow:0 4px 12px #0000001a;z-index:10;border:2px solid #e2e8f0;transition:right .3s ease}.zoom-controls.with-detail-panel{right:365px}.zoom-btn{width:32px;height:32px;border:none;border-radius:8px;background:#2563eb;color:#fff;font-size:16px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,transform .1s ease;font-family:inherit;box-shadow:0 2px 4px #2563eb33}.zoom-btn:hover{background:#1d4ed8;transform:translateY(-1px);box-shadow:0 4px 8px #2563eb4d}.zoom-btn:active{transform:scale(.95)}.reset-btn{background:#64748b;color:#fff;font-size:12px;width:auto;padding:0 8px;box-shadow:0 2px 4px #64748b33}.reset-btn:hover{background:#475569;transform:translateY(-1px);box-shadow:0 4px 8px #64748b4d}.zoom-level{font-size:12px;color:#1e293b;font-weight:600;min-width:35px;text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.canvas-layer-labels-inside{position:absolute;top:20px;right:20px;background:#fffffff2;padding:12px 16px;border-radius:12px;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-weight:500;line-height:1.6;color:#1e293b;box-shadow:0 4px 12px #0000001a;pointer-events:none;z-index:100;border:2px solid #e2e8f0;transition:right .3s ease}.canvas-layer-labels-inside.with-detail-panel{right:370px}body.dark-mode .graph-canvas{background:#0f172a;border-color:#475569;box-shadow:0 8px 24px #0000004d;background-image:linear-gradient(rgba(255,255,255,.08) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.08) 1px,transparent 1px);background-size:40px 40px;background-repeat:repeat}body.dark-mode .zoom-controls{background:#1e293bf2;border-color:#334155}body.dark-mode .zoom-level{color:#e2e8f0}body.dark-mode .canvas-layer-labels-inside{background:#1e293bf2;border-color:#334155;color:#e2e8f0}.graph-controls{position:absolute;top:30px;right:30px;display:flex;align-items:center;gap:10px;z-index:10}.graph-controls input[type=text],.graph-controls select{padding:8px 12px;border-radius:8px;border:2px solid #e2e8f0;font-size:14px;background:#fff;color:#1e293b;font-family:inherit;transition:border-color .2s,box-shadow .2s}.graph-controls input[type=text]:focus,.graph-controls select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a}.graph-controls button{padding:8px 16px;border:none;border-radius:8px;font-size:14px;cursor:pointer;background:#2563eb;color:#fff;font-weight:600;font-family:inherit;transition:background-color .2s ease,transform .1s ease;box-shadow:0 2px 4px #2563eb33}.graph-controls button:hover{background:#1d4ed8;transform:translateY(-1px);box-shadow:0 4px 8px #2563eb4d}.graph-clear{background:#dc2626!important;color:#fff!important;border:none;padding:8px 16px;border-radius:8px;font-size:14px;cursor:pointer;font-weight:600;font-family:inherit;transition:background-color .2s ease,transform .1s ease;box-shadow:0 2px 4px #dc262633}.graph-clear:hover{background:#b91c1c!important;transform:translateY(-1px);box-shadow:0 4px 8px #dc26264d}.graph-controls input,.graph-controls select{background:#fff;color:#1e293b;border:2px solid #e2e8f0;border-radius:8px;font-size:14px;padding:8px 12px;font-family:inherit}.graph-controls input{height:40px}.graph-modal-controls .graph-controls{position:static;gap:8px}.graph-modal-controls .graph-controls input[type=text]{width:200px;padding:6px 10px;font-size:13px;height:auto}.graph-modal-controls .graph-controls button{padding:6px 12px;font-size:13px;height:32px}.graph-modal-controls .graph-clear{padding:6px 12px!important;font-size:13px!important;height:32px!important}.graph-modal-controls .custom-select-trigger{height:32px;min-height:32px;padding:6px 10px;font-size:13px;display:flex;align-items:center;box-sizing:border-box}.graph-modal-controls .custom-select{position:relative}.retention-graph{margin:20px 0;padding:20px;background:#fff;border-radius:12px;border:2px solid #e2e8f0;box-shadow:0 4px 12px #0000000d}.retention-graph-title{font-size:16px;font-weight:700;color:#1e40af;margin-bottom:15px;text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.retention-canvas{width:100%;height:auto;border:2px solid #e2e8f0;border-radius:8px;background:#f8fafc;display:block;margin:0 auto}.retention-graph-placeholder{padding:40px 20px;text-align:center;color:#64748b;font-style:italic;background:#f8fafc;border:2px dashed #cbd5e1;border-radius:8px;margin:20px 0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}@media (max-width: 768px){.retention-graph{margin:15px 0;padding:15px}.retention-graph-title{font-size:14px}.retention-canvas{max-width:100%}}.graph-modal-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:999999;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.graph-modal{background:#fff;border-radius:12px;box-shadow:0 20px 40px #00000026;width:90vw;height:80vh;max-width:1200px;overflow:hidden;animation:graphModalSlideIn .3s ease-out;display:flex;flex-direction:column}@keyframes graphModalSlideIn{0%{opacity:0;transform:translateY(-20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.graph-modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f8fafc,#f1f5f9);gap:20px}.graph-modal-title{font-size:20px;color:#1e40af;margin:0;font-weight:700;white-space:nowrap}.graph-modal-controls{flex:1;display:flex;justify-content:flex-end}.graph-modal-close{background:none;border:none;font-size:18px;color:#64748b;cursor:pointer;padding:8px;border-radius:6px;transition:all .2s ease;flex-shrink:0}.graph-modal-close:hover{background:#e2e8f0;color:#1e293b}.graph-modal-content{flex:1;display:flex;position:relative;overflow:hidden}.graph-canvas-container{flex:1;position:relative;background:#f8fafc;width:100%;height:100%;overflow:hidden}.graph-node-detail{position:absolute;top:0;right:0;width:350px;height:100%;background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;overflow:hidden;z-index:100;box-shadow:-4px 0 12px #0000001a;transform:translate(0);animation:slideInFromRight .3s ease-out}@keyframes slideInFromRight{0%{transform:translate(100%)}to{transform:translate(0)}}.node-detail-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e2e8f0;background:#f8fafc}.node-detail-header h3{margin:0;font-size:16px;color:#1e40af;font-weight:600}.node-detail-close{background:none;border:none;font-size:16px;color:#64748b;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.node-detail-close:hover{background:#e2e8f0;color:#1e293b}.node-detail-content{flex:1;padding:20px;overflow-y:auto}.node-detail-content p{margin:0 0 16px;font-size:14px;color:#374151;line-height:1.5}.node-detail-content h4{margin:20px 0 12px;font-size:16px;color:#1e40af;font-weight:600}.node-detail-content h4:first-child{margin-top:0}.node-summary ul{list-style:none;padding:0;margin:0 0 20px}.node-summary li{margin-bottom:8px;padding:8px 12px;background:#f8fafc;border-radius:6px;font-size:13px;line-height:1.4;color:#475569;border-left:3px solid #e2e8f0}.node-detail-content pre{background:#f1f5f9;padding:12px;border-radius:8px;font-size:11px;line-height:1.4;color:#334155;border:1px solid #e2e8f0;white-space:pre-wrap;word-wrap:break-word;max-height:200px;overflow-y:auto}body.dark-mode .graph-modal{background:#1e293b;color:#e2e8f0;border:2px solid #475569;box-shadow:0 20px 40px #0006}body.dark-mode .graph-modal-header{background:linear-gradient(135deg,#0f172a,#1e293b);border-bottom-color:#334155}body.dark-mode .graph-modal-title{color:#fff}body.dark-mode .graph-modal-close{color:#94a3b8}body.dark-mode .graph-modal-close:hover{background:#334155;color:#e2e8f0}body.dark-mode .graph-canvas-container{background:#0f172a}body.dark-mode .graph-node-detail{background:#1e293b;border-left-color:#334155;box-shadow:-4px 0 12px #0000004d}body.dark-mode .graph-canvas{background:#0f172a;border-color:#475569;border-width:2px}body.dark-mode .node-detail-header{background:#0f172a;border-bottom-color:#334155}body.dark-mode .node-detail-header h3{color:#3b82f6}body.dark-mode .node-detail-close{color:#94a3b8}body.dark-mode .node-detail-close:hover{background:#334155;color:#e2e8f0}body.dark-mode .node-detail-content{color:#e2e8f0}body.dark-mode .node-detail-content h4{color:#3b82f6}body.dark-mode .node-detail-content p{color:#cbd5e1}body.dark-mode .node-summary li{background:#0f172a;color:#cbd5e1;border-left-color:#334155}.node-data-container{position:relative}.copy-data-btn{position:absolute;top:8px;right:8px;background:#f1f5f9e6;border:1px solid #e2e8f0;border-radius:4px;padding:4px 6px;cursor:pointer;font-size:12px;transition:all .2s ease;color:#64748b;z-index:10;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.copy-data-btn:hover{background:#e2e8f0f2;border-color:#cbd5e1;color:#374151;transform:scale(1.05)}body.dark-mode .copy-data-btn{background:#334155e6;border-color:#475569;color:#94a3b8}body.dark-mode .copy-data-btn:hover{background:#475569f2;border-color:#64748b;color:#e2e8f0}body.dark-mode .node-detail-content pre{background:#0f172a;color:#e2e8f0;border-color:#334155}.graph-loading{display:flex;align-items:center;gap:8px;color:#64748b;font-size:14px;font-weight:500}.graph-loading span{animation:pulse 2s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}body.dark-mode .graph-loading{color:#94a3b8}.article-viewer-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:2000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);padding:20px}.article-viewer{background:#fff;border-radius:12px;box-shadow:0 20px 40px #00000026;width:90vw;height:85vh;max-width:1000px;overflow:hidden;animation:articleSlideIn .3s ease-out;display:flex;flex-direction:column}@keyframes articleSlideIn{0%{opacity:0;transform:translateY(-20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.article-header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f8fafc,#f1f5f9);gap:20px}.article-info{flex:1;min-width:0}.article-title{font-size:24px;color:#1e40af;margin:0 0 8px;font-weight:700;line-height:1.3;word-wrap:break-word}.article-meta{display:flex;align-items:center;gap:16px;font-size:14px;color:#64748b}.article-source{font-weight:500}.article-word-count{color:#94a3b8}.article-controls{display:flex;align-items:center;gap:12px;flex-shrink:0}.font-controls{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:4px 8px}.font-btn{background:none;border:none;font-size:14px;color:#64748b;cursor:pointer;padding:4px 6px;border-radius:4px;transition:all .2s ease;font-weight:600}.font-btn:hover{background:#f1f5f9;color:#1e40af}.font-size-display{font-size:12px;color:#94a3b8;min-width:32px;text-align:center}.knowledge-graph-btn{background:linear-gradient(135deg,#8b5cf6,#7c3aed);border:none;border-radius:8px;padding:6px 12px;font-size:12px;color:#fff;cursor:pointer;transition:all .2s ease;font-weight:600;box-shadow:0 2px 4px #8b5cf633}.knowledge-graph-btn:hover{background:linear-gradient(135deg,#7c3aed,#6d28d9);transform:translateY(-1px);box-shadow:0 4px 8px #8b5cf64d}.knowledge-graph-btn:disabled{background:linear-gradient(135deg,#94a3b8,#64748b);cursor:not-allowed;transform:none;box-shadow:0 2px 4px #94a3b833}.summary-btn{background:linear-gradient(135deg,#2563eb,#1d4ed8);border:none;border-radius:8px;padding:6px 12px;font-size:12px;color:#fff;cursor:pointer;transition:all .2s ease;font-weight:600;box-shadow:0 2px 4px #2563eb33}.summary-btn:hover{background:linear-gradient(135deg,#1d4ed8,#1e40af);transform:translateY(-1px);box-shadow:0 4px 8px #2563eb4d}.summary-btn:disabled{background:linear-gradient(135deg,#94a3b8,#64748b);cursor:not-allowed;transform:none;box-shadow:0 2px 4px #94a3b833}.article-summary{margin:12px 24px;padding:16px;background:linear-gradient(135deg,#fef3c7,#fde68a);border-radius:12px;border-left:4px solid #f59e0b;box-shadow:0 2px 8px #f59e0b1a}.summary-title{margin:0 0 12px;font-size:16px;color:#92400e;font-weight:600}.summary-content{margin:0;font-size:14px;line-height:1.6;color:#78350f}.close-btn{background:none;border:none;font-size:18px;color:#64748b;cursor:pointer;padding:8px;border-radius:6px;transition:all .2s ease}.article-content{flex:1;padding:24px;overflow-y:auto;line-height:1.7;color:#374151}.article-paragraph{margin:0 0 16px;text-align:justify;word-wrap:break-word}.article-paragraph:last-child{margin-bottom:0}.article-source-inline{margin-top:32px}.article-divider{border:none;border-top:1px solid #e2e8f0;margin:24px 0 16px}.article-url-inline{font-size:13px;color:#64748b;word-wrap:break-word;padding:12px 16px;background:#f8fafc;border-radius:8px;border-left:3px solid #e2e8f0}.article-link{color:#2563eb;text-decoration:none;transition:color .2s ease}.article-link:hover{color:#1d4ed8;text-decoration:underline}.article-content::-webkit-scrollbar{width:8px}.article-content::-webkit-scrollbar-track{background:#f1f5f9;border-radius:4px}.article-content::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.article-content::-webkit-scrollbar-thumb:hover{background:#94a3b8}body.dark-mode .article-viewer{background:#1e293b;color:#e2e8f0}body.dark-mode .article-header{background:linear-gradient(135deg,#0f172a,#1e293b);border-bottom-color:#334155}body.dark-mode .article-title{color:#fff}body.dark-mode .article-meta{color:#94a3b8}body.dark-mode .article-word-count{color:#64748b}body.dark-mode .font-controls{background:#334155;border-color:#475569}body.dark-mode .font-btn{color:#94a3b8}body.dark-mode .font-btn:hover{background:#475569;color:#e2e8f0}body.dark-mode .font-size-display{color:#64748b}body.dark-mode .knowledge-graph-btn{background:linear-gradient(135deg,#7c3aed,#6d28d9);box-shadow:0 2px 4px #7c3aed4d}body.dark-mode .knowledge-graph-btn:hover{background:linear-gradient(135deg,#6d28d9,#5b21b6);box-shadow:0 4px 8px #7c3aed66}body.dark-mode .knowledge-graph-btn:disabled{background:linear-gradient(135deg,#475569,#334155);box-shadow:0 2px 4px #4755694d}body.dark-mode .summary-btn{background:linear-gradient(135deg,#1d4ed8,#1e40af);box-shadow:0 2px 4px #1d4ed84d}body.dark-mode .summary-btn:hover{background:linear-gradient(135deg,#1e40af,#1e3a8a);box-shadow:0 4px 8px #1d4ed866}body.dark-mode .summary-btn:disabled{background:linear-gradient(135deg,#475569,#334155);box-shadow:0 2px 4px #4755694d}body.dark-mode .article-summary{background:linear-gradient(135deg,#451a03,#78350f);border-left-color:#d97706;box-shadow:0 2px 8px #d9770633}body.dark-mode .summary-title{color:#fbbf24}body.dark-mode .summary-content{color:#fde68a}body.dark-mode .close-btn{color:#94a3b8}body.dark-mode .close-btn:hover{background:#334155;color:#e2e8f0}body.dark-mode .article-content{color:#cbd5e1}body.dark-mode .article-divider{border-top-color:#334155}body.dark-mode .article-url-inline{background:#0f172a;color:#94a3b8;border-left-color:#334155}body.dark-mode .article-link{color:#3b82f6}body.dark-mode .article-link:hover{color:#60a5fa}body.dark-mode .article-content::-webkit-scrollbar-track{background:#0f172a}body.dark-mode .article-content::-webkit-scrollbar-thumb{background:#475569}body.dark-mode .article-content::-webkit-scrollbar-thumb:hover{background:#64748b}.article-main-view{width:100%;height:100vh;display:flex;flex-direction:column;background:#fff}.article-main-view .article-viewer-overlay{position:static;background:none;-webkit-backdrop-filter:none;backdrop-filter:none;padding:0;width:100%;height:100%;display:flex;align-items:stretch;justify-content:stretch}.article-main-view .article-viewer{width:100%;height:100%;max-width:none;border-radius:0;box-shadow:none;animation:none;display:flex;flex-direction:column}body.dark-mode .article-main-view{background:#0f172a}@media (max-width: 768px){.article-viewer-overlay{padding:10px}.article-viewer{width:100vw;height:90vh}.article-header{flex-direction:column;align-items:stretch;gap:12px}.article-controls{justify-content:space-between}.article-title{font-size:20px}.article-content{padding:16px}}.knowledge-graph-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:3000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.knowledge-graph-modal{background:#fff;border-radius:12px;box-shadow:0 20px 40px #00000026;width:90vw;height:80vh;max-width:1000px;overflow:hidden;animation:graphModalSlideIn .3s ease-out;display:flex;flex-direction:column}.knowledge-graph-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f8fafc,#f1f5f9)}.knowledge-graph-header h2{margin:0;font-size:18px;color:#8b5cf6;font-weight:700}.close-graph-btn{background:none;border:none;font-size:18px;color:#64748b;cursor:pointer;padding:8px;border-radius:6px;transition:all .2s ease}.close-graph-btn:hover{background:#e2e8f0;color:#1e293b}.knowledge-graph-content{flex:1;padding:20px;overflow-y:auto}.graph-info{margin-bottom:20px}.graph-info p{margin:0 0 12px;color:#64748b;font-size:14px}.graph-legend{display:flex;gap:16px;flex-wrap:wrap}.legend-item{font-size:12px;color:#475569;font-weight:500}.knowledge-graph-display{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:16px;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:12px;line-height:1.4;color:#334155;max-height:400px;overflow-y:auto}body.dark-mode .knowledge-graph-modal{background:#1e293b;color:#e2e8f0;border:2px solid #475569;box-shadow:0 20px 40px #0006}body.dark-mode .knowledge-graph-header{background:linear-gradient(135deg,#0f172a,#1e293b);border-bottom-color:#334155}body.dark-mode .knowledge-graph-header h2{color:#a855f7}body.dark-mode .close-graph-btn{color:#94a3b8}body.dark-mode .close-graph-btn:hover{background:#334155;color:#e2e8f0}body.dark-mode .graph-info p{color:#94a3b8}body.dark-mode .legend-item{color:#cbd5e1}body.dark-mode .knowledge-graph-display{background:#0f172a;border-color:#334155;color:#e2e8f0}.sidebar{width:300px;background:#fff;border-right:2px solid #e2e8f0;display:flex;flex-direction:column;transition:width .2s ease;box-shadow:4px 0 12px #0000000d}.sidebar.collapsed{width:60px}.sidebar-header{padding:16px;border-bottom:2px solid #e2e8f0;display:flex;justify-content:space-between;align-items:center;background:#f8fafc}.app-title{display:flex;align-items:center;gap:12px;position:relative;cursor:pointer}.app-slogan{position:absolute;top:100%;left:0;background:#1e40aff2;color:#fff;padding:12px 16px;border-radius:8px;font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap;opacity:0;visibility:hidden;transform:translateY(-10px);transition:all .3s ease;z-index:1000;box-shadow:0 4px 16px #1e40af4d;margin-top:8px}.app-slogan:before{content:"";position:absolute;top:-6px;left:20px;border:6px solid transparent;border-bottom-color:#1e40aff2}.app-title:hover .app-slogan{opacity:1;visibility:visible;transform:translateY(0)}.app-icon{font-size:28px;background:linear-gradient(135deg,#1e40af,#3b82f6,#6366f1);border-radius:8px;padding:6px;box-shadow:0 4px 12px #1e40af33;transition:transform .2s ease,box-shadow .2s ease}.app-icon:hover{transform:scale(1.05);box-shadow:0 6px 16px #1e40af4d}.app-info h2{font-size:18px;font-weight:800;color:#1e40af;margin:0;font-family:Inter,SF Pro Display,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;letter-spacing:-.5px;background:linear-gradient(135deg,#1e40af,#3b82f6,#6366f1);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;text-shadow:0 2px 4px rgba(30,64,175,.1)}.app-info p{font-size:11px;color:#64748b;margin:4px 0 0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-weight:500;letter-spacing:.5px;text-transform:uppercase;opacity:.8}.collapse-btn{background:transparent;border:none;color:#64748b;padding:8px;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s,color .2s}.collapse-btn:hover{background:#e2e8f0;color:#1e293b}.subjects-section{flex:1;padding:16px;overflow-y:auto}.subject-category{margin-bottom:16px}.category-header{display:flex;align-items:center;justify-content:space-between;padding:12px;background:#f1f5f9;border-radius:8px;cursor:pointer;transition:all .2s ease;margin-bottom:8px;border:1px solid #e2e8f0}.category-header:hover{background:#e2e8f0;border-color:#cbd5e1}.category-info{display:flex;align-items:center;gap:8px}.category-icon{font-size:16px;color:#2563eb}.category-title{font-size:14px;font-weight:600;color:#1e293b}.expand-icon{transition:transform .2s ease;color:#64748b}.expand-icon.expanded{transform:rotate(180deg)}.subjects-list{display:flex;flex-direction:column;gap:6px;padding-left:8px}.subject-item{display:flex;align-items:center;padding:10px 12px;border-radius:8px;cursor:pointer;transition:all .2s ease;border:1px solid transparent;position:relative}.subject-item:hover:not(.disabled){background:#c7d2fe;border-color:#6366f1}.subject-item.active{background:#2563eb;border-color:#1d4ed8;box-shadow:0 2px 8px #2563eb33}.subject-item.disabled{opacity:.5;cursor:not-allowed}.subject-icon{font-size:18px;margin-right:10px;min-width:24px;text-align:center;color:#2563eb;filter:grayscale(.3) brightness(.8);transition:filter .2s ease}.subject-item:hover:not(.disabled) .subject-icon{filter:grayscale(0) brightness(1)}.subject-item.active .subject-icon{color:#fff;filter:grayscale(0) brightness(1)}.subject-info{flex:1;min-width:0}.subject-name{font-size:13px;font-weight:600;color:#1e293b;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}.subject-item.active .subject-name{color:#fff}.subject-description{font-size:11px;color:#64748b;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}.subject-item.active .subject-description{color:#ffffffe6}.active-indicator{color:#fff;margin-left:8px}.coming-soon{font-size:10px;color:#64748b;background:#f1f5f9;padding:2px 6px;border-radius:4px;margin-left:8px;border:1px solid #e2e8f0}.sidebar-footer{padding:16px;border-top:2px solid #e2e8f0;background:#f8fafc;display:flex;flex-direction:column;gap:12px}.view-switcher{position:relative;background:#fff;border-radius:8px;border:1px solid #e2e8f0;box-shadow:0 2px 4px #0000000d;overflow:visible}.current-view{display:flex;align-items:center;justify-content:space-between;padding:12px;cursor:pointer;transition:all .2s ease;border-radius:0 0 8px 8px}.current-view:hover{background:#f8fafc}.current-view-icon{font-size:16px}.current-view-name{flex:1;margin-left:8px;font-size:14px;font-weight:600;color:#1e293b}.expand-indicator{font-size:12px;color:#64748b;transition:transform .2s ease}.view-switcher:hover .expand-indicator{transform:rotate(180deg)}.view-options{position:absolute;bottom:100%;left:-1px;right:-1px;background:#fff;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0000001a;opacity:0;visibility:hidden;transform:translateY(10px);transition:all .2s ease;z-index:10;overflow:hidden}.view-switcher:hover .view-options{opacity:1;visibility:visible;transform:translateY(0)}.view-option{display:flex;align-items:center;gap:8px;padding:12px;border:none;background:transparent;cursor:pointer;transition:all .2s ease;font-family:inherit;width:100%;text-align:left}.view-option:hover{background:#2563eb;color:#fff}.view-icon{font-size:16px}.view-name{font-size:14px;font-weight:600;color:inherit}.user-section{position:relative;background:#fff;border-radius:8px;border:1px solid #e2e8f0;box-shadow:0 2px 4px #0000000d;overflow:visible}.user-info{display:flex;align-items:center;padding:12px;cursor:pointer;transition:all .2s ease}.user-info:hover{background:#f8fafc}.user-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;border:2px solid #e2e8f0;transition:border-color .2s ease}.user-info:hover .user-avatar{border-color:#2563eb}.user-avatar img{width:100%;height:100%;object-fit:cover}.user-details{flex:1;margin-left:12px;min-width:0}.user-name{font-size:14px;font-weight:600;color:#1e293b;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-status{font-size:11px;color:#10b981;font-weight:500}.user-menu-indicator{font-size:16px;color:#64748b;transition:transform .2s ease,color .2s ease}.user-section:hover .user-menu-indicator{transform:rotate(90deg);color:#2563eb}.user-menu{position:absolute;bottom:100%;left:0;right:0;background:#fff;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0000001a;opacity:0;visibility:hidden;transform:translateY(10px);transition:all .2s ease;z-index:10;overflow:hidden}.user-section:hover .user-menu{opacity:1;visibility:visible;transform:translateY(0)}.user-menu-item{display:flex;align-items:center;gap:12px;padding:12px;border:none;background:transparent;cursor:pointer;transition:all .2s ease;font-family:inherit;width:100%;text-align:left;border-bottom:1px solid #f1f5f9}.user-menu-item:last-child{border-bottom:none}.user-menu-item:hover{background:#2563eb;color:#fff}.menu-icon{font-size:16px;width:20px;text-align:center}.menu-text{font-size:14px;font-weight:500;color:inherit}.upload-section{margin-bottom:8px}.upload-btn{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:#f1f5f9;border:1px dashed #cbd5e1;border-radius:8px;cursor:pointer;transition:all .2s ease;font-family:inherit;font-size:13px;font-weight:500;color:#64748b}.upload-btn:hover{background:#e2e8f0;border-color:#2563eb;color:#2563eb}.upload-icon{font-size:14px}.upload-form{margin-top:10px;padding:18px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 2px 8px #0000000f}.upload-options{display:flex;flex-direction:column;gap:16px}.file-upload-btn{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 16px;background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;border-radius:8px;cursor:pointer;transition:all .3s ease;font-size:13px;font-weight:600;box-shadow:0 2px 6px #2563eb33;border:none}.file-upload-btn:hover{background:linear-gradient(135deg,#1d4ed8,#2563eb);transform:translateY(-1px);box-shadow:0 4px 10px #2563eb4d}.url-button-container{position:relative}.url-link-btn{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 16px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border-radius:8px;cursor:pointer;transition:all .3s ease;font-size:13px;font-weight:600;box-shadow:0 2px 6px #6366f133;border:none;width:100%}.url-link-btn:hover{background:linear-gradient(135deg,#5b21b6,#7c3aed);transform:translateY(-1px);box-shadow:0 4px 10px #6366f14d}.url-form-dropdown{position:absolute;top:100%;left:0;right:0;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 12px #0000001a;z-index:1000;margin-top:4px;padding:16px;animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.url-form-dropdown form{display:flex;flex-direction:column;gap:12px}.url-input{padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;font-family:inherit;transition:all .2s ease;background:#fff}.url-input:focus{outline:none;border-color:#2563eb;background:#fff;box-shadow:0 0 0 2px #2563eb1a}.url-input::placeholder{color:#94a3b8}.url-submit-btn{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;border:none;border-radius:8px;cursor:pointer;transition:all .3s ease;font-size:13px;font-weight:600;font-family:inherit;box-shadow:0 2px 6px #6366f133}.url-submit-btn:hover{background:linear-gradient(135deg,#5b21b6,#7c3aed);transform:translateY(-1px);box-shadow:0 4px 10px #6366f14d}.url-submit-btn:disabled{background:linear-gradient(135deg,#94a3b8,#cbd5e1);cursor:not-allowed;transform:none;box-shadow:0 2px 6px #94a3b833}.url-submit-btn:disabled:hover{background:linear-gradient(135deg,#94a3b8,#cbd5e1);transform:none;box-shadow:0 2px 6px #94a3b833}.delete-doc-btn{position:absolute;top:8px;right:8px;width:20px;height:20px;background:#ef4444;color:#fff;border:none;border-radius:50%;cursor:pointer;font-size:12px;display:none;align-items:center;justify-content:center;transition:all .2s ease}.subject-item:hover .delete-doc-btn{display:flex}.delete-doc-btn:hover{background:#dc2626;transform:scale(1.1)}.settings-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:100000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.settings-modal{background:#fff;border-radius:12px;box-shadow:0 20px 40px #00000026;width:90%;max-width:800px;max-height:80vh;overflow:hidden;animation:modalSlideIn .3s ease-out;display:flex;flex-direction:column}@keyframes modalSlideIn{0%{opacity:0;transform:translateY(-20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.settings-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px;border-bottom:1px solid #e2e8f0;background:linear-gradient(135deg,#f8fafc,#f1f5f9)}.settings-header h2{margin:0;font-size:18px;font-weight:700;color:#1e293b}.close-btn{background:none;border:none;font-size:18px;color:#64748b;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.close-btn:hover{background:#e2e8f0;color:#1e293b}.settings-body{display:flex;flex:1;min-height:0}.settings-sidebar{width:200px;background:#f8fafc;border-right:1px solid #e2e8f0;padding:16px 0}.settings-nav{display:flex;flex-direction:column;gap:4px}.nav-item{display:flex;align-items:center;gap:12px;padding:12px 20px;background:none;border:none;text-align:left;cursor:pointer;transition:all .2s ease;font-size:14px;font-weight:500;color:#64748b;border-radius:0}.nav-item:hover{background:#e2e8f0;color:#1e293b}.nav-item.active{background:#2563eb;color:#fff}.nav-icon{font-size:16px}.settings-content{flex:1;padding:24px;overflow-y:auto}.settings-section{margin-bottom:24px}.settings-section:last-child{margin-bottom:0}.settings-section h3{margin:0 0 16px;font-size:14px;font-weight:600;color:#374151;text-transform:uppercase;letter-spacing:.5px}.setting-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #f1f5f9}.setting-item:last-child{border-bottom:none}.setting-item label{display:flex;align-items:center;gap:8px;font-size:14px;color:#374151;cursor:pointer}.setting-item input[type=checkbox]{width:16px;height:16px;accent-color:#2563eb}.setting-item input[type=text],.setting-item input[type=email]{padding:8px 12px;border:2px solid #e2e8f0;border-radius:6px;font-size:13px;font-family:inherit;transition:all .2s ease;background:#fff;font-weight:500;color:#374151}.setting-item input[type=text]:focus,.setting-item input[type=email]:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a;background-color:#f8fafc}.setting-item select,.setting-item input[type=time]{padding:8px 36px 8px 12px;border:2px solid #e2e8f0;border-radius:8px;font-size:13px;background:#fff;font-family:inherit;font-weight:500;color:#374151;cursor:pointer;transition:all .2s ease;appearance:none;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");background-position:right 8px center;background-repeat:no-repeat;background-size:16px}.setting-item select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a;background:#f8fafc url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 8px center;background-size:16px}.setting-item input[type=time]:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a;background-color:#f8fafc}.setting-item select:hover{border-color:#cbd5e1;background:#f8fafc url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 8px center;background-size:16px}.danger-btn{background:#ef4444;color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease}.danger-btn:hover{background:#dc2626}.secondary-btn{background:#f1f5f9;color:#374151;border:1px solid #d1d5db;padding:8px 16px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease}.secondary-btn:hover{background:#e2e8f0}.settings-footer{display:flex;justify-content:flex-end;gap:12px;padding:20px 24px;border-top:1px solid #e2e8f0;background:#f8fafc}.cancel-btn{background:none;color:#64748b;border:1px solid #d1d5db;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.cancel-btn:hover{background:#f1f5f9;color:#374151}.save-btn{background:linear-gradient(135deg,#2563eb,#3b82f6);color:#fff;border:none;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #2563eb33}.save-btn:hover{background:linear-gradient(135deg,#1d4ed8,#2563eb);transform:translateY(-1px);box-shadow:0 4px 8px #2563eb4d}body.dark-mode{background:#0f172a;color:#e2e8f0}body.dark-mode .sidebar{background:#1e293b;border-right-color:#334155}body.dark-mode .sidebar-header{background:#0f172a;border-bottom-color:#334155}body.dark-mode .sidebar-footer{background:#0f172a;border-top-color:#334155}body.dark-mode .app-info h2{color:#3b82f6;background:linear-gradient(135deg,#3b82f6,#6366f1,#8b5cf6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}body.dark-mode .app-info p{color:#94a3b8}body.dark-mode .category-header{background:#334155;border-color:#475569}body.dark-mode .category-header:hover{background:#475569;border-color:#64748b}body.dark-mode .category-title,body.dark-mode .subject-item{color:#e2e8f0}body.dark-mode .subject-item:hover:not(.disabled){background:#475569;border-color:#6366f1}body.dark-mode .subject-item.active{background:#3b82f6;border-color:#2563eb}body.dark-mode .subject-name{color:#e2e8f0}body.dark-mode .subject-description{color:#94a3b8}body.dark-mode .upload-btn{background:#334155;border-color:#475569;color:#94a3b8}body.dark-mode .upload-btn:hover{background:#475569;border-color:#3b82f6;color:#3b82f6}body.dark-mode .upload-form,body.dark-mode .url-form-dropdown{background:#1e293b;border-color:#334155}body.dark-mode .url-input{background:#334155;border-color:#475569;color:#e2e8f0}body.dark-mode .url-input:focus{background:#475569;border-color:#3b82f6}body.dark-mode .view-switcher{background:#1e293b;border-color:#334155}body.dark-mode .current-view:hover{background:#334155}body.dark-mode .current-view-name{color:#e2e8f0}body.dark-mode .view-options{background:#1e293b;border-color:#334155}body.dark-mode .view-option{color:#e2e8f0}body.dark-mode .view-option:hover{background:#3b82f6;color:#fff}body.dark-mode .view-name,body.dark-mode .view-icon{color:inherit}body.dark-mode .user-section{background:#1e293b;border-color:#334155}body.dark-mode .user-info:hover{background:#334155}body.dark-mode .user-name{color:#e2e8f0}body.dark-mode .user-menu{background:#1e293b;border-color:#334155}body.dark-mode .user-menu-item{color:#e2e8f0}body.dark-mode .user-menu-item:hover{background:#3b82f6;color:#fff}body.dark-mode .settings-modal{background:#1e293b;color:#e2e8f0;border:2px solid #475569;box-shadow:0 20px 40px #0006}body.dark-mode .settings-header{background:linear-gradient(135deg,#0f172a,#1e293b);border-bottom-color:#334155}body.dark-mode .settings-header h2{color:#e2e8f0}body.dark-mode .settings-section h3{color:#94a3b8}body.dark-mode .setting-item{border-bottom-color:#334155}body.dark-mode .setting-item label{color:#e2e8f0}body.dark-mode .setting-item select,body.dark-mode .setting-item input[type=time]{border-color:#475569;color:#e2e8f0}body.dark-mode .setting-item select{background:#334155 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 8px center;background-size:16px}body.dark-mode .setting-item input[type=time]{background:#334155}body.dark-mode .setting-item select:focus{background:#475569 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 8px center;background-size:16px;border-color:#3b82f6}body.dark-mode .setting-item input[type=time]:focus{background:#475569;border-color:#3b82f6}body.dark-mode .setting-item select:hover{background:#475569 url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 8px center;background-size:16px;border-color:#64748b}.setting-item select option{background:#fff;color:#374151;padding:8px 12px;border-radius:4px;margin:2px 0}body.dark-mode .setting-item select option{background:#1e293b;color:#e2e8f0}body.dark-mode .secondary-btn{background:#334155;color:#e2e8f0;border-color:#475569}body.dark-mode .secondary-btn:hover{background:#475569}body.dark-mode .settings-sidebar{background:#0f172a;border-right-color:#334155}body.dark-mode .nav-item{color:#94a3b8}body.dark-mode .nav-item:hover{background:#334155;color:#e2e8f0}body.dark-mode .nav-item.active{background:#3b82f6;color:#fff}body.dark-mode .setting-item input[type=text],body.dark-mode .setting-item input[type=email]{background:#334155;border-color:#475569;color:#e2e8f0}body.dark-mode .setting-item input[type=text]:focus,body.dark-mode .setting-item input[type=email]:focus{background:#475569;border-color:#3b82f6}body.dark-mode .settings-footer{background:#0f172a;border-top-color:#334155}.settings-content .custom-select{min-width:200px}.settings-content .custom-select-trigger,.settings-content .custom-select-options{min-width:200px;width:200px}body.dark-mode .cancel-btn{color:#94a3b8;border-color:#475569}body.dark-mode .cancel-btn:hover{background:#334155;color:#e2e8f0}body.dark-mode .chatbot-container,body.dark-mode .chat-history,body.dark-mode .messages-container{background:#0f172a}body.dark-mode .message{background:#1e293b;color:#e2e8f0}body.dark-mode .user-message{background:#3b82f6}body.dark-mode .ai-message{background:#1e293b}body.dark-mode .chat-input{background:#1e293b;border-color:#334155}body.dark-mode .chat-input input{background:#334155;border-color:#475569;color:#e2e8f0}body.dark-mode .chat-input input::placeholder{color:#94a3b8}body.dark-mode .chat-input button{background:#3b82f6}body.dark-mode .welcome-message{color:#e2e8f0}body.dark-mode .loading-indicator{color:#94a3b8}body.dark-mode .graph-layout,body.dark-mode .graph-left{background:#0f172a}body.dark-mode .graph-title{color:#3b82f6}body.dark-mode ::-webkit-scrollbar{width:8px}body.dark-mode ::-webkit-scrollbar-track{background:#1e293b}body.dark-mode ::-webkit-scrollbar-thumb{background:#475569;border-radius:4px}body.dark-mode ::-webkit-scrollbar-thumb:hover{background:#64748b}.highlighted-word{font-weight:700;background:linear-gradient(120deg,#2563eb,#1d4ed8);color:#fff;padding:2px 6px;border-radius:6px;margin:0 1px;display:inline-block;position:relative;cursor:help;transition:all .2s ease;border:1px solid rgba(37,99,235,.3)}.word-tooltip{position:absolute;bottom:100%;left:50%;transform:translate(-50%);background:#000000e6;color:#fff;padding:8px 12px;border-radius:8px;font-size:12px;font-weight:400;white-space:nowrap;opacity:0;visibility:hidden;transition:all .2s ease;z-index:1000;margin-bottom:5px;box-shadow:0 4px 12px #0000004d}.word-tooltip:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:5px solid transparent;border-top-color:#000000e6}.tooltip-translation{font-size:13px;margin-bottom:4px;color:#fbbf24;font-weight:500}.tooltip-status{font-size:11px;color:#94a3b8;opacity:.8}.highlighted-word:hover{background:linear-gradient(120deg,#1d4ed8,#1e40af);transform:translateY(-1px);box-shadow:0 3px 8px #2563eb66;border-color:#2563eb99}.highlighted-word:hover .word-tooltip{opacity:1;visibility:visible}.highlighted-word:before{content:"✓";position:absolute;top:-8px;right:-6px;background:#2563eb;color:#fff;font-size:10px;width:14px;height:14px;border-radius:50%;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease;font-weight:700}.highlighted-word:hover:before{opacity:1}.highlighted-word:after{content:"";position:absolute;bottom:-2px;left:50%;transform:translate(-50%);width:0;height:2px;background:#2563eb;transition:width .2s ease}.highlighted-word:hover:after{width:100%}.message{margin-bottom:2rem;width:100%}.user-message{background:#f8fafc}.ai-message{background:#fff;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}.message-content{max-width:768px;margin:0 auto;padding:1.5rem;display:flex;gap:1rem;align-items:flex-start}.message-avatar{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-weight:700;font-size:14px;box-shadow:0 2px 4px #0000001a}.user-message .message-avatar{background:#7c3aed;color:#fff}.ai-message .message-avatar{background:#2563eb;color:#fff}.message-body{flex:1;min-width:0}.message-text{color:#1e293b;line-height:1.6;font-size:16px;word-wrap:break-word;white-space:pre-wrap}.message-time{font-size:.75rem;color:#64748b;margin-top:.5rem;font-weight:500}body.dark-mode .message{color:#e2e8f0}body.dark-mode .user-message{background:#1e293b}body.dark-mode .ai-message{background:#0f172a;border-top-color:#334155;border-bottom-color:#334155}body.dark-mode .message-text{color:#e2e8f0}body.dark-mode .message-time{color:#94a3b8}.loading-indicator{margin-bottom:2rem;background:#fff;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}.loading-indicator .message-content{max-width:768px;margin:0 auto;padding:1.5rem;display:flex;gap:1rem;align-items:flex-start}.loading-indicator .message-avatar{width:32px;height:32px;border-radius:8px;background:#2563eb;color:#fff;display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.loading-content{display:flex;flex-direction:column;gap:8px}.loading-dots{display:flex;gap:4px;align-items:center}.loading-text{color:#64748b;font-size:14px;font-style:italic;font-weight:500}.dot{width:8px;height:8px;border-radius:50%;background-color:#2563eb;animation:loading 1.4s infinite ease-in-out both}.dot:nth-child(1){animation-delay:-.32s}.dot:nth-child(2){animation-delay:-.16s}body.dark-mode .loading-indicator{background:#0f172a;border-top-color:#334155;border-bottom-color:#334155}body.dark-mode .loading-text{color:#94a3b8}body.dark-mode .dot{background-color:#3b82f6}.chat-history{flex:1;overflow-y:auto;background:#f8fafc;position:relative}.clear-history-btn-fixed{position:fixed;top:20px;right:20px;display:flex;align-items:center;gap:6px;padding:8px 12px;background:#ef4444;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:13px;font-weight:500;transition:all .2s ease;box-shadow:0 2px 8px #ef44444d;z-index:1000}.clear-history-btn-fixed:hover{background:#dc2626;transform:translateY(-1px);box-shadow:0 4px 12px #ef444466}.clear-history-btn-fixed svg{width:14px;height:14px}.messages-container{max-width:768px;margin:0 auto;padding:2rem 1rem;width:100%}body.dark-mode .chat-history,body.dark-mode .messages-container{background:#0f172a}.confirm-overlay{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:2000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.confirm-dialog{background:#fff;border-radius:12px;box-shadow:0 20px 40px #00000026;width:90%;max-width:400px;overflow:hidden;animation:confirmSlideIn .3s ease-out}@keyframes confirmSlideIn{0%{opacity:0;transform:translateY(-20px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}.confirm-header{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 16px;border-bottom:1px solid #e2e8f0}.confirm-header h3{margin:0;font-size:18px;font-weight:700;color:#1e293b}.confirm-close-btn{background:none;border:none;font-size:18px;color:#64748b;cursor:pointer;padding:4px;border-radius:4px;transition:all .2s ease}.confirm-close-btn:hover{background:#e2e8f0;color:#1e293b}.confirm-content{padding:20px 24px}.confirm-content p{margin:0 0 12px;font-size:14px;color:#374151;line-height:1.5}.confirm-warning{font-size:13px;color:#ef4444;font-weight:500}.confirm-actions{display:flex;justify-content:flex-end;gap:12px;padding:16px 24px 20px;background:#f8fafc;border-top:1px solid #e2e8f0}.confirm-cancel-btn{background:none;color:#64748b;border:1px solid #d1d5db;padding:8px 16px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.confirm-cancel-btn:hover{background:#f1f5f9;color:#374151}.confirm-ok-btn{background:#ef4444;color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #ef444433}.confirm-ok-btn:hover{background:#dc2626;transform:translateY(-1px);box-shadow:0 4px 8px #ef44444d}body.dark-mode .confirm-dialog{background:#1e293b;color:#e2e8f0}body.dark-mode .confirm-header{border-bottom-color:#334155}body.dark-mode .confirm-header h3{color:#e2e8f0}body.dark-mode .confirm-close-btn{color:#94a3b8}body.dark-mode .confirm-close-btn:hover{background:#334155;color:#e2e8f0}body.dark-mode .confirm-content p{color:#cbd5e1}body.dark-mode .confirm-warning{color:#f87171}body.dark-mode .confirm-actions{background:#0f172a;border-top-color:#334155}body.dark-mode .confirm-cancel-btn{color:#94a3b8;border-color:#475569}body.dark-mode .confirm-cancel-btn:hover{background:#334155;color:#e2e8f0}.chat-input-container{padding:1rem;background:#f8fafc;border-top:2px solid #e2e8f0}.chat-input-form{max-width:768px;margin:0 auto}.input-wrapper{position:relative;background:#fff;border-radius:12px;border:2px solid #e2e8f0;transition:border-color .2s,box-shadow .2s;box-shadow:0 2px 4px #0000000d}.input-wrapper:focus-within{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a}.chat-input{width:100%;padding:12px 50px 12px 16px;background:transparent;border:none;color:#1e293b;font-family:inherit;font-size:16px;line-height:1.5;resize:none;outline:none;max-height:200px;min-height:48px}.chat-input::placeholder{color:#64748b}.chat-input:disabled{opacity:.5;cursor:not-allowed}.send-button{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:32px;height:32px;background:#2563eb;color:#fff;border:none;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background-color .2s,transform .1s;box-shadow:0 2px 4px #2563eb33}.send-button:hover:not(:disabled){background:#1d4ed8;transform:translateY(-50%) scale(1.05)}.send-button:disabled{background:#cbd5e1;cursor:not-allowed;transform:translateY(-50%)}body.dark-mode .chat-input-container{background:#0f172a;border-top-color:#334155}body.dark-mode .input-wrapper{background:#1e293b;border-color:#334155}body.dark-mode .input-wrapper:focus-within{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}body.dark-mode .chat-input{color:#e2e8f0;background:transparent}body.dark-mode .chat-input::placeholder{color:#94a3b8}body.dark-mode .send-button{background:#3b82f6}body.dark-mode .send-button:hover:not(:disabled){background:#2563eb}body.dark-mode .send-button:disabled{background:#475569}.welcome-screen{display:flex;flex-direction:column;height:100%;justify-content:center;align-items:center;padding:2rem;max-width:768px;margin:0 auto}.welcome-content{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin-bottom:2rem}.welcome-header{margin-bottom:3rem}.subject-logo{width:80px;height:80px;background:linear-gradient(135deg,#2563eb,#1d4ed8);border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 1.5rem;box-shadow:0 8px 24px #2563eb4d}.subject-icon{font-size:32px;color:#fff}.welcome-header h1{font-size:2rem;font-weight:700;color:#1e40af;margin:0 0 1rem}.welcome-header p{font-size:1rem;color:#64748b;line-height:1.5;max-width:500px;margin:0}.suggestions-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem;width:100%;max-width:600px}.suggestion-card{background:#fff;border:2px solid #e2e8f0;border-radius:12px;padding:1rem;cursor:pointer;transition:all .2s ease;text-align:left;display:flex;align-items:flex-start;gap:.75rem;color:#1e293b;font-size:.9rem;line-height:1.4;box-shadow:0 2px 4px #0000000d}.suggestion-card:hover:not(:disabled){background:#f8fafc;border-color:#2563eb;transform:translateY(-2px);box-shadow:0 4px 12px #2563eb26}.suggestion-card:disabled{opacity:.5;cursor:not-allowed}.suggestion-icon{color:#2563eb;flex-shrink:0;margin-top:2px}.welcome-input{width:100%;max-width:768px}.learning-tips{margin-top:2rem;background:#fff;border-radius:12px;padding:1.5rem;max-width:500px;border:2px solid #e2e8f0;box-shadow:0 4px 12px #0000000d}.tip-title{font-size:1rem;font-weight:600;color:#1e40af;margin-bottom:1rem}.tips-list{display:flex;flex-direction:column;gap:.5rem}.tip-item{font-size:.9rem;color:#64748b;line-height:1.4}.loading-dots{display:flex;justify-content:center;gap:4px;margin-top:1rem}.loading-dots .dot{width:8px;height:8px;border-radius:50%;background-color:#2563eb;animation:loading 1.4s infinite ease-in-out both}.loading-dots .dot:nth-child(1){animation-delay:-.32s}.loading-dots .dot:nth-child(2){animation-delay:-.16s}@keyframes loading{0%,80%,to{transform:scale(0);opacity:.5}40%{transform:scale(1);opacity:1}}body.dark-mode .welcome-screen{background:#0f172a;color:#e2e8f0}body.dark-mode .welcome-header h1{color:#3b82f6}body.dark-mode .welcome-header p{color:#94a3b8}body.dark-mode .suggestion-card{background:#1e293b;border-color:#334155;color:#e2e8f0}body.dark-mode .suggestion-card:hover:not(:disabled){background:#334155;border-color:#3b82f6}body.dark-mode .suggestion-icon{color:#3b82f6}body.dark-mode .learning-tips{background:#1e293b;border-color:#334155}body.dark-mode .tip-title{color:#3b82f6}body.dark-mode .tip-item{color:#94a3b8}body.dark-mode .loading-dots .dot{background-color:#3b82f6}.chatbot-container{flex:1;display:flex;flex-direction:column;height:100vh;background:#f8fafc;position:relative}body.dark-mode .chatbot-container{background:#0f172a}.App{height:100vh;display:flex;background:#f8fafc;color:#1e293b;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}body.dark-mode .App{background:#0f172a;color:#e2e8f0}.graph-sidebar{width:400px;background:#fff;color:#1e293b;padding:20px;overflow-y:auto;border-left:2px solid #e2e8f0;position:relative;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;box-shadow:-4px 0 12px #0000001a}.graph-sidebar h2{margin:0 0 10px;font-size:18px;color:#1e40af;font-weight:700}.graph-sidebar pre{white-space:pre-wrap;font-size:12px;font-family:SF Mono,Monaco,Cascadia Code,Roboto Mono,Consolas,Courier New,monospace;line-height:1.4;margin:0;background:#f1f5f9;padding:12px;border-radius:8px;color:#334155;border:1px solid #e2e8f0}.close-button{background:transparent;border:none;font-size:20px;color:#64748b;cursor:pointer;position:absolute;top:10px;right:10px;padding:8px;border-radius:6px;transition:background-color .2s,color .2s}.close-button:hover{background:#f1f5f9;color:#1e293b}.node-summary{margin-top:20px}.node-summary h3{font-size:16px;color:#1e40af;margin-bottom:10px;font-weight:600}.node-summary p,.node-summary ul{list-style:none;padding:0;margin:0;font-size:13px;line-height:1.6;color:#475569}.node-summary li{margin-bottom:6px;padding-left:16px;position:relative}.node-summary li:before{content:"•";color:#2563eb;position:absolute;left:0;font-weight:700}body.dark-mode .graph-sidebar{background:#1e293b;color:#e2e8f0;border-left-color:#334155}body.dark-mode .graph-sidebar h2{color:#3b82f6}body.dark-mode .graph-sidebar pre{background:#0f172a;color:#e2e8f0;border-color:#334155}body.dark-mode .close-button{color:#94a3b8}body.dark-mode .close-button:hover{background:#334155;color:#e2e8f0}body.dark-mode .node-summary h3{color:#3b82f6}body.dark-mode .node-summary p,body.dark-mode .node-summary ul{color:#cbd5e1}body.dark-mode .node-summary li:before{color:#3b82f6}
