*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--radius: 8px;--radius-sm: 4px;--transition: .15s ease;--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--bg: #f8f9fa;--bg-surface: #ffffff;--bg-hover: #f0f1f3;--text: #1a1a2e;--text-secondary: #6b7280;--text-muted: #9ca3af;--border: #e5e7eb;--primary: #2563eb;--primary-hover: #1d4ed8;--primary-light: #dbeafe;--success: #16a34a;--success-light: #dcfce7;--warning: #d97706;--warning-light: #fef3c7;--error: #dc2626;--error-light: #fee2e2;--dropzone-bg: #f0f4ff;--dropzone-border: #93c5fd;--dropzone-highlight: #dbeafe;--shadow: 0 1px 3px rgba(0,0,0,.08);--shadow-lg: 0 4px 12px rgba(0,0,0,.12);--tree-indent: 20px;--ad-sidebar-width: 160px}:root[data-theme=dark]{--bg: #0f172a;--bg-surface: #1e293b;--bg-hover: #334155;--text: #e2e8f0;--text-secondary: #94a3b8;--text-muted: #64748b;--border: #334155;--primary: #3b82f6;--primary-hover: #2563eb;--primary-light: #1e3a5f;--success: #22c55e;--success-light: #14532d;--warning: #f59e0b;--warning-light: #713f12;--error: #ef4444;--error-light: #7f1d1d;--dropzone-bg: #1e293b;--dropzone-border: #3b82f6;--dropzone-highlight: #1e3a5f;--shadow: 0 1px 3px rgba(0,0,0,.3);--shadow-lg: 0 4px 12px rgba(0,0,0,.4)}html{font-size:16px}body{font-family:var(--font);background:var(--bg);color:var(--text);line-height:1.5;min-height:100vh}#app{display:flex;flex-direction:column;min-height:100vh}.app-header{display:flex;align-items:center;padding:12px 20px;background:var(--bg-surface);border-bottom:1px solid var(--border);gap:12px;z-index:10}.app-header h1{font-size:1.25rem;font-weight:700;color:var(--primary);margin-right:auto}.header-actions{display:flex;align-items:center;gap:8px}.theme-toggle,.lang-btn{background:var(--bg-hover);border:1px solid var(--border);border-radius:var(--radius);cursor:pointer;font-size:.875rem;padding:6px 10px;color:var(--text);transition:background var(--transition)}.theme-toggle:hover,.lang-btn:hover{background:var(--border)}.lang-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}.app-main{display:flex;flex:1;position:relative}.app-content{flex:1;display:flex;flex-direction:column;padding:20px;gap:16px;max-width:100%;overflow-x:hidden}.ad-sidebar{width:var(--ad-sidebar-width);min-width:var(--ad-sidebar-width);border-right:1px solid var(--border);background:var(--bg-surface);display:none}.ad-sidebar.active{display:block}.ad-slot{display:flex;align-items:center;justify-content:center;color:var(--text-muted);font-size:.75rem}.ad-slot.empty{height:0;overflow:hidden}.ad-banner{border-top:1px solid var(--border);background:var(--bg-surface);display:none}.ad-banner.active{display:block}.dropzone{border:2px dashed var(--dropzone-border);border-radius:var(--radius);background:var(--dropzone-bg);padding:40px 20px;text-align:center;cursor:pointer;transition:all var(--transition);position:relative}.dropzone:hover{border-color:var(--primary);background:var(--dropzone-highlight)}.dropzone.drag-over{border-color:var(--primary);background:var(--dropzone-highlight);transform:scale(1.01)}.dropzone-icon{font-size:2.5rem;margin-bottom:8px;opacity:.6}.dropzone-text{font-size:1rem;color:var(--text-secondary);margin-bottom:4px}.dropzone-formats{font-size:.75rem;color:var(--text-muted)}.format-section{margin-bottom:4px}.format-section-title{font-size:.75rem;color:var(--text-secondary);margin-bottom:6px}.format-badges{display:flex;flex-wrap:wrap;gap:6px}.format-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:var(--radius-sm);font-size:.75rem;font-weight:600;background:var(--primary-light);color:var(--primary);border:1px solid var(--dropzone-border)}.format-badge.readonly{background:var(--bg-hover);color:var(--text-secondary);border-color:var(--border)}.file-tree-container{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.file-tree-header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--border);background:var(--bg-hover);font-size:.875rem}.file-tree-actions{display:flex;gap:6px}.file-tree-body{max-height:400px;overflow-y:auto;padding:4px 0}.file-tree-body.virtual{position:relative;overflow-y:auto}.tree-item{display:flex;align-items:center;padding:4px 8px;cursor:pointer;transition:background var(--transition);font-size:.8125rem;user-select:none}.tree-item:hover{background:var(--bg-hover)}.tree-item.selected{background:var(--primary-light)}.tree-toggle{width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:.625rem;color:var(--text-muted);flex-shrink:0}.tree-checkbox{margin:0 6px 0 2px;flex-shrink:0;width:16px;height:16px;accent-color:var(--primary);cursor:pointer}.tree-icon{width:16px;height:16px;display:flex;align-items:center;justify-content:center;font-size:.75rem;flex-shrink:0;margin-right:4px}.tree-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tree-size{font-size:.75rem;color:var(--text-muted);margin-left:8px;flex-shrink:0}.tree-children{display:none}.tree-children.open{display:block}.hash-panel{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;display:grid;gap:10px}.hash-loading{font-size:.8125rem;color:var(--text-secondary)}.hash-toolbar{display:flex;align-items:center;gap:8px}.hash-select-label{font-size:.8125rem;color:var(--text-secondary)}.hash-select{padding:6px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:.8125rem;background:var(--bg);color:var(--text);outline:none;cursor:pointer}.hash-select:focus{border-color:var(--primary)}.hash-row{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;align-items:baseline}.hash-label{font-size:.75rem;color:var(--text-muted);font-weight:600;white-space:nowrap}.hash-value{font-size:.75rem;word-break:break-all;line-height:1.4}.hash-compare{border-top:1px solid var(--border);padding-top:10px;display:grid;gap:6px}.hash-compare-label{font-size:.8125rem;color:var(--text-secondary)}.hash-compare-input{width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.75rem;background:var(--bg);color:var(--text);outline:none;transition:border-color var(--transition)}.hash-compare-input:focus{border-color:var(--primary)}.hash-compare-result{font-size:.75rem;min-height:1.2em;color:var(--text-muted)}.hash-compare-result.match{color:var(--success);font-weight:600}.hash-compare-result.no-match{color:var(--error)}.file-list-container{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.file-list-header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--border);background:var(--bg-hover);font-size:.875rem}.file-list-body{max-height:300px;overflow-y:auto}.file-list-item{display:flex;align-items:center;padding:6px 12px;font-size:.8125rem;border-bottom:1px solid var(--border)}.file-list-item:last-child{border-bottom:none}.file-list-item .tree-name{font-size:.8125rem}.file-list-item .tree-size{font-size:.75rem}.file-list-remove{background:none;border:none;cursor:pointer;color:var(--error);font-size:1rem;padding:2px 4px;line-height:1;flex-shrink:0}.file-list-remove:hover{color:var(--error);opacity:.8}.progress-container{background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;display:none}.progress-container.active{display:block}.progress-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-size:.875rem}.progress-title{font-weight:600}.progress-percent{color:var(--primary);font-weight:700;font-variant-numeric:tabular-nums}.progress-bar-track{width:100%;height:8px;background:var(--bg-hover);border-radius:4px;overflow:hidden;margin-bottom:8px}.progress-bar-fill{height:100%;background:var(--primary);border-radius:4px;transition:width .15s ease;width:0%}.progress-details{display:flex;justify-content:space-between;font-size:.75rem;color:var(--text-secondary)}.progress-speed,.progress-eta,.progress-file{font-variant-numeric:tabular-nums}.dialog-overlay{position:fixed;inset:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:100;animation:fadeIn .15s ease}.dialog-box{background:var(--bg-surface);border-radius:var(--radius);padding:24px;width:90%;max-width:380px;box-shadow:var(--shadow-lg)}.dialog-title{font-size:1.125rem;font-weight:600;margin-bottom:8px}.dialog-hint{font-size:.8125rem;color:var(--text-secondary);margin-bottom:16px}.dialog-input{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);font-size:.875rem;background:var(--bg);color:var(--text);outline:none;transition:border-color var(--transition)}.dialog-input:focus{border-color:var(--primary)}.dialog-input.error{border-color:var(--error)}.dialog-error{color:var(--error);font-size:.75rem;margin-top:4px;display:none}.dialog-error.active{display:block}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid var(--border);border-radius:var(--radius);font-size:.8125rem;font-weight:500;cursor:pointer;transition:all var(--transition);background:var(--bg-surface);color:var(--text)}.btn:hover{background:var(--bg-hover)}.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary)}.btn-primary:hover{background:var(--primary-hover)}.btn-sm{padding:4px 10px;font-size:.75rem}.btn-success{background:var(--success);color:#fff;border-color:var(--success)}.btn-success:hover{opacity:.9}.btn:disabled{opacity:.5;cursor:not-allowed}.toast-container{position:fixed;top:16px;right:16px;z-index:200;display:flex;flex-direction:column;gap:8px;pointer-events:none}.toast{padding:10px 16px;border-radius:var(--radius);font-size:.8125rem;box-shadow:var(--shadow-lg);animation:slideIn .2s ease;pointer-events:auto;max-width:360px}.toast.info{background:var(--primary);color:#fff}.toast.success{background:var(--success);color:#fff}.toast.warning{background:var(--warning);color:#fff}.toast.error{background:var(--error);color:#fff}.toast.leaving{animation:slideOut .2s ease forwards}.mode-tabs{display:flex;gap:0;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;align-self:flex-start}.mode-tab{padding:8px 20px;border:none;background:transparent;cursor:pointer;font-size:.875rem;color:var(--text-secondary);transition:all var(--transition);font-weight:500}.mode-tab:hover{background:var(--bg-hover)}.mode-tab.active{background:var(--primary);color:#fff}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:var(--text-muted);text-align:center;gap:8px}.empty-state-icon{font-size:2rem;opacity:.5}.empty-state-text{font-size:.875rem}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideIn{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes slideOut{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}@media(max-width:1024px){:root{--ad-sidebar-width: 0px}.ad-sidebar.active{display:none}}@media(max-width:640px){.app-header{padding:10px 12px}.app-header h1{font-size:1rem}.app-content{padding:12px;gap:12px}.dropzone{padding:24px 12px}.dropzone-icon{font-size:2rem}.dropzone-text{font-size:.875rem}.mode-tab{padding:6px 14px;font-size:.8125rem}.file-tree-body{max-height:280px}.hash-row{grid-template-columns:1fr;gap:2px}.hash-toolbar{flex-wrap:wrap}.hash-label{white-space:normal}.dialog-box{padding:20px;width:95%}.toast-container{left:12px;right:12px;top:12px}.toast{max-width:100%}:root{--tree-indent: 14px}}
