:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #2563eb;
  --danger: #dc2626;
  --border: #334155;
  --success: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: var(--text);
}

.container {
  width: min(1400px, calc(100% - 32px));
  margin: 24px auto 40px;
}

.page-header {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: stretch;
  margin-bottom: 20px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: var(--muted);
}

.status-card {
  min-width: 260px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.status-row:last-child {
  border-bottom: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.panel.full {
  grid-column: 1 / -1;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
  font-family: Consolas, "Courier New", monospace;
}

.inline-options {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.checkbox input {
  width: auto;
}

.proxy-field {
  min-width: 280px;
  flex: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.btn.primary {
  background: var(--primary);
}

.btn.secondary {
  background: #475569;
}

.btn.danger {
  background: var(--danger);
}

.message {
  min-height: 24px;
  margin: 16px 0 0;
  color: #93c5fd;
}

.message.error {
  color: #fca5a5;
}

.logs {
  margin: 0;
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: #cbd5e1;
}

@media (max-width: 960px) {
  .grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .status-card {
    min-width: auto;
  }
}