* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #f4f6fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  margin: 0;
}

.container {
  max-width: 820px;
  width: 100%;
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2), 0 8px 24px -6px rgba(0, 0, 0, 0.05);
  padding: 28px 30px 34px;
  transition: 0.2s;
}

/* 顶部危险警告 – 醒目 */
.warning-banner {
  background: #dc2626;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 14px 18px;
  border-radius: 60px;
  text-align: center;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.25);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.warning-banner span {
  display: inline-block;
}

.help-text {
  background: #f0f4fe;
  padding: 12px 18px;
  border-radius: 20px;
  color: #1e293b;
  font-size: 0.95rem;
  border-left: 4px solid #3b82f6;
  margin-bottom: 24px;
  line-height: 1.5;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 22px;
}

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

.field-group label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0b1c33;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-group label .badge {
  background: #e9edf4;
  color: #1e3a6b;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0 10px;
  border-radius: 30px;
  height: 22px;
  display: inline-flex;
  align-items: center;
}

.field-group input[type="text"],
.field-group input[type="url"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #dce1eb;
  border-radius: 16px;
  font-size: 0.95rem;
  background: white;
  transition: 0.2s;
  font-family: inherit;
}

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

.field-group .hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  background: #f8fafc;
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid #e9edf4;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

.btn-generate {
  background: #2563eb;
  color: white;
  border: none;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 60px;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
  width: 100%;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.btn-generate:hover {
  background: #1d4ed8;
  transform: scale(1.01);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-generate:active {
  background: #1e3a8a;
  transform: scale(0.98);
}

/* 输出区域 */
.output-area {
  margin-top: 28px;
  border-top: 2px dashed #dce1eb;
  padding-top: 24px;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.output-area .title {
  font-weight: 600;
  font-size: 1rem;
  color: #1e293b;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-wrapper {
  background: white;
  padding: 16px 16px 10px 16px;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  display: inline-block;
  border: 1px solid #e9edf4;
}

#qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  min-width: 180px;
}

#qrcode img,
#qrcode canvas {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.json-preview {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 14px 18px;
  margin-top: 18px;
  width: 100%;
  font-size: 0.8rem;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  white-space: pre-wrap;
  word-break: break-all;
  color: #0b1c33;
  border: 1px solid #dce1eb;
  max-height: 140px;
  overflow-y: auto;
}

.error-msg {
  background: #fee2e2;
  color: #991b1b;
  padding: 12px 18px;
  border-radius: 20px;
  font-weight: 500;
  width: 100%;
  text-align: center;
  border-left: 6px solid #dc2626;
}

.footnote {
  margin-top: 16px;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 480px) {
  .container {
    padding: 18px 14px 22px;
  }
  .warning-banner {
    font-size: 1rem;
    padding: 12px 12px;
  }
  .checkbox-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .btn-generate {
    padding: 14px 16px;
  }
}