:root {
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(148, 163, 184, 0.25);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-soft: 0 10px 20px rgba(0, 0, 0, 0.12);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --danger: #ef4444;
  --warning: #f97316;
  --warning-hover: #ea580c;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.home-bg {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 800px at 80% -10%, rgba(96, 165, 250, 0.25), transparent 70%), #f8fafc;
}

.home-card {
  width: 100%;
  max-width: 720px;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  padding: 28px 28px 22px;
  box-shadow: var(--shadow);
}

.home-title {
  margin: 0;
  font-size: clamp(20px, 4vw, 28px);
  letter-spacing: 0.2px;
}

.home-desc {
  margin-top: 10px;
  font-size: clamp(16px, 2.8vw, 18px);
  line-height: 1.7;
}

.home-subdesc {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.home-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-ghost {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.25);
}

.home-footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.link-muted {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(148, 163, 184, 0.45);
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.label {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
}

.value {
  color: #1f2937;
  font-size: 13px;
  line-height: 1.3;
}

.price {
  color: var(--danger);
  font-size: 16px;
  font-weight: 700;
}

.btn-copy {
  margin-left: auto;
  padding: 3px 8px;
  background: var(--primary);
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-copy:hover {
  background: var(--primary-hover);
}

.instruction {
  background-color: #fff5f5;
  border-left: 2px solid #f56565;
  padding: 8px;
  margin: 8px 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.4;
}

.instruction-title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 13px;
  color: #111827;
}

.instruction ol {
  list-style: decimal;
  padding-left: 16px;
  margin: 0;
}

.instruction li {
  margin: 2px 0;
}

.text-danger {
  color: var(--danger);
  font-weight: 600;
}

.text-highlight {
  font-weight: 600;
}

.btn-taobao {
  width: 100%;
  padding: 8px 16px;
  background: var(--warning);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: background-color 0.2s ease;
}

.btn-taobao:hover {
  background: var(--warning-hover);
}

.field {
  margin-bottom: 12px;
}

.field-label {
  display: block;
  color: #374151;
  font-size: 13px;
  margin-bottom: 4px;
}

.input,
.textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  min-height: 36px;
  color: #111827;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.textarea {
  min-height: auto;
  resize: none;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.submit-wrap {
  margin-top: 8px;
}

.btn-submit {
  width: 100%;
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  min-height: 36px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-submit:hover {
  background: var(--primary-hover);
}

.btn-submit:disabled {
  background: #9ca3af;
  color: #4b5563;
  cursor: not-allowed;
}

.hint {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin: 12px 0 0;
}

.status-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.status-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
  text-align: center;
}

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.status-icon svg {
  width: 32px;
  height: 32px;
}

.status-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.status-desc {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

.status-tip {
  margin-top: 20px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  font-size: 13px;
}

.toast-container {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 320px;
  max-width: calc(100vw - 24px);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 12px;
  transform: translateX(20px);
  opacity: 0;
  transition: transform 240ms ease, opacity 240ms ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-title {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0;
}

.toast-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  color: rgba(17, 24, 39, 0.5);
}

.toast--success {
  border-color: rgba(16, 185, 129, 0.25);
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.25);
}

.toast--warning {
  border-color: rgba(245, 158, 11, 0.25);
}

.toast--info {
  border-color: rgba(59, 130, 246, 0.25);
}

.toast-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 3px;
}

.toast--success .toast-dot {
  background: #10b981;
}

.toast--error .toast-dot {
  background: #ef4444;
}

.toast--warning .toast-dot {
  background: #f59e0b;
}

.toast--info .toast-dot {
  background: #3b82f6;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
}

.modal-root.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  overflow: hidden;
}

.modal-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
  font-weight: 700;
}

.modal-body {
  padding: 16px;
}

.modal-image {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.modal-image img {
  max-width: 100%;
  max-height: 224px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.modal-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-confirm {
  width: 100%;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.modal-confirm:hover {
  background: var(--primary-hover);
}

.loading-root {
  position: fixed;
  inset: 0;
  z-index: 9997;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.loading-root.open {
  display: flex;
}

.loading-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 16px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: rgba(59, 130, 246, 1);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin: 0;
  color: #374151;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
}
