:root{font-family:Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,PingFang SC,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;width:100%;overflow:hidden}body{font-family:Noto Sans SC,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,PingFang SC,sans-serif;background:#0f172a;color:#e2e8f0}.app{height:100vh;width:100vw;display:flex;flex-direction:column;position:relative}.header{height:60px;width:100%;background:linear-gradient(135deg,#1e1b4b,#312e81,#1e293b);border-bottom:2px solid #fbbf24;display:flex;align-items:center;justify-content:space-between;padding:0 24px;flex-shrink:0;box-shadow:0 4px 20px #0000004d}.header-left{display:flex;align-items:center;gap:20px}.logo{display:flex;align-items:center;gap:12px}.logo-icon{width:40px;height:40px;background:linear-gradient(135deg,#fbbf24,#f59e0b);border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px #fbbf244d;animation:logoPulse 2s ease-in-out infinite}@keyframes logoPulse{0%,to{transform:scale(1)}50%{transform:scale(1.05)}}.logo-icon svg{width:28px;height:28px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.2))}.logo-text{display:flex;flex-direction:column;align-items:flex-start}.logo-text h1{font-size:1.5rem;font-weight:800;color:#fbbf24;letter-spacing:1px;text-shadow:0 2px 4px rgba(0,0,0,.3);margin:0;line-height:1.2}.logo-subtitle{font-size:.85rem;color:#94a3b8;font-weight:500;letter-spacing:2px;margin-top:-2px}.shortcut-hint{font-size:.75rem;color:#fbbf24;background:#fbbf241a;border:1px solid rgba(251,191,36,.3);padding:6px 12px;border-radius:20px;font-family:Consolas,monospace;font-weight:600}.header-right{display:flex;align-items:center;gap:16px}.user-info{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#fbbf241a;border:1px solid rgba(251,191,36,.2);border-radius:8px}.user-stats{font-size:.8rem;color:#fbbf24;font-weight:600}.user-id{font-size:.75rem;color:#94a3b8;font-family:Consolas,monospace;display:flex;align-items:center;gap:6px}.badge-custom{background:#fbbf2433;color:#fbbf24;padding:1px 6px;border-radius:4px;font-size:.65rem;font-weight:600}.btn-reset-user{padding:4px 10px;background:transparent;border:1px solid #475569;border-radius:4px;color:#94a3b8;font-size:.75rem;cursor:pointer;transition:all .2s}.btn-reset-user:hover{background:#334155;color:#e2e8f0}.btn-history-toggle{padding:8px 16px;background:#334155;border:1px solid #475569;border-radius:6px;color:#e2e8f0;font-size:.875rem;cursor:pointer;transition:all .2s;font-family:inherit}.btn-history-toggle:hover{background:#475569}.status{display:flex;align-items:center;gap:8px;font-size:.875rem;color:#94a3b8}.status-dot{width:8px;height:8px;border-radius:50%;background:#64748b;transition:all .3s}.status-dot.active{background:#22c55e;box-shadow:0 0 8px #22c55e}.history-sidebar{position:fixed;top:56px;left:0;width:350px;height:calc(100vh - 56px);background:#1e293b;border-right:1px solid #334155;z-index:100;display:flex;flex-direction:column;animation:slideIn .3s ease}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}.history-header{height:56px;background:#252f47;border-bottom:1px solid #334155;display:flex;align-items:center;justify-content:space-between;padding:0 16px;position:relative}.history-header h3{font-size:1rem;font-weight:600;color:#f1f5f9;margin:0;line-height:1}.history-list{flex:1;overflow-y:auto;padding:12px}.history-empty{color:#64748b;text-align:center;padding:40px 20px;font-size:.9rem}.history-item{background:#252f47;border:1px solid #334155;border-radius:8px;padding:12px;margin-bottom:10px;cursor:pointer;transition:all .2s}.history-item:hover{background:#2d3a56;border-color:#475569}.history-item.active{background:#1e3a5f;border-color:#3b82f6}.history-item-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.history-id{font-size:.8rem;color:#3b82f6;font-weight:600}.history-time{font-size:.75rem;color:#64748b}.history-preview{font-size:.8rem;color:#94a3b8;line-height:1.4;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.main-content{flex:1;display:flex;flex-direction:row;overflow:hidden;width:100%;height:calc(100vh - 56px)}.left-panel{flex:1;min-width:0;display:flex;flex-direction:column;border-right:1px solid #334155;height:100%}.control-bar{height:64px;background:#1e293b;border-bottom:1px solid #334155;display:flex;align-items:center;gap:16px;padding:0 16px;flex-shrink:0}.buttons{display:flex;gap:10px;flex-shrink:0}.btn{padding:10px 18px;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s;white-space:nowrap;font-family:inherit}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary:hover:not(:disabled){background:#2563eb}.btn-capture{background:#10b981;color:#fff}.btn-capture:hover:not(:disabled){background:#059669}.btn-stop{background:#ef4444;color:#fff}.btn-stop:hover:not(:disabled){background:#dc2626}.btn-secondary:hover:not(:disabled){background:#475569}.prompt-box{flex:1;min-width:200px}.prompt-box input{width:100%;padding:10px 14px;background:#0f172a;border:1px solid #475569;border-radius:6px;color:#e2e8f0;font-size:.875rem;transition:border-color .2s;font-family:inherit}.prompt-box input:focus{outline:none;border-color:#3b82f6}.prompt-box input::placeholder{color:#64748b}.selection-hint{background:#1e293b;color:#94a3b8;padding:8px 16px;font-size:.85rem;border-bottom:1px solid #334155;text-align:center}.video-wrapper{flex:1;background:#0f172a;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;min-height:0}.video-container{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.video-container video{width:100%;height:100%;object-fit:contain;display:none;background:#000;cursor:crosshair}.video-container video.active{display:block}.selection-canvas{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:10}.video-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;color:#64748b;text-align:center;padding:40px}.placeholder-icon{font-size:4rem;margin-bottom:16px;opacity:.5}.video-placeholder p{font-size:1rem}.logs-bar{height:32px;background:#0f172a;border-top:1px solid #334155;display:flex;align-items:center;gap:20px;padding:0 16px;font-size:.75rem;font-family:Consolas,monospace;color:#64748b;overflow:hidden;flex-shrink:0}.log-item{white-space:nowrap}.right-panel{width:450px;min-width:350px;max-width:40%;background:#1e293b;display:flex;flex-direction:column;overflow:hidden;height:100%;flex-shrink:0}.result-box{flex:1;display:flex;flex-direction:column;border-bottom:1px solid #334155;overflow:hidden;min-height:0}.result-box:last-child{border-bottom:none}.result-header{height:44px;background:#252f47;display:flex;align-items:center;justify-content:space-between;padding:0 16px;flex-shrink:0}.result-header h3{font-size:.9rem;font-weight:600;color:#f1f5f9}.copy-btn{padding:4px 12px;background:transparent;border:1px solid #475569;border-radius:4px;color:#94a3b8;font-size:.75rem;cursor:pointer;transition:all .2s;font-family:inherit}.copy-btn:hover{background:#334155;color:#e2e8f0}.result-content{flex:1;overflow-y:auto;padding:16px;background:#1e293b;min-height:0}.result-content pre{white-space:pre-wrap;word-wrap:break-word;font-family:Consolas,Monaco,Courier New,monospace;font-size:.85rem;line-height:1.7;color:#e2e8f0;background:#0f172a;padding:16px;border-radius:8px;border:1px solid #334155;min-height:100%}.empty-state{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#64748b;padding:40px}.empty-icon{font-size:3rem;margin-bottom:12px;opacity:.3}.empty-state p{font-size:.9rem}.error-toast{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:#dc2626;color:#fff;padding:12px 24px;border-radius:8px;font-size:.875rem;box-shadow:0 4px 20px #dc262666;cursor:pointer;z-index:1000;animation:slideUp .3s ease;font-family:inherit}@keyframes slideUp{0%{opacity:0;transform:translate(-50%) translateY(20px)}to{opacity:1;transform:translate(-50%) translateY(0)}}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#1e293b}::-webkit-scrollbar-thumb{background:#475569;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#64748b}@media(max-width:1024px){.right-panel{width:380px;min-width:300px}.history-sidebar{width:300px}}.quota-bar{position:fixed;bottom:0;left:0;right:0;height:24px;background:#0f172af2;border-top:1px solid #334155;display:flex;align-items:center;justify-content:space-between;padding:0 16px;font-size:11px;color:#64748b;z-index:100}.quota-info{display:flex;align-items:center;gap:6px}.quota-label{color:#475569}.quota-model{font-weight:500;padding:1px 6px;border-radius:3px;background:#3b82f626;color:#60a5fa}.quota-model.can-degrade{background:#3b82f626;color:#60a5fa}.quota-model.will-degrade{background:#f59e0b26;color:#fbbf24}.quota-model.last-model{background:#ef444426;color:#f87171}.degrade-hint{margin-left:4px;font-size:10px;color:#fbbf24;font-weight:600}.model-accuracy{margin-left:4px;font-size:10px;color:#94a3b8;font-weight:400}.switch-count{margin-left:4px;font-size:10px;color:#f87171;font-weight:600}.quota-usage{display:flex;align-items:center;gap:12px}.usage-item{color:#64748b}.usage-item.current{color:#60a5fa;font-weight:500}.usage-item.threshold{color:#f87171}.main-content{padding-bottom:24px}@media(max-width:768px){.main-content{flex-direction:column;padding-bottom:24px}.right-panel{width:100%;height:40%;min-height:200px;max-width:none;border-left:none;border-top:1px solid #334155}.left-panel{height:60%}.control-bar{flex-wrap:wrap;height:auto;padding:10px;min-height:64px}.prompt-box{min-width:auto;width:100%;margin-top:8px}.history-sidebar{width:100%;top:56px;height:calc(100vh - 56px)}.quota-bar{font-size:10px;padding:0 10px}.quota-usage{gap:8px}}.user-settings-overlay{position:fixed;inset:0;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.user-settings-panel{background:#1e293b;border-radius:12px;width:90%;max-width:500px;max-height:80vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px #00000080;animation:slideUp .3s ease}@keyframes slideUp{0%{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}.settings-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:linear-gradient(135deg,#1e1b4b,#312e81);border-bottom:1px solid #334155}.settings-header h2{font-size:1.2rem;color:#f8fafc;margin:0}.settings-tabs{display:flex;border-bottom:1px solid #334155}.tab-btn{flex:1;padding:12px;background:transparent;border:none;color:#94a3b8;font-size:.9rem;cursor:pointer;transition:all .2s;border-bottom:2px solid transparent}.tab-btn:hover{background:#252f47;color:#e2e8f0}.tab-btn.active{color:#fbbf24;border-bottom-color:#fbbf24;background:#252f47}.settings-section{padding:20px;overflow-y:auto;max-height:50vh}.settings-error{background:#ef444433;color:#fca5a5;padding:10px 16px;margin:10px 20px 0;border-radius:6px;font-size:.85rem;border:1px solid rgba(239,68,68,.3)}.settings-success{background:#22c55e33;color:#86efac;padding:10px 16px;margin:10px 20px 0;border-radius:6px;font-size:.85rem;border:1px solid rgba(34,197,94,.3)}.current-user,.set-custom-id,.reset-user,.data-backup,.prompt-settings{margin-bottom:24px;padding-bottom:20px;border-bottom:1px solid #334155}.current-user:last-child,.prompt-settings:last-child{border-bottom:none;margin-bottom:0}h3{font-size:1rem;color:#fbbf24;margin:0 0 12px}.user-id-display{display:flex;align-items:center;gap:10px;background:#0f172a;padding:12px;border-radius:8px;margin-bottom:10px;flex-wrap:wrap}.user-id-display .label{font-size:.8rem;color:#64748b}.user-id-code{font-family:Consolas,monospace;font-size:.85rem;color:#e2e8f0;word-break:break-all}.badge{padding:2px 8px;border-radius:4px;font-size:.7rem;font-weight:600}.badge.custom{background:#fbbf2433;color:#fbbf24}.user-hint,.input-hint,.backup-hint,.prompt-hint{font-size:.8rem;color:#64748b;margin:8px 0}.warning-text{font-size:.85rem;color:#fca5a5;background:#ef44441a;padding:12px;border-radius:6px;margin-bottom:12px}.input-group{display:flex;align-items:center;background:#0f172a;border:1px solid #475569;border-radius:6px;overflow:hidden}.input-prefix{padding:10px 12px;color:#64748b;font-family:Consolas,monospace;font-size:.85rem;background:#1e293b;border-right:1px solid #475569}.custom-id-input{flex:1;padding:10px 12px;background:transparent;border:none;color:#e2e8f0;font-size:.9rem;outline:none}.custom-id-input::placeholder{color:#64748b}.prompt-textarea{width:100%;padding:12px;background:#0f172a;border:1px solid #475569;border-radius:6px;color:#e2e8f0;font-size:.9rem;line-height:1.5;resize:vertical;font-family:inherit}.prompt-textarea:focus{outline:none;border-color:#3b82f6}.prompt-actions{display:flex;gap:10px;margin-top:12px}.btn{padding:10px 18px;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s;font-family:inherit}.btn-primary{background:#3b82f6;color:#fff}.btn-primary:hover{background:#2563eb}.btn-secondary{background:#64748b;color:#fff}.btn-secondary:hover{background:#475569}.btn-danger{background:#ef4444;color:#fff}.btn-danger:hover{background:#dc2626}.btn-close{width:32px;height:32px;background:transparent;border:none;color:#94a3b8;font-size:1.2rem;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center;padding:0;line-height:1}.btn-close:hover{background:#334155;color:#e2e8f0}
