:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-accent: rgba(27, 84, 156, 0.12);
  --card: rgba(255, 255, 255, 0.9);
  --card-border: rgba(20, 30, 42, 0.08);
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #124a8c;
  --primary-strong: #0b3a72;
  --primary-soft: rgba(18, 74, 140, 0.12);
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(18, 74, 140, 0.18), transparent 35%),
    radial-gradient(circle at top right, rgba(52, 146, 230, 0.12), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

code {
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(18, 74, 140, 0.08);
  color: var(--primary-strong);
  font-size: 0.96em;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.9));
  box-shadow: var(--shadow);
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.description {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.status-panel {
  flex: 0 0 260px;
  align-self: center;
  padding: 20px;
  border-radius: 22px;
  background: rgba(18, 74, 140, 0.07);
  border: 1px solid rgba(18, 74, 140, 0.12);
}

.status-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.status-value {
  color: var(--primary-strong);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

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

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

.summary-card {
  grid-column: 1 / -1;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  min-width: 120px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 12px 24px rgba(18, 74, 140, 0.22);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(18, 74, 140, 0.26);
}

button:active {
  transform: translateY(0);
  opacity: 0.92;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.result-text {
  display: block;
  width: 100%;
  min-height: 184px;
  padding: 16px;
  border: 1px solid rgba(18, 74, 140, 0.14);
  border-radius: 18px;
  color: var(--text);
  background: rgba(248, 251, 255, 0.95);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-text:focus {
  outline: 2px solid rgba(18, 74, 140, 0.18);
  outline-offset: 2px;
}

.config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

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

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

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(18, 74, 140, 0.14);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
  font-size: 14px;
}

.field input:focus {
  outline: 2px solid rgba(18, 74, 140, 0.16);
  outline-offset: 2px;
}

.field-readonly {
  justify-content: center;
}

.path-value {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px dashed rgba(18, 74, 140, 0.2);
  border-radius: 14px;
  color: var(--primary-strong);
  background: rgba(18, 74, 140, 0.05);
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

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

.summary-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(18, 74, 140, 0.05);
  border: 1px solid rgba(18, 74, 140, 0.09);
}

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

.summary-value {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-word;
}

.summary-value-break {
  word-break: break-all;
}

@media (max-width: 920px) {
  .hero {
    flex-direction: column;
  }

  .status-panel {
    width: 100%;
    flex-basis: auto;
  }

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

  .summary-card {
    grid-column: auto;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding-top: 16px;
    padding-bottom: 24px;
  }

  .hero,
  .card {
    padding: 18px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .card-head {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

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

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