*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: #0f1117;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px;
  gap: 10px;
}

header h1 {
  font-size: 1.2rem;
  color: #7c9ef8;
  letter-spacing: 1px;
}

.request-bar {
  display: flex;
  gap: 8px;
}

.request-bar select {
  background: #1e2130;
  color: #7c9ef8;
  border: 1px solid #2e3250;
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
}

.request-bar input {
  flex: 1;
  background: #1e2130;
  border: 1px solid #2e3250;
  border-radius: 6px;
  padding: 8px 12px;
  color: #e0e0e0;
  font-size: 0.9rem;
}

.request-bar input:focus { outline: none; border-color: #7c9ef8; }

.request-bar button {
  background: #7c9ef8;
  color: #0f1117;
  border: none;
  border-radius: 6px;
  padding: 8px 22px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.request-bar button:hover { background: #a0b8ff; }
.request-bar button:disabled { background: #3a3f5c; color: #666; cursor: not-allowed; }

.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}

.panel {
  background: #1a1d2e;
  border: 1px solid #2e3250;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #2e3250;
  background: #151726;
}

.tab {
  background: none;
  border: none;
  color: #888;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 0.82rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s;
}

.tab:hover { color: #ccc; }
.tab.active { color: #7c9ef8; border-bottom-color: #7c9ef8; }

.tab-content { display: none; flex: 1; flex-direction: column; overflow: auto; padding: 10px; }
.tab-content.active { display: flex; }

textarea {
  flex: 1;
  background: #0f1117;
  border: 1px solid #2e3250;
  border-radius: 6px;
  color: #e0e0e0;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  padding: 10px;
  resize: none;
  min-height: 120px;
}

textarea:focus { outline: none; border-color: #7c9ef8; }

#body-type {
  background: #0f1117;
  border: 1px solid #2e3250;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 6px 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.kv-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.kv-row input {
  flex: 1;
  background: #0f1117;
  border: 1px solid #2e3250;
  border-radius: 5px;
  color: #e0e0e0;
  padding: 6px 8px;
  font-size: 0.8rem;
}

.kv-row input:focus { outline: none; border-color: #7c9ef8; }

.kv-row button {
  background: #2e1a1a;
  border: 1px solid #5c2e2e;
  color: #f87c7c;
  border-radius: 5px;
  padding: 4px 9px;
  cursor: pointer;
  font-size: 0.8rem;
}

.kv-row button:hover { background: #3d2020; }

.add-btn {
  background: none;
  border: 1px dashed #3a3f5c;
  color: #7c9ef8;
  border-radius: 5px;
  padding: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 4px;
  transition: border-color 0.2s;
}

.add-btn:hover { border-color: #7c9ef8; }

.response-meta {
  padding: 8px 12px;
  font-size: 0.8rem;
  border-bottom: 1px solid #2e3250;
  min-height: 34px;
  display: flex;
  gap: 14px;
  align-items: center;
}

.status-ok { color: #4caf82; font-weight: bold; }
.status-err { color: #f87c7c; font-weight: bold; }
.meta-info { color: #888; }

.res-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.res-toolbar span { font-size: 0.75rem; color: #888; }

.res-toolbar button {
  background: #1e2130;
  border: 1px solid #2e3250;
  color: #aaa;
  border-radius: 5px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 0.75rem;
}

.res-toolbar button:hover { color: #fff; border-color: #7c9ef8; }

pre {
  flex: 1;
  background: #0f1117;
  border: 1px solid #2e3250;
  border-radius: 6px;
  padding: 10px;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: #c9d1d9;
  line-height: 1.5;
}

.json-key { color: #79b8ff; }
.json-str { color: #9ecbff; }
.json-num { color: #f8c555; }
.json-bool { color: #f97583; }
.json-null { color: #f97583; }

@media (max-width: 700px) {
  .panels { grid-template-columns: 1fr; }
  body { overflow: auto; }
  .app { height: auto; }
}
