:root {
  --bg: #0b1020;
  --panel: #111a33;
  --panel-2: #0f1730;
  --text: #e9ecf3;
  --muted: #aab3c7;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --brand: #66a3ff;
  --brand-ring: rgba(102, 163, 255, 0.18);
  --danger: #ff6b6b;
  --radius: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-2: #f3f5ff;
    --text: #111827;
    --muted: #4b5563;
    --border: rgba(17, 24, 39, 0.12);
    --shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    --brand: #2563eb;
    --brand-ring: rgba(37, 99, 235, 0.16);
    --danger: #dc2626;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Noto Sans",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg), transparent 15%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 14px;
  color: var(--muted);
}

.nav a {
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover {
  background: var(--panel);
  background: color-mix(in srgb, var(--panel), transparent 40%);
  color: var(--text);
}

.hero {
  padding: 56px 0 32px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.lead {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 65ch;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.notice {
  border: 1px solid var(--border);
  background: var(--panel);
  background: color-mix(in srgb, var(--panel), transparent 35%);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--muted);
}

.section {
  padding: 26px 0;
}

.section.alt {
  background: var(--panel-2);
  background: color-mix(in srgb, var(--panel-2), transparent 10%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

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

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-size: 13px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  background: color-mix(in srgb, var(--panel-2), transparent 20%);
  color: var(--text);
  outline: none;
}

textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  border-color: color-mix(in srgb, var(--brand), transparent 35%);
  box-shadow: 0 0 0 4px var(--brand-ring);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand), transparent 82%);
}

.row {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 12px;
  align-items: end;
}

@media (max-width: 900px) {
  .row {
    grid-template-columns: 1fr;
  }
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  background: color-mix(in srgb, var(--panel-2), transparent 20%);
  border-radius: 12px;
}

.checkbox > span {
  color: var(--text);
  font-size: 14px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  background: color-mix(in srgb, var(--panel-2), transparent 10%);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover {
  border-color: color-mix(in srgb, var(--brand), transparent 55%);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  border-color: var(--brand);
  border-color: color-mix(in srgb, var(--brand), transparent 30%);
  background: var(--panel-2);
  background: color-mix(in srgb, var(--brand), transparent 78%);
}

.btn.danger {
  border-color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 30%);
  background: var(--panel-2);
  background: color-mix(in srgb, var(--danger), transparent 82%);
}

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

.result-head h3 {
  margin: 0;
  font-size: 16px;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  min-height: 18px;
}

.code {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  background: color-mix(in srgb, var(--panel-2), transparent 10%);
  overflow: auto;
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
}

.small {
  color: var(--muted);
  font-size: 12.5px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 14px;
  align-items: start;
}

@media (max-width: 560px) {
  .kv {
    grid-template-columns: 1fr;
  }
}

.k {
  color: var(--muted);
  font-size: 13px;
}

.v a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.icp a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.icp {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.icp .sep {
  opacity: 0.65;
}
