:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel2: #0b1220;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --line: #243044;
  --blue: #60a5fa;
  --green: #34d399;
  --red: #fb7185;
  --yellow: #fbbf24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(96, 165, 250, 0.18), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(52, 211, 153, 0.14), transparent 25%),
    var(--bg);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.container {
  width: min(1180px, calc(100vw - 32px));
  margin: 24px auto 60px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

p {
  margin: 0;
  color: var(--muted);
}

.card {
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin: 16px 0;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.28);
}

label {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

textarea,
input {
  width: 100%;
  margin-top: 8px;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
}

textarea:focus,
input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.check input {
  width: auto;
  margin: 0;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

button {
  color: #07111f;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.08);
}

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

button.secondary,
#loadServerLogBtn {
  color: var(--text);
  background: #1f2937;
  border: 1px solid var(--line);
}

.log,
.json {
  min-height: 72px;
  max-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d1d5db;
  background: #020617;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.summary {
  color: var(--muted);
  margin-bottom: 12px;
}

.msg {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 12px 0;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.6);
}

.msg-head {
  padding: 13px 14px;
  background: rgba(31, 41, 55, 0.7);
  border-bottom: 1px solid var(--line);
}

.msg-title {
  color: var(--green);
  font-weight: 700;
  margin-bottom: 8px;
}

.meta {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 13px;
}

.meta span:nth-child(2n) {
  color: var(--text);
}

.body {
  margin: 0;
  padding: 14px;
  white-space: pre-line;
  word-break: break-word;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.55;
}

.ok {
  color: var(--green);
}

.err {
  color: var(--red);
}

@media (max-width: 760px) {
  .hero,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
