:root {
  --bg: #0b1220;
  --panel: rgba(13, 21, 37, 0.88);
  --line: rgba(255, 255, 255, 0.12);
  --text: #edf2f7;
  --muted: #9fb0c7;
  --accent: #6ee7b7;
  --accent-strong: #34d399;
  --cyan: #38bdf8;
  --warn: #f59e0b;
  --bad: #fb7185;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(110, 231, 183, 0.18), transparent 35%),
    linear-gradient(180deg, #08101b 0%, #0f172a 100%);
}

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 40px auto;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.panel {
  margin-top: 18px;
}

.hero-home {
  display: grid;
  gap: 18px;
}

.hero-copy {
  display: grid;
  gap: 10px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.metric-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-card strong {
  font-size: 24px;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
}

h1,
h2,
p {
  margin-top: 0;
}

.lead,
.muted {
  color: var(--muted);
}

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

.stacked-head {
  align-items: end;
}

.compact {
  margin: 6px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.order-time {
  margin: 8px 0 0;
  font-size: 12px;
}

label {
  font-weight: 600;
}

.section-label {
  margin-bottom: 4px;
  font-weight: 600;
}

.upload-form {
  display: grid;
  gap: 12px;
}

.target-section {
  display: grid;
  gap: 10px;
}

.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.target-chip {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.target-chip input {
  margin: 0;
}

.target-chip span {
  font-weight: 600;
}

.target-chip em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.target-chip.is-disabled {
  border-style: dashed;
  opacity: 0.55;
}

.target-chip.is-disabled input,
.target-chip.is-disabled span,
.target-chip.is-disabled em {
  cursor: not-allowed;
}

.target-chip.is-disabled span {
  color: var(--muted);
}

input[type="file"] {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

button,
a {
  color: var(--accent);
}

.action-link {
  font-weight: 600;
  text-decoration: none;
}

button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--accent);
  color: #042014;
  font-weight: 700;
  cursor: pointer;
}

form {
  margin: 0;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.mode-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.mode-title {
  font-size: 18px;
  font-weight: 700;
}

.mode-copy {
  color: var(--muted);
}

.mode-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mode-input:checked + .mode-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.35), 0 12px 28px rgba(110, 231, 183, 0.12);
  transform: translateY(-1px);
}

.mode-card:hover {
  border-color: rgba(110, 231, 183, 0.5);
}

.mode-input:focus-visible + .mode-card {
  outline: 2px solid rgba(110, 231, 183, 0.6);
  outline-offset: 2px;
}

.price {
  margin: 10px 0 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.progress-wrap {
  margin-top: 14px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6ee7b7 0%, #34d399 100%);
  transition: width 240ms ease;
}

.job-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.job-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.job-meta {
  display: grid;
  gap: 4px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 8px;
}

.status-label {
  color: var(--muted);
}

.inline-tag {
  display: inline-block;
  margin: 4px 6px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
}

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

.stem-block {
  width: 100%;
  display: grid;
  gap: 10px;
}

.stem-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.link-button,
.ghost-button,
.icon-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.solid-ghost {
  color: var(--text);
  padding: 12px 18px;
}

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

.icon-button {
  font-size: 24px;
  line-height: 1;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 15, 0.72);
}

.modal-card {
  position: relative;
  width: min(760px, calc(100% - 32px));
  margin: 12vh auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #10192b;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.modal-head h2 {
  margin-bottom: 0;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: start;
}

.checkout-qr,
.checkout-meta {
  display: grid;
  gap: 12px;
}

.qr-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 64px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.pay-badge-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: currentColor;
  color: #08101b;
  font-size: 11px;
  font-weight: 800;
}

.pay-badge.wechat {
  background: rgba(52, 211, 153, 0.16);
  color: #34d399;
}

.pay-badge.alipay {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
}

.pay-tabs {
  display: flex;
  gap: 8px;
}

.pay-tab {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.pay-tab[data-pay-tab="wechat"] {
  color: #7dd3a7;
}

.pay-tab[data-pay-tab="alipay"] {
  color: #7dc8ff;
}

.pay-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.24);
}

.pay-tab[data-pay-tab="wechat"].active {
  border-color: #34d399;
  color: #34d399;
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.28);
}

.pay-tab[data-pay-tab="alipay"].active {
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.28);
}

.qr-box {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  border: 2px solid rgba(52, 211, 153, 0.18);
}

.qr-shell {
  position: relative;
}

.qr-grid {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background:
    linear-gradient(90deg, #000 10%, transparent 10%, transparent 20%, #000 20%, #000 30%, transparent 30%, transparent 40%, #000 40%, #000 50%, transparent 50%, transparent 60%, #000 60%, #000 70%, transparent 70%, transparent 80%, #000 80%, #000 90%, transparent 90%),
    linear-gradient(#000 10%, transparent 10%, transparent 20%, #000 20%, #000 30%, transparent 30%, transparent 40%, #000 40%, #000 50%, transparent 50%, transparent 60%, #000 60%, #000 70%, transparent 70%, transparent 80%, #000 80%, #000 90%, transparent 90%);
  background-size: 24px 24px;
  background-position: center;
}

.qr-grid.alipay {
  filter: hue-rotate(165deg) saturate(1.2);
}

.qr-box:has(.qr-grid.alipay) {
  border-color: rgba(56, 189, 248, 0.18);
}

.qr-paid-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border-radius: 18px;
  border: 2px solid rgba(52, 211, 153, 0.2);
  background: rgba(110, 231, 183, 0.08);
}

.qr-paid-state strong {
  font-size: 20px;
  color: var(--accent);
}

.summary-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
}

.summary-row strong {
  color: var(--text);
  text-align: right;
}

.summary-row.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.summary-row.total strong {
  color: var(--accent);
  font-size: 22px;
}

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

.pay-success {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(110, 231, 183, 0.24);
  background: rgba(110, 231, 183, 0.08);
}

.success-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  margin-bottom: 8px;
  background: rgba(110, 231, 183, 0.18);
  color: var(--accent);
  font-weight: 800;
  font-size: 18px;
}

.success-mark.large {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  font-size: 30px;
}

.pay-success strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
}

.pay-success p {
  margin-bottom: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

.unlocked-action {
  color: #34d399;
  animation: unlockFlash 1s ease;
}

@keyframes unlockFlash {
  0% { opacity: 0.4; transform: translateY(1px); }
  40% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

audio {
  width: 100%;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-awaiting_payment,
.badge-queued,
.badge-processing,
.badge-waiting_upload {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
}

.badge-completed {
  background: rgba(110, 231, 183, 0.18);
  color: var(--accent);
}

.badge-failed {
  background: rgba(251, 113, 133, 0.18);
  color: var(--bad);
}

.error {
  color: var(--bad);
}

@media (max-width: 640px) {
  .hero-metrics,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .job-list li {
    align-items: flex-start;
    flex-direction: column;
  }

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