:root{--lab-bg:#070a13;--panel-bg:#0f172abf;--glass-border:#ffffff14;--text:#f8fafc;--text-muted:#94a3b8;--red:#f43f5e;--green:#10b981;--blue:#3b82f6;--cyan:#06b6d4;--magenta:#d946ef;--yellow:#eab308;--font-main:"Outfit", "Noto Sans SC", sans-serif;--font-mono:"Orbitron", monospace;--accent:#10b981;--border-radius:20px}*{box-sizing:border-box;margin:0;padding:0}body,html{background-color:var(--lab-bg);width:100%;height:100%;color:var(--text);font-family:var(--font-main);line-height:1.5;overflow:hidden}#app-container{flex-direction:column;width:100vw;height:100vh;display:flex;overflow:hidden}.app-header{-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-bottom:1px solid var(--glass-border);z-index:200;background:#0f172af2;flex-shrink:0;justify-content:space-between;align-items:center;gap:.8rem;height:60px;padding:0 1.2rem;display:flex}.back-btn{color:var(--text-muted);white-space:nowrap;align-items:center;gap:.4rem;font-size:.85rem;font-weight:500;text-decoration:none;transition:color .3s;display:flex}.back-btn svg{flex-shrink:0;width:18px;height:18px}.back-btn:hover{color:#fff}.mode-tabs{border:1px solid var(--glass-border);background:#00000080;border-radius:30px;padding:3px;display:flex}.mode-tab{color:var(--text-muted);cursor:pointer;white-space:nowrap;background:0 0;border:none;border-radius:20px;padding:.45rem 1.1rem;font-family:inherit;font-size:.82rem;font-weight:600;transition:all .3s cubic-bezier(.4,0,.2,1)}.mode-tab.active{background:var(--text);color:#0f172a;box-shadow:0 4px 12px #ffffff26}.header-action-btn{border:1px solid var(--glass-border);color:#e2e8f0;cursor:pointer;white-space:nowrap;background:#ffffff0f;border-radius:20px;align-items:center;gap:.3rem;padding:.4rem .8rem;font-family:inherit;font-size:.8rem;font-weight:600;transition:all .3s;display:flex}.header-action-btn:hover{background:#ffffff1f;border-color:#fff3}.main-content{flex:1;height:calc(100vh - 60px);display:flex;overflow:hidden}#sidebar{background:var(--panel-bg);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);border-right:1px solid var(--glass-border);flex-direction:column;flex-shrink:0;gap:1rem;width:350px;padding:1.2rem;display:flex;overflow-y:auto}.control-card{border:1px solid var(--glass-border);background:#ffffff05;border-radius:16px;padding:1rem;transition:border-color .3s}.accordion-header{cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;padding:.2rem 0;display:flex}.accordion-header .panel-section-title{margin-bottom:0}.accordion-arrow{color:var(--text-muted);font-size:.75rem;transition:transform .3s}.accordion-header.active .accordion-arrow{transform:rotate(180deg)}.accordion-body{margin-top:.8rem;transition:all .3s}.accordion-body.hidden-body{display:none!important}.panel-section-title{text-transform:uppercase;letter-spacing:1px;color:#cbd5e1;border-left:3px solid var(--accent);padding-left:.6rem;font-size:.85rem;font-weight:700}.slider-row{align-items:center;gap:.6rem;margin-bottom:.6rem;display:flex}.slider-row:last-child{margin-bottom:0}.slider-label{white-space:nowrap;min-width:42px;font-size:.82rem;font-weight:600}.slider-row input[type=range]{flex:1}.slider-val{font-family:var(--font-mono);text-align:right;min-width:38px;font-size:.8rem;font-weight:700}input[type=range]{appearance:none;background:#ffffff1a;border-radius:4px;outline:none;width:100%;height:8px}input[type=range]::-webkit-slider-thumb{appearance:none;cursor:pointer;background:#fff;border-radius:50%;width:18px;height:18px;transition:transform .1s;box-shadow:0 0 10px #ffffff80}input[type=range]::-webkit-slider-thumb:hover{transform:scale(1.2)}#slide-r::-webkit-slider-runnable-track{background:linear-gradient(to right, #000, var(--red));border-radius:4px;height:8px}#slide-g::-webkit-slider-runnable-track{background:linear-gradient(to right, #000, var(--green));border-radius:4px;height:8px}#slide-b::-webkit-slider-runnable-track{background:linear-gradient(to right, #000, var(--blue));border-radius:4px;height:8px}#slide-c::-webkit-slider-runnable-track{background:linear-gradient(to right, #fff, var(--cyan));border-radius:4px;height:8px}#slide-m::-webkit-slider-runnable-track{background:linear-gradient(to right, #fff, var(--magenta));border-radius:4px;height:8px}#slide-y::-webkit-slider-runnable-track{background:linear-gradient(to right, #fff, var(--yellow));border-radius:4px;height:8px}.r-text{color:var(--red);text-shadow:0 0 8px #f43f5e4d}.g-text{color:var(--green);text-shadow:0 0 8px #10b9814d}.b-text{color:var(--blue);text-shadow:0 0 8px #3b82f64d}.c-text{color:var(--cyan);text-shadow:0 0 8px #06b6d44d}.m-text{color:var(--magenta);text-shadow:0 0 8px #d946ef4d}.y-text{color:var(--yellow);text-shadow:0 0 8px #eab3084d}.control-row{justify-content:space-between;align-items:center;margin-bottom:.8rem;display:flex}.control-row.no-wrap{white-space:nowrap;align-items:center;gap:.6rem;display:flex}.control-label-nowrap{color:var(--text-muted);white-space:nowrap;flex-shrink:0;min-width:56px;font-size:.8rem}.control-row.no-wrap input[type=range]{flex:1}.radius-val{font-family:var(--font-mono);text-align:right;min-width:32px;color:var(--text);flex-shrink:0;font-size:.8rem;font-weight:700}select{border:1px solid var(--glass-border);color:#fff;cursor:pointer;background:#0006;border-radius:8px;outline:none;padding:.4rem .8rem;font-family:inherit;font-size:.8rem}.secondary-btn{border:1px solid var(--glass-border);width:100%;color:var(--text);cursor:pointer;background:#ffffff0d;border-radius:10px;margin-top:.4rem;padding:.5rem;font-family:inherit;font-size:.82rem;font-weight:600;transition:all .3s}.secondary-btn:hover{background:#ffffff1a}.challenge-desc-row{justify-content:space-between;align-items:center;gap:.5rem;margin-bottom:.8rem;display:flex}.challenge-desc-row .challenge-desc{color:var(--text-muted);margin-bottom:0;font-size:.75rem;line-height:1.3}.challenge-toggle-btn{color:#fff;cursor:pointer;white-space:nowrap;background:linear-gradient(135deg,#10b981 0%,#059669 100%);border:none;border-radius:20px;flex-shrink:0;padding:.35rem .75rem;font-size:.75rem;font-weight:700;transition:transform .15s;box-shadow:0 2px 8px #10b9814d}.challenge-toggle-btn:active{transform:scale(.96)}.challenge-area{animation:.3s forwards slideDown}.match-score-header{justify-content:space-between;align-items:center;margin-bottom:.4rem;font-size:.75rem;display:flex}.score-title{color:var(--text-muted);font-weight:500}.score-value{font-family:var(--font-mono);color:var(--accent);font-weight:700}.color-match-bar-wrapper{align-items:center;gap:.6rem;display:flex}.color-preview-box{flex-direction:column;flex-shrink:0;align-items:center;gap:2px;display:flex}.color-preview-circle-sm{background-color:#000;border:2px solid #fff;border-radius:50%;width:34px;height:34px;transition:background-color .15s;box-shadow:0 2px 8px #00000080}.preview-tag{color:var(--text-muted);font-size:.65rem}.score-bar-bg{background:#ffffff1a;border-radius:4px;flex:1;height:8px;overflow:hidden}.score-bar-fill{background:var(--accent);border-radius:4px;height:100%;transition:width .2s,background .3s}.success-alert{color:#34d399;text-align:center;background:#10b9811a;border:1px solid #10b9814d;border-radius:10px;margin-top:.8rem;padding:.6rem;font-size:.75rem}#workspace-container{background-image:radial-gradient(circle at 2px 2px,#ffffff04 1px,#0000 0);background-size:30px 30px;flex-direction:column;flex:1;display:flex;overflow:hidden}.workspace-main{flex-direction:column;gap:1rem;height:100%;padding:1.5rem;display:flex}.canvas-wrapper{border:1px solid var(--glass-border);border-radius:var(--border-radius);background:#00000080;width:100%;height:100%;min-height:240px;position:relative;overflow:hidden;box-shadow:inset 0 4px 30px #000c}#mix-canvas{cursor:grab;touch-action:none;width:100%;height:100%}#mix-canvas:active{cursor:grabbing}.interaction-hint{color:#ffffff80;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);pointer-events:none;white-space:nowrap;background:#000000a6;border:1px solid #ffffff0d;border-radius:20px;align-items:center;gap:.4rem;padding:4px 12px;font-size:.7rem;display:flex;position:absolute;bottom:12px;left:50%;transform:translate(-50%)}.interaction-hint svg{animation:1.5s ease-in-out infinite floatHand}.resize-handle{cursor:ns-resize;touch-action:none;-webkit-user-select:none;user-select:none;background:#0f172ae6;border-top:1px solid #ffffff0d;flex-shrink:0;justify-content:center;align-items:center;width:100%;height:24px;transition:background .2s;display:flex}.resize-handle:hover,.resize-handle.active{background:#ffffff14}.handle-bar{background:#ffffff4d;border-radius:10px;width:42px;height:5px;transition:all .2s}.resize-handle:hover .handle-bar,.resize-handle.active .handle-bar{background:var(--accent);width:54px}.spectrum-panel{flex-direction:column;gap:.6rem;width:100%;display:flex}.spectrum-canvas-wrapper{border:1px solid var(--glass-border);background:#04060b;border-radius:12px;height:180px;position:relative;overflow:hidden}#spectrum-canvas{width:100%;height:100%}.spectrum-legend{justify-content:space-between;display:flex}.wavelength-label{color:var(--text-muted);width:33%;font-size:.65rem}.text-center{text-align:center}.text-right{text-align:right}.spectrum-desc{color:var(--text-muted);border-top:1px solid #ffffff0d;padding-top:.5rem;font-size:.75rem;line-height:1.4}.modal-backdrop{-webkit-backdrop-filter:blur(14px);z-index:1000;background:#000000d9;justify-content:center;align-items:center;padding:1.5rem;animation:.3s fadeIn;display:flex;position:fixed;inset:0}.modal-content{border:1px solid var(--glass-border);background:#0f172a;border-radius:24px;flex-direction:column;width:100%;max-width:900px;max-height:85vh;padding:2rem;display:flex;overflow-y:auto;box-shadow:0 25px 50px -12px #000000e6}.modal-header{border-bottom:1px solid var(--glass-border);justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding-bottom:1rem;display:flex}.modal-title{background:linear-gradient(to right, #fff 20%, var(--text-muted) 80%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text;font-size:1.3rem;font-weight:700}.modal-close-btn{border:1px solid var(--glass-border);color:var(--text-muted);cursor:pointer;background:#ffffff0f;border-radius:50%;justify-content:center;align-items:center;width:38px;height:38px;font-size:1.5rem;transition:all .2s;display:flex}.modal-close-btn:hover{color:#fff;background:#ffffff2e}.theory-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1.5rem;display:grid}.theory-card{border:1px solid var(--glass-border);background:#ffffff05;border-radius:16px;padding:1.5rem}.theory-card .card-icon{margin-bottom:.8rem;font-size:2rem}.theory-card h4{color:#f1f5f9;margin-bottom:.6rem;font-size:1rem;font-weight:600}.theory-card p{color:var(--text-muted);margin-bottom:.8rem;font-size:.85rem;line-height:1.5}.theory-card ul{margin-bottom:.8rem;list-style:none}.theory-card li{color:var(--text-muted);margin-bottom:.3rem;padding-left:1rem;font-size:.82rem;position:relative}.theory-card li:before{content:"•";color:var(--accent);font-weight:700;position:absolute;left:0}.theory-formula{font-family:var(--font-mono);color:#cbd5e1;background:#0000004d;border:1px solid #ffffff0d;border-radius:8px;margin-bottom:.8rem;padding:.7rem;font-size:.78rem;line-height:1.5}.app-example{border-left:2px solid var(--accent);color:#94a3b8;padding-left:.6rem;font-size:.78rem!important}.hidden{display:none!important}@media (width<=900px){.app-header{height:55px;padding:0 .6rem}.back-btn .back-text{display:none}.mode-tab{padding:.35rem .75rem;font-size:.75rem}.header-action-btn{padding:.35rem .65rem;font-size:.75rem}.main-content{flex-direction:column;height:calc(100vh - 55px);overflow-y:auto}#workspace-container{z-index:100;border-bottom:1px solid var(--glass-border);background:#070a13;flex:none;height:auto;padding:.6rem .6rem 0;position:sticky;top:0;box-shadow:0 6px 20px #000000b3}.workspace-main{height:auto;padding:0}.canvas-wrapper{border-radius:14px;height:350px;transition:none}#sidebar{border-right:none;gap:.8rem;width:100%;height:auto;padding:.8rem;overflow-y:visible}.modal-content{max-height:90vh;padding:1.2rem}.theory-grid{grid-template-columns:1fr}}@media (width>=901px){.main-content{flex-direction:row}#sidebar{order:1;width:350px}#workspace-container{flex:1;order:2}.workspace-main{padding:1.8rem}.canvas-wrapper{height:100%;min-height:480px}.resize-handle{display:none}}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes floatHand{0%,to{transform:translate(0)}50%{transform:translate(-4px)}}
