/* API Response Benchmark — style.css — Grafana/DataDog monitoring */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --fast: #2ECC71;
  --moderate: #F39C12;
  --slow: #E74C3C;
  --bg: #0D1117;
  --bg-card: rgba(13, 17, 23, 0.92);
  --surface: rgba(30, 37, 48, 0.6);
  --border: rgba(46, 204, 113, 0.08);
  --text: #C9D1D9;
  --text-dim: #8B949E;
  --text-muted: #484F58;
  --radius: 8px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--bg-card); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo { width: 32px; height: 32px; background: linear-gradient(135deg, var(--fast), #27AE60); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.header h1 { font-size: 14px; font-weight: 600; color: var(--fast); }
.header-right { display: flex; gap: 6px; }

.btn {
  padding: 6px 12px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 500; cursor: pointer; transition: var(--transition);
}
.btn:hover { border-color: var(--fast); }
.btn-primary { background: linear-gradient(135deg, var(--fast), #27AE60); border-color: transparent; color: #fff; }
.btn-sm { padding: 4px 10px; }
.btn-lg { width: 100%; padding: 10px; font-size: 13px; margin-top: 8px; }

.input {
  width: 100%; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 12px; outline: none;
}
.input:focus { border-color: var(--fast); }
.input-method { width: 80px; font-weight: 600; color: var(--fast); }
.input-sm { width: 70px; }
.textarea { height: 50px; font-family: 'JetBrains Mono', monospace; font-size: 11px; resize: vertical; }

.app { max-width: 900px; margin: 0 auto; padding: 12px; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.card h3 { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 10px; }

.field-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.field-row label { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.advanced { margin-top: 6px; }
.advanced summary { font-size: 11px; color: var(--text-dim); cursor: pointer; }

.progress-bar {
  height: 24px; background: var(--surface); border-radius: var(--radius); margin-bottom: 10px;
  position: relative; overflow: hidden;
}
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--fast), #27AE60); border-radius: var(--radius); transition: width 0.3s; width: 0; }
.progress-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 11px; font-weight: 600; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; text-align: center; }
.stat-value { font-size: 20px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--fast); }
.stat-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin-top: 4px; }
.stat-error .stat-value { color: var(--slow); }

canvas { width: 100% !important; height: auto !important; }

.status-bars { display: flex; flex-direction: column; gap: 4px; }
.status-bar-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.status-bar-code { font-weight: 600; font-family: 'JetBrains Mono', monospace; width: 40px; }
.status-bar-fill { height: 18px; border-radius: 3px; min-width: 4px; transition: width 0.3s; }
.status-bar-count { font-size: 10px; color: var(--text-dim); }
.status-2xx { background: var(--fast); }
.status-3xx { background: var(--moderate); }
.status-4xx { background: var(--slow); }
.status-5xx { background: #8E44AD; }

.toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 16px; font-size: 12px; opacity: 0; transition: all 0.3s; z-index: 300; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }

@media (max-width: 600px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
