/* httpTest 页面样式（与薄 SDK 无关，可整文件忽略） */
:root {
  --bg: #0f1419;
  --panel: #1a222c;
  --line: #2c3846;
  --text: #e8eef4;
  --muted: #8b9aab;
  --accent: #3d9a6a;
  --accent-hover: #48b37a;
  --danger: #c45c5c;
  --danger-hover: #d66a6a;
  --overlay: rgba(0, 0, 0, 0.62);
  --radius: 10px;
  --font: "IBM Plex Sans", "Segoe UI", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

header h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

header label.cfg {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

header label.cfg input {
  width: min(320px, 42vw);
  margin: 0;
  padding: 7px 10px;
  font-size: 12px;
}

header label.cfg-id input {
  width: 120px;
}

header label.cfg-ws input {
  width: min(280px, 36vw);
}

.spacer {
  flex: 1;
}

button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

button.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
}

button.danger {
  background: var(--danger);
}

button.danger:hover:not(:disabled) {
  background: var(--danger-hover);
}

.meta {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

#status {
  min-height: 1.2em;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

#status.error {
  color: #f0a0a0;
}

#status.ok {
  color: #8fd4ad;
}

#player {
  flex: 1;
  min-height: 320px;
  background: #000;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.modal h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.modal p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11171e;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  word-break: break-all;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.mode-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
}

.mode-tabs button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 10px;
}

.mode-tabs button.active {
  background: rgba(61, 154, 106, 0.18);
  border-color: var(--accent);
  color: var(--text);
}

.mode-panel[hidden] {
  display: none;
}

.captcha-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.captcha-row input {
  flex: 1;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

button.captcha-img-btn {
  flex: 0 0 auto;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  background: #11171e;
  border-color: var(--line);
}

button.captcha-img-btn:hover:not(:disabled) {
  background: #11171e;
  border-color: var(--accent);
}

button.captcha-img-btn img {
  display: block;
  width: 120px;
  height: 40px;
  object-fit: contain;
  background: #fff;
}

.modal-error {
  min-height: 1.2em;
  margin: 0 0 10px;
  font-size: 12px;
  color: #f0a0a0;
}
