body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.title-bar{align-items:center;background-color:initial;display:flex;justify-content:center;min-width:0;padding:0}.title-text{color:#1f2937;cursor:pointer;font-size:16px;font-weight:700;margin:0;overflow:hidden;text-align:center;text-overflow:ellipsis;transition:color .2s ease;white-space:nowrap;width:100%}.title-text:hover{color:#2563eb;text-decoration:underline}.github-badge{align-items:center;background-color:#f3f4f6;border-radius:6px;cursor:pointer;display:flex;gap:6px;padding:6px 12px;position:fixed;right:12px;top:12px;transition:all .2s ease;z-index:100}.github-badge:hover{background-color:#e5e7eb;transform:translateY(-1px)}.github-icon{color:#1f2937;height:20px;width:20px}.star-count{color:#1f2937;font-size:14px;font-weight:500}.explanation-overlay{align-items:center;animation:fadeIn .2s ease;background-color:#00000080;bottom:0;display:flex;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:1000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.explanation-modal{animation:slideUp .3s ease;background-color:#fff;border-radius:12px;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;display:flex;flex-direction:column;max-height:80vh;max-width:600px;overflow:hidden;width:90%}@keyframes slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.explanation-header{align-items:center;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;padding:16px 20px}.explanation-title{color:#1f2937;font-size:1.25rem;font-weight:600;margin:0}.explanation-close{background:none;border:none;border-radius:4px;color:#6b7280;cursor:pointer;font-size:24px;line-height:1;padding:4px 8px;transition:all .2s ease}.explanation-close:hover{background-color:#f3f4f6;color:#1f2937}.explanation-content{line-height:1.6;overflow-y:auto;padding:20px}.explanation-content h3{color:#2563eb;font-size:1.125rem;font-weight:600;margin:0 0 16px}.explanation-section{margin-bottom:20px}.explanation-section:last-child{margin-bottom:0}.explanation-section h4{color:#1f2937;font-size:1rem;font-weight:600;margin:0 0 8px}.explanation-section p{color:#4b5563;margin:0}.explanation-section ol,.explanation-section ul{color:#4b5563;margin:0;padding-left:20px}.explanation-section li{margin-bottom:6px}.explanation-section ul ul{margin-top:6px}.explanation-content code{background-color:#f3f4f6;border-radius:4px;color:#2563eb;font-family:Consolas,Monaco,monospace;font-size:.9em;padding:2px 6px}.explanation-section strong{color:#1f2937}.data-input{background-color:#f9fafb;border-bottom:1px solid #e5e7eb;padding:8px 16px}.input-row{align-items:center;display:flex;flex-wrap:wrap}.input-label{color:#4b5563;font-size:14px;font-weight:500;white-space:nowrap}.input-field{border:1px solid #d1d5db;border-radius:6px;color:#1f2937;flex:1 1;font-size:14px;max-width:400px;min-width:120px;padding:6px 10px;transition:border-color .2s ease,box-shadow .2s ease}.input-field:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb1a;outline:none}.input-field.input-error{border-color:#dc2626}.input-field.input-error:focus{box-shadow:0 0 0 3px #dc26261a}.random-btn,.submit-btn{border:none;border-radius:6px;cursor:pointer;font-size:14px;font-weight:500;padding:8px 16px;transition:all .2s ease;white-space:nowrap}.submit-btn{background-color:#2563eb;color:#fff}.submit-btn:hover{background-color:#1d4ed8}.random-btn{background-color:#059669;color:#fff}.random-btn:hover{background-color:#047857}.error-message{color:#b42318;font-size:12px;margin-top:4px}.input-count{font-feature-settings:"tnum";color:#667085;flex:0 0 auto;font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}.input-count:has(+.input-error){color:#b42318}.preset-row{align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.preset-label{color:#6b7280;font-size:13px;white-space:nowrap}.preset-buttons{display:flex;flex-wrap:wrap;gap:6px}.preset-btn{background-color:#fff;border:1px solid #d1d5db;border-radius:4px;color:#4b5563;cursor:pointer;font-family:Consolas,Monaco,monospace;font-size:13px;padding:4px 10px;transition:all .2s ease}.preset-btn:hover{background-color:#f3f4f6;border-color:#2563eb;color:#2563eb}.problem-description-trigger{background:#f7faf8;border:1px solid #dce7e1;border-radius:7px;color:#315c4d;cursor:pointer;font-size:11px;padding:5px 9px}.problem-description-trigger:hover{background:#eff6f2;border-color:#9dbdad}.problem-description-overlay{background:#14251e7a;display:grid;inset:0;padding:20px;place-items:center;position:fixed;z-index:2000}.problem-description-dialog{background:#fff;border:1px solid #dfe8e3;border-radius:12px;box-shadow:0 20px 60px #122f2338;display:flex;flex-direction:column;max-height:min(80vh,760px);max-height:min(80dvh,760px);overflow:hidden;width:min(620px,100%)}.problem-description-header{align-items:center;border-bottom:1px solid #e4ebe7;display:flex;justify-content:space-between;padding:17px 22px 14px}.problem-description-number{color:#647a70;font-size:11px}.problem-description-header h2{color:#19332a;font-size:21px;margin:3px 0 0}.problem-description-close{background:#0000;border:0;border-radius:7px;color:#53675e;cursor:pointer;font-size:25px;height:34px;width:34px}.problem-description-close:hover{background:#f0f5f2}.problem-description-content{color:#33483f;font-size:14px;line-height:1.65;overflow-y:auto;padding:20px 22px 24px}.problem-description-statement{color:#263c32;margin:0 0 18px}.problem-description-content section{margin:0 0 17px}.problem-description-content h3{color:#1b4836;font-size:14px;margin:0 0 7px}.problem-description-content pre{background:#f5f8f6;border-left:3px solid #91b7a3;color:#33483f;font:inherit;margin:0;overflow-x:auto;padding:11px 13px;white-space:pre-wrap}.problem-description-content ul{margin:0;padding-left:20px}.problem-description-link{color:#17684d;display:inline-block;font-weight:600;margin-top:2px;text-underline-offset:3px}.problem-description-close:focus-visible,.problem-description-link:focus-visible,.problem-description-trigger:focus-visible{outline:3px solid #72a98b;outline-offset:3px}@media (max-width:700px){.problem-description-dialog{max-height:88vh;max-height:88dvh}.problem-description-content{padding:16px}}.language-selector{background-color:#eef3f1;border:1px solid #e1e9e5;border-radius:8px;display:flex;gap:3px;padding:3px}.language-btn{background-color:initial;border:none;border-radius:6px;color:#6b7280;cursor:pointer;font-size:13px;font-weight:500;padding:5px 9px;transition:all .2s ease}.language-btn:hover{background-color:#e5e7eb;color:#1f2937}.language-btn.active{background-color:#287d62;box-shadow:0 1px 2px #12362b29;color:#fff}.language-btn:focus-visible{outline:2px solid #287d62;outline-offset:2px}@media (prefers-reduced-motion:reduce){.language-btn{transition:none}}.code-display{background-color:#fff;border:1px solid #e5e7eb;border-radius:8px;display:flex;flex-direction:column;height:100%;overflow:hidden}.code-header{background-color:#f9fafb;border-bottom:1px solid #e5e7eb;display:flex;justify-content:flex-start;padding:8px 12px}.code-container{flex:1 1;overflow:auto;padding:12px 0}.code-pre{font-family:Consolas,Monaco,Courier New,monospace;font-size:13px;line-height:1.6;margin:0}.code-line{align-items:flex-start;display:flex;padding:2px 12px;transition:background-color .2s ease}.code-line.highlighted{background-color:#fef3c7}.line-number{color:#9ca3af;flex-shrink:0;padding-right:12px;text-align:right;-webkit-user-select:none;user-select:none;width:32px}.line-content{color:#1f2937;flex:1 1;white-space:pre}.line-variables{background-color:#dbeafe;border-radius:4px;color:#1d4ed8;flex-shrink:0;font-size:12px;margin-left:16px;padding:2px 8px;white-space:nowrap}.code-line .syntax-keyword{color:#2563eb;font-weight:600}.code-line .syntax-number{color:#d97706}.code-line .syntax-string{color:#059669}.code-line .syntax-function{color:#0891b2}.code-line .syntax-comment{color:#9ca3af;font-style:italic}.code-line .keyword{color:#2563eb;font-weight:600}.code-line .number{color:#d97706}.code-line .string{color:#059669}.code-line .comment{color:#9ca3af;font-style:italic}.step-description{align-items:center;background-color:#f0fdf4;border-top:1px solid #e5e7eb;display:flex;font-size:13px;gap:8px;padding:10px 12px}.step-label{color:#059669;font-weight:600;white-space:nowrap}.step-text{color:#1f2937}.d3-canvas-container{background-color:#fff;border-radius:8px;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;position:relative;width:100%}.canvas-teaching-header{background:#fff;border-bottom:1px solid #edf2ef;flex:0 0 auto;min-height:50px;padding:4px 8px 6px;z-index:1}.array-element rect{transition:fill .24s linear,stroke .24s linear,stroke-width .24s linear;transition:fill var(--motion-state-duration,.24s) linear,stroke var(--motion-state-duration,.24s) linear,stroke-width var(--motion-state-duration,.24s) linear}.canvas-step-meta{align-items:center;display:flex;gap:7px;min-height:20px}.canvas-step-count{font-feature-settings:"tnum";color:#60756d;font-size:10px;font-variant-numeric:tabular-nums;font-weight:600}.operation-badge{align-items:center;background:#edf7f2;border:1px solid #b9d9cb;border-radius:999px;color:#17684d;display:inline-flex;font-size:10px;font-weight:700;min-height:18px;padding:1px 8px}.operation-compare{background:#fff6df;border-color:#e6c886;color:#76530c}.operation-swap{background:#fff0e9;border-color:#edb9a5;color:#934224}.operation-done{background:#e7f5ec;border-color:#93c9b0;color:#145c40}.step-narration{-webkit-line-clamp:2;-webkit-box-orient:vertical;color:#30473e;display:-webkit-box;font-size:11px;line-height:1.4;margin:3px 0 0;overflow:hidden;text-overflow:ellipsis}.canvas-teaching-footer{align-items:center;background:#fff;border-top:1px solid #edf2ef;display:flex;flex:0 0 auto;gap:8px;justify-content:space-between;min-height:28px;padding:3px 8px;z-index:1}.canvas-legend,.canvas-metrics{align-items:center;color:#60756d;display:flex;font-size:9px;gap:10px;white-space:nowrap}.canvas-legend span{align-items:center;display:inline-flex;gap:4px}.legend-dot,.legend-swatch{border:1px solid #71877e;display:inline-block;height:9px;width:9px}.legend-dot{border-radius:50%}.legend-swatch{border-radius:2px}.legend-slow{background:#247d61}.legend-fast{background:#b37b19}.legend-compare{background:#f5d98e}.legend-processed{background:#a9d6c3}.legend-done{background:#18765a}.legend-zero{background:#dce3e0}.canvas-metrics span{border-left:1px solid #e4ebe7;padding-left:8px}.canvas-metrics b{font-feature-settings:"tnum";color:#1e6049;font-variant-numeric:tabular-nums;margin-left:3px}.d3-canvas{background:radial-gradient(ellipse at center,#fff 0,#fbfdfc 100%);cursor:grab;display:block;flex:1 1 auto;min-height:0;width:100%}.d3-canvas:active{cursor:grabbing}.arrow-explanation rect{filter:drop-shadow(0 2px 3px rgba(28,49,40,.16))}.arrow-explanation text{dominant-baseline:central;stroke:#fffdf7;stroke-width:.7px;stroke-linejoin:round;paint-order:stroke;pointer-events:none}.swap-phase-label{opacity:.72;pointer-events:none}.zoom-hint{background-color:#00000080;border-radius:4px;bottom:34px;color:#fff;font-size:10px;padding:4px 8px;pointer-events:none;position:absolute;right:8px}@media (max-width:700px){.canvas-legend{gap:5px;overflow:hidden}.canvas-legend span{gap:2px}.canvas-metrics{gap:4px}.canvas-legend,.canvas-metrics{font-size:8px}}@media (prefers-reduced-motion:reduce){.d3-canvas-container *,.d3-canvas-container :after,.d3-canvas-container :before{animation:none!important;transition:none!important}}.speed-selector{display:inline-block;position:relative}.speed-trigger{align-items:center;background-color:#f3f4f6;border:1px solid #e5e7eb;border-radius:6px;color:#1f2937;cursor:pointer;display:flex;font-size:13px;gap:6px;padding:8px 12px;transition:all .2s ease}.speed-trigger:hover{background-color:#e5e7eb}.speed-icon{font-size:14px}.speed-value{font-weight:500;min-width:36px;text-align:center}.speed-arrow{color:#6b7280;font-size:10px;transition:transform .2s ease}.speed-arrow.open{transform:rotate(180deg)}.speed-dropdown{background-color:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 4px 6px -1px #0000001a;left:0;list-style:none;margin-top:4px;padding:4px 0;position:absolute;right:0;top:100%;z-index:100}.speed-option{color:#1f2937;cursor:pointer;font-size:13px;padding:8px 12px;transition:background-color .15s ease}.speed-option:hover{background-color:#f3f4f6}.speed-option.selected{background-color:#dbeafe;color:#2563eb;font-weight:500}.control-panel{background-color:#fff;border-top:1px solid #e5e7eb;padding:12px 16px}.control-buttons{align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}@media (max-width:1099px){.control-buttons{flex-wrap:nowrap}}.control-btn{align-items:center;background-color:#f3f4f6;border:1px solid #e5e7eb;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;gap:2px;min-width:70px;padding:8px 16px;transition:all .2s ease}.control-btn:hover:not(:disabled){background-color:#e5e7eb;transform:translateY(-1px)}.control-btn:disabled{cursor:not-allowed;opacity:.5}.control-btn-primary{background-color:#247d61;border-color:#247d61;color:#fff}.control-btn-primary:hover:not(:disabled){background-color:#17684d}.control-btn-primary .btn-shortcut{color:#ffffffb3}.control-btn-reset{background-color:#fef3c7;border-color:#fcd34d}.control-btn-reset:hover:not(:disabled){background-color:#fde68a}.btn-icon{font-size:18px;line-height:1}.btn-label{font-size:12px;font-weight:500}.btn-shortcut{background-color:#0000000d;border-radius:3px;color:#9ca3af;font-size:10px;padding:1px 4px}.progress-bar-container{background-color:#fff;padding:8px 16px 12px;width:100%}.progress-bar{border-radius:4px;cursor:pointer;height:8px;outline:none;overflow:visible;position:relative;touch-action:none}.progress-bar.dragging{cursor:grabbing}.progress-bar:focus-visible .progress-handle{outline:3px solid #17684d;outline-offset:3px}.progress-track{right:0}.progress-played,.progress-track{border-radius:4px;height:100%;left:0;position:absolute;top:0}.progress-played{transition:width .1s ease}.progress-handle{border-radius:50%;box-shadow:0 2px 4px #0003;height:16px;position:absolute;top:50%;transform:translate(-50%,-50%);transition:transform .1s ease,box-shadow .1s ease;width:16px;z-index:10}.progress-bar.dragging .progress-handle,.progress-bar:hover .progress-handle{box-shadow:0 3px 6px #0000004d;transform:translate(-50%,-50%) scale(1.2)}.progress-markers{height:100%;left:0;pointer-events:none;position:absolute;right:0;top:0}.progress-marker{background-color:#fff;border-radius:50%;height:3px;opacity:.5;position:absolute;top:50%;transform:translate(-50%,-50%);width:3px}.progress-marker.passed{opacity:.8}@media (prefers-reduced-motion:reduce){.progress-handle,.progress-played{transition:none}}.progress-info{display:flex;font-size:12px;gap:4px;justify-content:center;margin-top:8px}.progress-current{color:#2563eb;font-weight:600}.progress-total{color:#9ca3af}.wechat-float{bottom:20px;position:fixed;right:20px;z-index:1000}.float-button{align-items:center;background:linear-gradient(135deg,#07c160,#06ad56);border-radius:50%;box-shadow:0 4px 12px #07c16066;cursor:pointer;display:flex;flex-direction:column;height:60px;justify-content:center;transition:all .3s ease;width:60px}.float-button:hover{box-shadow:0 6px 16px #07c16080;transform:scale(1.1)}.float-icon{font-size:20px;line-height:1}.float-text{color:#fff;font-size:10px;font-weight:500;margin-top:2px}.qr-popup{animation:fadeInUp .2s ease;bottom:70px;position:absolute;right:0}@keyframes fadeInUp{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.qr-container{background-color:#fff;border-radius:12px;box-shadow:0 8px 24px #00000026;padding:16px;text-align:center}.qr-image{border-radius:8px;display:block;height:auto;width:200px}.qr-prompt{color:#666;font-size:12px;line-height:1.5;margin:12px 0 0;max-width:200px}.qr-container:after{border-left:8px solid #0000;border-right:8px solid #0000;border-top:8px solid #fff;bottom:-8px;content:"";height:0;position:absolute;right:24px;width:0}.language-switcher{align-items:center;color:#52635e;display:inline-flex;font-size:11px;gap:6px;min-width:0;white-space:nowrap}.language-switcher-label{color:#66756f}.language-switcher select{-webkit-appearance:none;appearance:none;background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%2352635e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-position:right 9px center;background-repeat:no-repeat;border:1px solid #cfdad5;border-radius:7px;color:#20332c;cursor:pointer;font:inherit;height:30px;min-width:88px;padding:0 28px 0 10px;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}.language-switcher select:hover{background-color:#fbfdfc;border-color:#78a394}.language-switcher select:focus-visible{border-color:#268365;box-shadow:0 0 0 3px #26836529;outline:none}@media (max-width:700px){.language-switcher-label{display:none}}@media (prefers-reduced-motion:reduce){.language-switcher select{transition:none}}.algorithm-visualizer-page{background:#f3f7f5;color:#19332a;display:flex;flex-direction:column;height:100vh;height:100dvh;min-height:0;overflow:hidden;width:100%}.header-section{background:#fff;border-bottom:1px solid #dfe8e3;flex:0 0 auto}.header-top{align-items:center;display:flex;height:48px;justify-content:space-between;padding:0 12px;position:relative}.back-link{color:#597169;font-size:12px;max-width:220px;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;z-index:1}.back-link:hover{color:#17684d}.header-top>.title-bar{left:50%;position:absolute;transform:translateX(-50%);width:min(420px,calc(100% - 440px))}.header-actions{align-items:center;display:flex;gap:8px;min-width:0;z-index:1}.explanation-btn{background:#f7faf8;border:1px solid #dce7e1;border-radius:7px;color:#315c4d;cursor:pointer;font-size:11px;padding:5px 9px}.explanation-btn:hover{background:#eff6f2;border-color:#9dbdad}.header-actions .github-badge{position:static}.data-input{background:#fff;padding:5px 12px}.input-row{flex-wrap:nowrap;gap:8px;min-width:0}.input-field,.input-label{font-size:12px}.input-field{height:32px;min-width:80px}.random-btn,.submit-btn{font-size:12px;padding:6px 11px}.preset-row{gap:6px;margin-top:5px}.preset-btn,.preset-label{font-size:11px}.preset-btn{padding:3px 8px}.error-message{font-size:11px;margin:2px 0 0 76px}.main-section{grid-gap:8px;display:grid;flex:1 1 auto;gap:8px;grid-template-columns:minmax(0,1fr) clamp(320px,24vw,400px);min-height:0;padding:8px}.canvas-section,.code-section{min-height:0;min-width:0}.code-section{grid-column:2;grid-row:1}.canvas-section{align-items:stretch;background:#fff;border:1px solid #dfe8e3;border-radius:10px;display:flex;grid-column:1;grid-row:1;justify-content:stretch;overflow:hidden;padding:8px}.control-section{grid-gap:12px;align-items:center;background:#fff;border-top:1px solid #dfe8e3;display:grid;flex:0 0 auto;gap:12px;grid-template-columns:auto minmax(100px,1fr);min-height:52px;padding:4px 12px}.control-panel{background:#0000;padding:0}.control-buttons{flex-wrap:nowrap;gap:6px;justify-content:flex-start}.control-btn{border-radius:7px;flex-direction:row;gap:5px;min-width:0;padding:6px 8px}.btn-icon{font-size:14px}.btn-label{font-size:11px;white-space:nowrap}.btn-shortcut{display:none}.progress-section{min-width:0}.progress-bar-container{align-items:center;background:#0000;display:flex;gap:10px;padding:4px 0}.progress-bar{flex:1 1;min-width:30px}.progress-info{flex:0 0 auto;font-size:11px;margin:0;white-space:nowrap}@media (max-width:1099px){.main-section{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) clamp(180px,22vh,220px)}.canvas-section{grid-column:1;grid-row:1}.code-section{grid-column:1;grid-row:2}.control-section{gap:8px;grid-template-columns:auto minmax(70px,1fr)}}@media (max-width:700px){.header-top{height:44px;padding:0 8px}.back-link{font-size:10px;max-width:78px}.header-top>.title-bar{width:calc(100% - 180px)}.header-actions{gap:4px}.explanation-btn{font-size:10px;padding:4px 6px}.input-row{gap:4px}.input-label{display:none}.input-field{padding:5px 7px}.input-count{font-size:10px}.preset-row{overflow-x:auto;scrollbar-width:thin}.preset-buttons,.preset-row{flex-wrap:nowrap}.control-section{gap:2px;grid-template-columns:1fr;padding:3px 8px}.control-buttons{flex-wrap:wrap;justify-content:center}.control-btn{padding:5px 7px}.progress-bar-container{padding:2px 0}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}*{box-sizing:border-box}body,html{height:100%;margin:0;overflow:hidden;padding:0}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}#root,.App{height:100%}::-webkit-scrollbar{height:6px;width:6px}::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#a1a1a1}
/*# sourceMappingURL=main.850a3352.css.map*/