@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@400;600;700&display=swap";*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--bg: #f4f2fa;--surface: #ffffff;--surface2: #f0edf8;--border: rgba(0,0,0,.09);--text: #1a1428;--text-muted: #6b6080;--accent: #5b4be8;--accent-hover: #4a3cd6;--accent-dim: rgba(91,75,232,.12);--spin-up: #c07010;--spin-down: #1a4fa0;--success: #16a34a;--r-sm: 6px;--r-md: 10px;--r-lg: 16px;--r-full: 9999px}html,body{height:100%;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;font-size:14px;line-height:1.5}#root{min-height:100vh;display:flex;flex-direction:column}.header{background:var(--surface);border-bottom:1px solid var(--border);padding:12px 24px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:100}.header-title{display:flex;align-items:center;gap:12px}.header-title h1{font-family:Space Grotesk,sans-serif;font-size:clamp(1.1rem,2.5vw,1.5rem);font-weight:700;background:linear-gradient(135deg,var(--accent),var(--accent-hover));-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.header-subtitle{font-size:12px;color:var(--text-muted)}.theme-btn{background:var(--surface2);border:1px solid var(--border);color:var(--text);padding:8px 14px;border-radius:var(--r-full);cursor:pointer;font-size:13px;transition:all .15s ease;display:flex;align-items:center;gap:6px}.theme-btn:hover{background:var(--accent-dim);border-color:var(--accent)}.main{display:grid;grid-template-columns:240px 1fr 300px;gap:0;height:calc(100vh - 62px);overflow:hidden;padding:10px;max-width:1600px;margin:0 auto;width:100%}.control-panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px;display:flex;flex-direction:column;gap:14px;height:100%;overflow-y:auto;position:static}.panel-section{display:flex;flex-direction:column;gap:10px}.panel-section-title{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--text-muted);padding-bottom:6px;border-bottom:1px solid var(--border)}.param-row{display:flex;flex-direction:column;gap:4px}.param-label{display:flex;justify-content:space-between;align-items:center}.param-name{font-size:13px;color:var(--text-muted)}.param-value{font-size:13px;font-weight:600;color:var(--text);font-variant-numeric:tabular-nums}.param-value.accent{color:var(--accent)}input[type=range]{width:100%;height:4px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--border);border-radius:var(--r-full);outline:none;cursor:pointer}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--accent);cursor:pointer;transition:background .15s}input[type=range]::-webkit-slider-thumb:hover{background:var(--accent-hover)}select,input[type=number]{width:100%;background:var(--surface2);border:1px solid var(--border);color:var(--text);padding:6px 10px;border-radius:var(--r-sm);font-size:13px;outline:none;transition:border-color .15s}select:focus,input[type=number]:focus{border-color:var(--accent)}.radio-group{display:flex;gap:6px}.radio-btn{flex:1;padding:6px 8px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-sm);cursor:pointer;font-size:12px;color:var(--text-muted);text-align:center;transition:all .15s;-webkit-user-select:none;user-select:none}.radio-btn.active{background:var(--accent-dim);border-color:var(--accent);color:var(--accent);font-weight:600}.radio-btn:hover:not(.active){border-color:var(--text-muted)}.btn-run{width:100%;padding:10px;border-radius:var(--r-md);border:none;font-size:14px;font-weight:600;cursor:pointer;transition:all .15s ease;display:flex;align-items:center;justify-content:center;gap:8px}.btn-run.run{background:var(--accent);color:#fff}.btn-run.run:hover{background:var(--accent-hover);transform:translateY(-1px)}.btn-run.stop{background:#ef444433;border:1px solid rgba(239,68,68,.4);color:#f87171}.btn-run.stop:hover{background:#ef44444d}.btn-reset{width:100%;padding:8px;border-radius:var(--r-md);border:1px solid var(--border);background:transparent;color:var(--text-muted);font-size:13px;cursor:pointer;transition:all .15s}.btn-reset:hover{border-color:var(--text-muted);color:var(--text)}.phase-box{padding:10px 12px;border-radius:var(--r-md);font-size:12px;border:1px solid var(--border);background:var(--surface2)}.phase-label{font-weight:600;font-size:13px;margin-bottom:2px}.phase-label.ordered{color:var(--spin-up)}.phase-label.disordered{color:#60a5fa}.phase-label.critical{color:#a78bfa}.spin-area{display:flex;flex-direction:column;gap:4px;min-width:0;height:100%;padding:0 6px}.spin-grid-container{background:transparent;border:none;border-radius:0;padding:0;display:flex;flex-direction:column;gap:4px;flex:1;min-height:0;overflow:hidden}.spin-grid-header{display:flex;align-items:center;justify-content:space-between}.spin-grid-title{font-family:Space Grotesk,sans-serif;font-weight:600;font-size:15px}.step-badge{background:var(--accent-dim);color:var(--accent);padding:3px 10px;border-radius:var(--r-full);font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}.canvas-wrapper{display:flex;justify-content:center;align-items:center;background:var(--surface2);border-radius:var(--r-md);overflow:hidden;flex:1;min-height:0}canvas{display:block;image-rendering:pixelated;max-width:100%}.progress-bar-track{width:100%;height:4px;background:var(--border);border-radius:var(--r-full);overflow:hidden}.progress-bar-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-hover));border-radius:var(--r-full);transition:width .3s ease}.charts-col{display:flex;flex-direction:column;gap:5px;height:100%;overflow:hidden;min-width:0;padding-left:6px}.chart-container{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:7px 10px;flex:1;min-height:0;display:flex;flex-direction:column}.chart-title{font-weight:600;font-size:13px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}.chart-current-value{font-variant-numeric:tabular-nums;font-size:12px;color:var(--text-muted)}.chart-current-value span{font-weight:700;font-size:14px}@keyframes spin{to{transform:rotate(360deg)}}.spinner{width:14px;height:14px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .55s linear infinite;flex-shrink:0}.tc-marker{font-size:11px;color:var(--text-muted);text-align:right;margin-top:2px}.tc-marker span{color:#a78bfa;font-weight:600}.spin-legend{display:flex;gap:16px;font-size:12px;color:var(--text-muted)}.legend-item{display:flex;align-items:center;gap:5px}.legend-dot{width:12px;height:12px;border-radius:2px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;flex:1;color:var(--text-muted);font-size:13px}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}@media (max-width: 900px){.main{grid-template-columns:1fr;height:auto;overflow:visible}.control-panel{height:auto;overflow-y:visible}.spin-area{height:auto}.spin-grid-container{flex:none;min-height:300px}.canvas-wrapper{min-height:300px;flex:none}.charts-col{height:auto;overflow-y:visible}}
