:root {
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #152033;
  background: #eef2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(440px, 1fr) minmax(460px, 0.9fr);
  gap: 16px;
  padding: 16px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 16px;
}

h2 {
  font-size: 17px;
  margin-bottom: 14px;
}

.left,
.middle,
.right {
  min-width: 0;
}

.left {
  background: #111827;
  border-radius: 10px;
  padding: 16px;
  min-height: calc(100vh - 32px);
}

.panel {
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.left .panel {
  background: #1f2937;
  border-color: #374151;
  color: #eef4ff;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.field span,
.param-label {
  color: #475467;
  font-size: 13px;
}

.left .field span,
.left .param-label {
  color: #d1d9e6;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

input,
select {
  height: 38px;
  padding: 0 10px;
  background: #fff;
}

textarea {
  min-height: 90px;
  padding: 10px;
  resize: vertical;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

button {
  height: 38px;
  padding: 0 12px;
  background: #1769ff;
  border-color: #1769ff;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: #0f58de;
}

button.secondary {
  background: #fff;
  color: #1769ff;
}

.left button.secondary {
  background: #111827;
  color: #d8e7ff;
  border-color: #4b5563;
}

.submit {
  height: 44px;
  font-size: 15px;
  font-weight: 700;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.kv {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  margin: 0;
  font-size: 13px;
}

.kv dt {
  color: #9aa4b2;
}

.kv dd {
  margin: 0;
  word-break: break-all;
}

.hint,
.desc,
.summary {
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

.left .hint {
  color: #bac6d4;
}

.summary {
  background: #f8fafc;
  border: 1px solid #e5edf5;
  border-radius: 6px;
  padding: 12px;
}

.method {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  margin-right: 8px;
  font-size: 12px;
  font-weight: 700;
}

.method.GET {
  background: #ecfdf3;
  color: #067647;
}

.method.POST {
  background: #eff8ff;
  color: #175cd3;
}

.method.DELETE {
  background: #fef3f2;
  color: #b42318;
}

.params-form {
  display: grid;
  gap: 12px;
}

.param-card {
  border: 1px solid #e5edf5;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.param-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.param-name {
  font-weight: 700;
}

.param-required {
  color: #b42318;
  font-size: 12px;
}

.param-help {
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

pre,
#requestPreview {
  margin: 10px 0 0;
  padding: 12px;
  min-height: 220px;
  width: 100%;
  overflow: auto;
  background: #101828;
  color: #d8fbff;
  border-radius: 8px;
  border: 0;
  line-height: 1.5;
  font-size: 13px;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.response-panel pre {
  min-height: 340px;
}

#requestPreview {
  resize: vertical;
  min-height: 300px;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  background: #0b1220;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.sdk-player {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#playerStatus {
  position: absolute;
  inset: auto 12px 12px;
  color: #d8fbff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  text-align: center;
}

code {
  color: #7dd3fc;
}

@media (max-width: 1280px) {
  body {
    grid-template-columns: 280px 1fr;
  }

  .right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body {
    grid-template-columns: 1fr;
  }

  .left {
    min-height: auto;
  }
}
