/* 主体科技感样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
}

.app-shell {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(135deg, rgba(15,23,42,0.96), rgba(8,47,73,0.98));
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(56,189,248,0.18),
    0 24px 60px rgba(15,23,42,0.9);
  overflow: hidden;
  position: relative;
}

.app-shell::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0% 0%, rgba(59,130,246,0.14), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56,189,248,0.16), transparent 55%);
  opacity: 0.95;
  pointer-events: none;
}

.app-inner {
  position: relative;
  z-index: 1;
}

.app-top-bar {
  height: 4px;
  background: linear-gradient(90deg, #22d3ee, #6366f1, #ec4899);
}

.app-header {
  padding: 20px 20px 12px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-logo {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, #38bdf8, #1d4ed8);
  box-shadow:
    0 0 0 3px rgba(15,23,42,1),
    0 0 24px rgba(56,189,248,0.65);
  color: #e5f2ff;
  font-size: 24px;
}

.app-title {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #e5f2ff;
  text-align: center;
}

.app-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

.app-main {
  padding: 4px 18px 18px 18px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label-badge {
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,0.5);
  font-size: 10px;
  color: #93c5fd;
}

.input-wrapper {
  position: relative;
}

.input-inner-icon {
  position: absolute;
  inset-block: 0;
  left: 10px;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(31,41,55,1);
  background:
    linear-gradient(135deg, rgba(15,23,42,0.96), rgba(15,23,42,0.96));
  padding: 10px 12px 10px 30px;
  color: #e5e7eb;
  font-size: 13px;
  outline: none;
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder {
  color: #6b7280;
}

.input:focus {
  border-color: rgba(56,189,248,0.7);
  box-shadow:
    0 0 0 1px rgba(56,189,248,0.7),
    0 0 24px rgba(37,99,235,0.55);
}

.input-small {
  padding-left: 12px;
  font-size: 12px;
}

.helper-text {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

.row {
  margin-top: 12px;
}

.muted {
  font-size: 11px;
  color: #6b7280;
}

.qr-color-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.qr-color-item {
  position: relative;
}

.qr-color-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-color-visual {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(55,65,81,1);
  box-shadow: 0 0 0 1px rgba(15,23,42,1);
  cursor: pointer;
}

.qr-color-radio:checked + .qr-color-visual {
  border-color: #38bdf8;
  box-shadow:
    0 0 0 1px rgba(15,23,42,1),
    0 0 10px rgba(56,189,248,0.9);
}

.btn-primary {
  width: 100%;
  margin-top: 16px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(120deg, #22d3ee, #3b82f6, #6366f1);
  color: #ecfeff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow:
    0 14px 30px rgba(37,99,235,0.6),
    0 0 0 1px rgba(15,23,42,1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow:
    0 18px 40px rgba(37,99,235,0.8),
    0 0 0 1px rgba(15,23,42,1);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow:
    0 10px 20px rgba(15,23,42,0.9),
    0 0 0 1px rgba(15,23,42,1);
}

.btn-secondary {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,0.6);
  background: radial-gradient(circle at 0 0, rgba(45,212,191,0.15), transparent 55%);
  color: #a5f3fc;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow:
    0 0 0 1px rgba(15,23,42,1);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(6,182,212,0.55),
    0 0 0 1px rgba(15,23,42,1);
}

.result-card {
  margin-top: 16px;
  padding: 12px;
  border-radius: 16px;
  background: radial-gradient(circle at top, rgba(15,23,42,0.96), rgba(15,23,42,0.98));
  border: 1px solid rgba(30,64,175,0.8);
  box-shadow:
    0 0 0 1px rgba(15,23,42,1),
    0 14px 32px rgba(15,23,42,0.95);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.result-title {
  font-size: 12px;
  color: #cbd5f5;
  font-weight: 600;
}

.result-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(37,99,235,0.18);
  color: #bfdbfe;
  border: 1px solid rgba(59,130,246,0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.result-output {
  margin-top: 4px;
  padding: 8px 8px;
  border-radius: 10px;
  background: rgba(15,23,42,0.96);
  border: 1px solid rgba(30,64,175,0.8);
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  color: #e5e7eb;
}

.qr-section {
  margin-top: 12px;
  text-align: center;
}

.qr-title {
  font-size: 12px;
  color: #9ca3af;
}

.qr-box {
  margin-top: 8px;
  display: inline-block;
  padding: 10px;
  border-radius: 18px;
  background: radial-gradient(circle at top, rgba(15,23,42,0.98), rgba(15,23,42,1));
  border: 1px solid rgba(31,41,55,1);
  box-shadow:
    0 0 0 1px rgba(15,23,42,1),
    0 12px 26px rgba(15,23,42,0.95);
}

.qr-image {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  display: block;
}

.qr-tip {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
}

.hidden { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: #ecfeff;
  background: rgba(22,163,74,0.96);
  box-shadow:
    0 10px 30px rgba(15,23,42,0.95);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.toast-error {
  background: rgba(220,38,38,0.96);
}

.toast-info {
  background: rgba(37,99,235,0.96);
}

@media (max-width: 360px) {
  .app-shell {
    border-radius: 18px;
  }
  .qr-image {
    width: 150px;
    height: 150px;
  }
}
