* { box-sizing: border-box; margin: 0; padding: 0; } body { width: 420px; max-height: 560px; font-family: system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif; font-size: 13px; color: #1f2937; background: #ffffff; } .container { padding: 12px; display: flex; flex-direction: column; max-height: 560px; } header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .logo { width: 32px; height: 32px; border-radius: 6px; } .title h1 { font-size: 14px; font-weight: 600; color: #111827; } .subtitle { font-size: 11px; color: #6b7280; } /* Tab 切换 */ .tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid #e5e7eb; } .tab { flex: 1; padding: 6px 10px; background: transparent; border: none; border-bottom: 2px solid transparent; font-size: 12px; cursor: pointer; color: #6b7280; transition: color 0.15s, border-color 0.15s; } .tab:hover { color: #1f2937; } .tab.active { color: #111827; border-bottom-color: #111827; font-weight: 500; } .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; } .panel.hidden { display: none; } /* 状态条 */ .status { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; background: #f3f4f6; margin-bottom: 10px; font-size: 12px; } .dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; } .dot.ok { background: #10b981; } .dot.fail { background: #ef4444; } /* 表单 */ .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; } .field span { font-size: 11px; color: #4b5563; font-weight: 500; } .field input { padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 4px; font-size: 12px; font-family: 'JetBrains Mono', 'Consolas', monospace; } .field input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15); } .checkbox { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; cursor: pointer; user-select: none; } .checkbox input { cursor: pointer; } .actions { display: flex; gap: 8px; margin-top: 6px; } .actions button { flex: 1; padding: 7px 10px; border: 1px solid #d1d5db; background: #ffffff; border-radius: 4px; font-size: 12px; cursor: pointer; transition: background 0.15s, border-color 0.15s; } .actions button:hover { background: #f9fafb; } .actions button.primary { background: #111827; color: #ffffff; border-color: #111827; } .actions button.primary:hover { background: #1f2937; } /* 嗅探面板 */ .sniff-toolbar { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; } .sniff-toolbar button, .sniff-toolbar select { padding: 5px 8px; font-size: 11px; border: 1px solid #d1d5db; background: #ffffff; border-radius: 4px; cursor: pointer; } .sniff-toolbar button:hover { background: #f9fafb; } /* 资源类型子 Tab */ .sniff-tabs { display: flex; gap: 2px; margin-bottom: 8px; background: #f3f4f6; border-radius: 6px; padding: 3px; } .sniff-tab { flex: 1; padding: 5px 8px; background: transparent; border: none; border-radius: 4px; font-size: 11px; cursor: pointer; color: #6b7280; transition: background 0.15s, color 0.15s; display: flex; align-items: center; justify-content: center; gap: 4px; } .sniff-tab:hover { color: #1f2937; } .sniff-tab.active { background: #ffffff; color: #111827; font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,0.05); } .sniff-tab-count { font-size: 10px; padding: 1px 5px; border-radius: 8px; background: #e5e7eb; color: #6b7280; min-width: 16px; text-align: center; } .sniff-tab.active .sniff-tab-count { background: #111827; color: #ffffff; } .sniff-list { flex: 1; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 6px; background: #fafafa; max-height: 380px; } .sniff-list .empty { padding: 24px 10px; text-align: center; color: #9ca3af; font-size: 12px; } .sniff-item { padding: 8px 10px; border-bottom: 1px solid #f0f0f0; display: flex; flex-direction: column; gap: 4px; transition: background 0.12s; } .sniff-item:hover { background: #f3f4f6; } .sniff-item:last-child { border-bottom: none; } .sniff-item-head { display: flex; align-items: center; gap: 6px; } .sniff-badge { font-size: 10px; padding: 1px 6px; border-radius: 3px; color: #ffffff; font-weight: 500; white-space: nowrap; } .sniff-filename { flex: 1; font-size: 12px; font-weight: 500; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sniff-size { font-size: 10px; color: #6b7280; font-family: 'JetBrains Mono', monospace; white-space: nowrap; } .sniff-url { font-size: 10px; color: #9ca3af; font-family: 'JetBrains Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sniff-actions { display: flex; gap: 4px; margin-top: 2px; } .sniff-actions button { font-size: 10px; padding: 3px 8px; border: 1px solid #d1d5db; background: #ffffff; border-radius: 3px; cursor: pointer; } .sniff-actions button:hover { background: #f3f4f6; } .sniff-actions button.dl { background: #111827; color: #ffffff; border-color: #111827; } .sniff-actions button.dl:hover { background: #1f2937; } .sniff-stats { margin-top: 6px; font-size: 10px; color: #6b7280; text-align: right; } /* 嗅探项:图片缩略图 */ .sniff-thumb { width: 100%; max-height: 120px; object-fit: cover; border-radius: 4px; margin-top: 4px; cursor: pointer; background: #f3f4f6; } .sniff-preview-btn { font-size: 10px; padding: 3px 8px; border: 1px solid #d1d5db; background: #ffffff; border-radius: 3px; cursor: pointer; } .sniff-preview-btn:hover { background: #f3f4f6; } /* 预览浮层 */ .preview-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); z-index: 1000; justify-content: center; align-items: center; padding: 12px; } .preview-overlay.active { display: flex; } .preview-content { position: relative; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; } .preview-close { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #ffffff; border: none; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.3); z-index: 1; } .preview-close:hover { background: #f3f4f6; } .preview-body { max-width: 380px; max-height: 440px; display: flex; justify-content: center; align-items: center; } .preview-body img { max-width: 380px; max-height: 440px; object-fit: contain; border-radius: 4px; } .preview-body video { max-width: 380px; max-height: 440px; border-radius: 4px; background: #000; } .preview-info { color: #ffffff; font-size: 11px; text-align: center; max-width: 380px; word-break: break-all; background: rgba(0,0,0,0.5); padding: 4px 8px; border-radius: 4px; }