:root {
--bg: #1a1a2e;
--surface: #16213e;
--border: #0f3460;
--text: #e0e0e0;
--text-muted: #888;
--accent: #e94560;
--highlight: #0f3460;
--get: #4caf50;
--post: #ff9800;
--put: #2196f3;
--delete: #f44336;
--patch: #9c27b0;
--status-2xx: #4caf50;
--status-3xx: #00bcd4;
--status-4xx: #ff9800;
--status-5xx: #f44336;
}
@media (prefers-color-scheme: light) {
:root {
--bg: #f5f5f5;
--surface: #fff;
--border: #ddd;
--text: #333;
--text-muted: #666;
--highlight: #e3f2fd;
}
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
background: var(--bg);
color: var(--text);
height: 100vh;
display: flex;
flex-direction: column;
}
header {
padding: 12px 16px;
background: var(--surface);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
}
header h1 { font-size: 18px; color: var(--accent); }
.controls {
display: flex;
gap: 8px;
align-items: center;
}
.controls select, .controls input, .controls button {
padding: 6px 10px;
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: 4px;
font-size: 13px;
}
#search {
flex: 1;
min-width: 280px;
font-family: monospace;
}
.controls button:hover { background: var(--border); cursor: pointer; }
.status {
font-size: 12px;
padding: 4px 8px;
border-radius: 4px;
}
.status.connected { background: #1b5e20; color: #4caf50; }
.status.disconnected { background: #b71c1c33; color: #f44336; }
main {
flex: 1;
overflow: auto;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
thead {
position: sticky;
top: 0;
background: var(--surface);
z-index: 1;
}
th {
text-align: left;
padding: 8px 12px;
border-bottom: 2px solid var(--border);
font-weight: 600;
color: var(--text-muted);
}
td {
padding: 6px 12px;
border-bottom: 1px solid var(--border);
}
tr:hover { background: var(--highlight); cursor: pointer; }
tr.selected { background: var(--highlight); }
.td-with-action { white-space: nowrap; }
.btn-row-replay {
opacity: 0;
margin-left: 12px;
padding: 4px 14px;
background: var(--surface);
color: var(--text);
border: 1px solid var(--border);
border-radius: 4px;
cursor: pointer;
font-size: 15px;
font-weight: 400;
transition: opacity 0.12s;
vertical-align: middle;
white-space: nowrap;
}
.btn-row-replay:hover {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
tr:hover .btn-row-replay { opacity: 1; }
[data-proto="https"] { color: #69db7c; font-weight: 700; }
[data-proto="http"] { color: #fcc419; font-weight: 600; }
[data-proto="wss"] { color: #66d9e8; font-weight: 700; }
[data-proto="ws"] { color: #e599f7; font-weight: 600; }
[data-method="get"] { color: #69db7c; font-weight: 700; }
[data-method="post"] { color: #fcc419; font-weight: 700; }
[data-method="put"] { color: #74c0fc; font-weight: 700; }
[data-method="delete"] { color: #ff6b6b; font-weight: 700; }
[data-method="patch"] { color: #e599f7; font-weight: 700; }
[data-method="head"],
[data-method="options"] { color: #868e96; }
[data-status="1xx"] { color: #868e96; }
[data-status="2xx"] { color: #69db7c; }
[data-status="3xx"] { color: #66d9e8; }
[data-status="4xx"] { color: #fcc419; }
[data-status="5xx"] { color: #ff4444; font-weight: 700; }
[data-status="pending"] { color: #f59e0b; font-weight: 600; }
[data-type="json"] { color: #66d9e8; }
[data-type="html"] { color: #ffd43b; }
[data-type="js"] { color: #74c0fc; }
[data-type="css"] { color: #e599f7; }
[data-type="text"] { color: #868e96; }
[data-type="image"] { color: #cc5de8; }
[data-type="xml"] { color: #63e6be; }
[data-type="none"] { color: #495057; }
[data-size="zero"] { color: #495057; }
[data-size="tiny"] { color: #868e96; }
[data-size="small"] { color: #ced4da; }
[data-size="medium"] { color: #ffd43b; }
[data-size="large"] { color: #fcc419; }
[data-size="huge"] { color: #ff6b6b; }
[data-dur="fast"] { color: #69db7c; }
[data-dur="ok"] { color: #a9e34b; }
[data-dur="slow"] { color: #ffd43b; }
[data-dur="vslow"] { color: #ff922b; }
[data-dur="dead"] { color: #ff4444; font-weight: 700; }
[data-dur="none"] { color: #495057; }
.col-time { white-space: nowrap; }
.col-path { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-type { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#intercept-btn {
background: #374151;
color: #d1d5db;
border-color: #4b5563;
transition: background 0.2s, color 0.2s;
}
#intercept-btn:hover { background: #4b5563; cursor: pointer; }
#intercept-btn.active {
background: #991b1b;
color: #fca5a5;
border-color: #dc2626;
}
tr.pending {
border-left: 3px solid #f59e0b;
background: rgba(245, 158, 11, 0.05);
}
tr.pending:hover { background: rgba(245, 158, 11, 0.12); }
.intercept-panel {
position: fixed;
bottom: 0;
left: 0;
right: 0;
max-height: 60%;
background: var(--surface);
border-top: 2px solid #f59e0b;
display: flex;
flex-direction: column;
z-index: 20;
}
.intercept-panel.hidden { display: none; }
.intercept-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
border-bottom: 1px solid var(--border);
background: rgba(245, 158, 11, 0.1);
}
.intercept-title {
font-weight: 600;
color: #f59e0b;
font-size: 13px;
}
#close-intercept {
background: transparent;
border: none;
color: var(--text);
font-size: 20px;
cursor: pointer;
}
.intercept-body {
flex: 1;
overflow-y: auto;
padding: 12px 16px;
display: flex;
flex-direction: column;
gap: 8px;
}
.intercept-row {
display: flex;
align-items: center;
gap: 8px;
}
.intercept-row label {
font-size: 12px;
color: var(--text-muted);
white-space: nowrap;
}
.intercept-row select, .intercept-row input {
padding: 5px 8px;
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: 4px;
font-size: 13px;
font-family: monospace;
}
.intercept-row input { flex: 1; }
.intercept-section-label {
font-size: 12px;
color: var(--text-muted);
font-weight: 600;
display: flex;
align-items: center;
gap: 8px;
margin-top: 4px;
}
.headers-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.headers-table td { padding: 2px 4px; }
.headers-table input.header-name,
.headers-table input.header-value {
width: 100%;
padding: 4px 6px;
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: 3px;
font-family: monospace;
font-size: 12px;
}
.edit-body {
width: 100%;
min-height: 80px;
padding: 8px;
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: 4px;
font-family: monospace;
font-size: 13px;
resize: vertical;
}
.intercept-footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
border-top: 1px solid var(--border);
gap: 8px;
}
.intercept-hint {
font-size: 12px;
color: var(--text-muted);
}
.intercept-actions {
display: flex;
gap: 8px;
}
.btn-primary {
padding: 6px 16px;
background: #1d4ed8;
color: #fff;
border: 1px solid #2563eb;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
font-weight: 600;
}
.btn-primary:hover { background: #2563eb; }
.btn-danger {
padding: 6px 16px;
background: #7f1d1d;
color: #fca5a5;
border: 1px solid #dc2626;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
}
.btn-danger:hover { background: #991b1b; }
.btn-secondary {
padding: 6px 16px;
background: #374151;
color: #d1d5db;
border: 1px solid #4b5563;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
}
.btn-secondary:hover { background: #4b5563; }
.btn-small {
padding: 2px 8px;
background: var(--bg);
color: var(--text-muted);
border: 1px solid var(--border);
border-radius: 3px;
cursor: pointer;
font-size: 11px;
}
.btn-small:hover { background: var(--border); }
.btn-icon {
background: transparent;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 16px;
padding: 0 4px;
}
.btn-icon:hover { color: var(--accent); }
.detail-panel {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 40%;
background: var(--surface);
border-top: 2px solid var(--border);
display: flex;
flex-direction: column;
z-index: 10;
}
.detail-panel.hidden { display: none; }
.detail-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 16px;
border-bottom: 1px solid var(--border);
}
.tabs { display: flex; gap: 4px; }
.tab {
padding: 4px 12px;
background: transparent;
color: var(--text-muted);
border: 1px solid var(--border);
border-radius: 4px;
cursor: pointer;
font-size: 13px;
}
.tab.active {
background: var(--accent);
color: white;
border-color: var(--accent);
}
#close-detail {
background: transparent;
border: none;
color: var(--text);
font-size: 20px;
cursor: pointer;
}
.detail-content {
flex: 1;
overflow: auto;
padding: 12px 16px;
font-family: monospace;
font-size: 13px;
white-space: pre-wrap;
word-break: break-all;
}
#help-btn {
width: 28px;
height: 28px;
padding: 0;
font-size: 15px;
font-weight: 700;
background: #374151;
color: #d1d5db;
border: 1px solid #4b5563;
border-radius: 50%;
cursor: pointer;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
}
#help-btn:hover { background: #4b5563; }
.help-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.55);
z-index: 40;
}
.help-backdrop.hidden { display: none; }
.help-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: min(640px, 92vw);
max-height: 80vh;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
display: flex;
flex-direction: column;
z-index: 50;
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.help-modal.hidden { display: none; }
.help-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
}
.help-title {
font-size: 14px;
font-weight: 700;
color: var(--accent);
}
#close-help {
background: transparent;
border: none;
color: var(--text);
font-size: 20px;
cursor: pointer;
line-height: 1;
}
.help-body {
overflow-y: auto;
padding: 12px 16px 16px;
display: flex;
flex-direction: column;
gap: 16px;
}
.help-section-title {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
margin-bottom: 6px;
}
.help-row {
display: flex;
align-items: baseline;
gap: 12px;
font-size: 13px;
line-height: 1.7;
}
.help-row kbd {
display: inline-block;
min-width: 100px;
padding: 1px 6px;
font-family: monospace;
font-size: 12px;
color: #00bcd4;
background: rgba(0, 188, 212, 0.08);
border: 1px solid rgba(0, 188, 212, 0.25);
border-radius: 3px;
white-space: nowrap;
flex-shrink: 0;
}
.help-row span {
color: var(--text);
}
.status-ws-live { color: #40c0f0; font-weight: bold; }
.status-ws-closed { color: #888; }
.ws-status-badge {
padding: 4px 10px;
margin-bottom: 6px;
font-size: 12px;
border-radius: 3px;
display: inline-block;
}
.ws-live-badge { background: #1a3a4a; color: #40c0f0; }
.ws-closed-badge { background: #3a1a1a; color: #f44; }
.ws-frame-row {
display: flex;
align-items: baseline;
gap: 8px;
padding: 2px 8px;
font-family: monospace;
font-size: 12px;
border-radius: 2px;
margin-bottom: 1px;
}
.ws-frame-row.client { border-left: 3px solid #f0c040; }
.ws-frame-row.server { border-left: 3px solid #40c0f0; }
.ws-dir { min-width: 12px; font-weight: bold; }
.ws-op { color: #888; min-width: 30px; font-size: 11px; text-transform: uppercase; }
.ws-size { color: #aaa; min-width: 52px; text-align: right; font-size: 11px; }
.ws-truncated { color: #f90; font-size: 10px; }
.ws-payload {
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
}