* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

.wrap {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 16px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.header {
  padding: 28px 24px 18px;
  border-bottom: 1px solid #eef2f7;
}

.title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.subtitle {
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.8;
}

.form-area {
  padding: 24px;
}

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

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.field input {
  width: 100%;
  height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
  background: #fff;
}

.field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

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

button {
  height: 44px;
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #eef2f7;
  color: #374151;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.status {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  background: #f9fafb;
  color: #4b5563;
  min-height: 46px;
  display: flex;
  align-items: center;
}

.result-area {
  padding: 0 24px 24px;
}

.tips {
  margin-top: 14px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.8;
}

.result-card {
  margin-top: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.result-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef2f7;
  background: #fafbfc;
}

.result-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green {
  background: #dcfce7;
  color: #166534;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-yellow {
  background: #fef3c7;
  color: #92400e;
}

.badge-red {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-gray {
  background: #e5e7eb;
  color: #374151;
}

.badge-purple {
  background: #ede9fe;
  color: #6d28d9;
}

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

.result-item {
  min-width: 0;
}

.result-label {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
  line-height: 1.5;
}

.result-value {
  font-size: 15px;
  color: #111827;
  line-height: 1.6;
  word-break: break-word;
}

.empty-value {
  color: #9ca3af;
}

.value-muted {
  color: #9ca3af;
  font-style: italic;
}

.help-box {
  margin: 0 18px 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.8;
}

.help-green {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.help-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.help-yellow {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.help-red {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.help-gray {
  background: #f9fafb;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.help-purple {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

@media (max-width: 768px) {
  .wrap {
    margin: 20px auto;
  }

  .title {
    font-size: 24px;
  }

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

  .form-area,
  .result-area,
  .header {
    padding-left: 16px;
    padding-right: 16px;
  }

  button {
    width: 100%;
  }

  .result-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

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