:root {
  --bg-top: #f4f7ff;
  --bg-bottom: #eef2fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --stroke: rgba(80, 104, 168, 0.12);
  --text: #111827;
  --muted: #667085;
  --accent: #376dff;
  --accent-2: #7e5bff;
  --mint: #1ab69d;
  --warm: #ffd895;
  --danger: #d94163;
  --shadow-lg: 0 28px 68px rgba(53, 78, 139, 0.14);
  --shadow-md: 0 18px 42px rgba(58, 81, 137, 0.12);
  --radius-2xl: 34px;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "SF Pro Display", "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(55, 109, 255, 0.14), transparent 26%),
    radial-gradient(circle at bottom right, rgba(122, 91, 255, 0.12), transparent 22%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

button,
input,
a {
  font: inherit;
}

.app-body {
  display: flex;
  justify-content: center;
}

.mobile-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  padding: calc(24px + var(--safe-top)) 18px calc(28px + var(--safe-bottom));
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  pointer-events: none;
}

.ambient-a {
  top: 138px;
  right: -44px;
  width: 180px;
  height: 180px;
  background: rgba(55, 109, 255, 0.16);
}

.ambient-b {
  top: 420px;
  left: -70px;
  width: 190px;
  height: 190px;
  background: rgba(26, 182, 157, 0.12);
}

.ambient-c {
  top: 110px;
  right: -54px;
  width: 210px;
  height: 210px;
  background: rgba(255, 107, 149, 0.12);
}

.ambient-d {
  top: 420px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: rgba(78, 130, 255, 0.16);
}

.topbar,
.hero,
.glass-card,
.assist-row {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.chrome-btn {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  color: #263245;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(54, 73, 120, 0.08);
  backdrop-filter: blur(10px);
}

.headline {
  text-align: center;
}

.headline h1 {
  margin: 0;
  font-size: 29px;
  letter-spacing: 0.02em;
}

.headline p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: lowercase;
  letter-spacing: 0.14em;
}

.hero,
.result-copy {
  text-align: center;
}

.hero {
  margin-top: 10px;
  margin-bottom: 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #3c4d75;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 26px rgba(60, 79, 128, 0.08);
}

.hero h2,
.result-copy h2 {
  margin: 18px 0 0;
  font-size: 58px;
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: #485265;
}

.hero p,
.result-copy p,
.upload-copy p,
.section-title p,
.status-head p,
.status-log,
.assist-row {
  color: var(--muted);
  line-height: 1.7;
}

.hero p {
  width: min(92%, 360px);
  margin: 16px auto 0;
  font-size: 15px;
}

.glass-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.upload-card,
.status-card,
.player-card,
.action-card,
.result-hero {
  padding: 24px;
}

.upload-card {
  margin-top: 10px;
}

.card-glow {
  position: absolute;
  inset: -50px auto auto -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 223, 145, 0.42), transparent 66%);
  pointer-events: none;
}

.upload-copy h3,
.status-head h3,
.section-title h3 {
  margin: 0;
  font-size: 25px;
}

.upload-copy p {
  margin: 10px 0 0;
  font-size: 14px;
}

.upload-form {
  margin-top: 24px;
}

.primary-action,
.secondary-action,
.download-action,
.text-link {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.primary-action,
.download-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 19px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 20px 34px rgba(84, 93, 255, 0.28);
}

.secondary-action {
  width: 100%;
  margin-top: 14px;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(55, 109, 255, 0.08);
  color: #40516f;
  font-size: 16px;
  font-weight: 700;
}

.selected-file {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: rgba(248, 250, 255, 0.9);
  border: 1px solid var(--stroke);
}

.file-pill {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(55, 109, 255, 0.1);
  color: #3257cf;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.selected-file strong {
  font-size: 16px;
  word-break: break-word;
}

.selected-file small {
  color: var(--muted);
}

.status-card {
  margin-top: 20px;
}

.status-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pulse-ring {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 109, 255, 0.95) 0 30%, rgba(55, 109, 255, 0.18) 31% 100%);
  box-shadow: 0 0 0 0 rgba(55, 109, 255, 0.28);
  animation: pulse 1.7s infinite;
}

.progress-panel {
  margin-top: 24px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(245, 248, 255, 0.9);
  border: 1px solid var(--stroke);
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(55, 109, 255, 0.09);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #ff7aa2);
  transition: width 0.2s ease;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 14px;
}

.status-log {
  margin: 16px 0 0;
  font-size: 14px;
  word-break: break-word;
}

.assist-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 15px;
}

.text-link {
  padding: 0;
  color: #254ff7;
  background: transparent;
  font-weight: 700;
}

.result-hero {
  text-align: center;
}

.mp3-sheet {
  position: relative;
  width: 146px;
  height: 166px;
  margin: 4px auto 20px;
  border-radius: 34px 34px 22px 22px;
  background: linear-gradient(180deg, #fff, #f7f8fe);
  box-shadow: var(--shadow-md);
}

.mp3-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #ff8ba8, #ff5a85);
  clip-path: polygon(0 0, 100% 100%, 100% 0);
  border-top-right-radius: 34px;
}

.sheet-note {
  padding-top: 34px;
  font-size: 56px;
  color: #ff648e;
}

.sheet-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 0;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(135deg, #ff668f, #ff527f);
  color: white;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.result-copy h2 {
  font-size: 34px;
  line-height: 1.24;
  word-break: break-word;
}

.result-copy p {
  margin: 10px 0 0;
  font-size: 14px;
}

.player-card,
.action-card {
  margin-top: 18px;
}

.section-title p {
  margin: 8px 0 0;
  font-size: 14px;
}

audio {
  width: 100%;
  margin-top: 18px;
}

.error-text {
  color: var(--danger);
}

.hidden,
.sr-only {
  display: none !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(55, 109, 255, 0.28);
  }

  70% {
    box-shadow: 0 0 0 18px rgba(55, 109, 255, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(55, 109, 255, 0);
  }
}

/* ---------- 支付弹窗 ---------- */

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.pay-modal.hidden {
  display: none !important;
}

.pay-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.pay-modal-content {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px 18px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2a2a2e, #1e1e22);
  color: #fff;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.45);
  animation: paySlideUp 0.25s ease;
}

@keyframes paySlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pay-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #aaa;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-header {
  text-align: center;
  color: #1dd882;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.pay-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pay-option:hover {
  background: rgba(255, 255, 255, 0.1);
}

.pay-option.active {
  border-color: #1dd882;
  background: rgba(29, 216, 130, 0.08);
}

.pay-option-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pay-option-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.pay-option-sub {
  font-size: 12px;
  color: #aaa;
}

.pay-option-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pay-price {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.pay-original {
  font-size: 12px;
  color: #888;
  text-decoration: line-through;
}

.pay-empty {
  text-align: center;
  color: #888;
  font-size: 14px;
  padding: 12px 0;
}

.pay-qr-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.pay-qr-area.hidden {
  display: none !important;
}

.pay-qr-img {
  width: 160px;
  height: 160px;
  border-radius: 10px;
  background: #fff;
}

.pay-qr-tip {
  margin: 0;
  font-size: 13px;
  color: #ccc;
}

.pay-wx-link {
  font-size: 13px;
  color: #1dd882;
  text-decoration: underline;
}

.pay-action {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.pay-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pay-wechat {
  background: linear-gradient(135deg, #07c160, #05a350);
  color: #fff;
}

.pay-verify {
  margin-top: 10px;
  background: linear-gradient(135deg, #f5a623, #e0941a);
  color: #fff;
}

.pay-tip {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px;
  color: #ff5a5a;
  line-height: 1.5;
}

.mobile-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.mobile-input::placeholder {
  color: #888;
}

.mobile-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

/* ---------- 收银台页面 ---------- */

.pay-counter {
  padding: 22px;
  margin-top: 10px;
}

.pay-counter-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.pay-counter-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: none;
}

.pay-counter-header h3 {
  margin: 0;
  font-size: 18px;
}

.pay-counter-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pay-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--stroke);
  font-size: 15px;
}

.pay-channel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.pay-channel-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #07c160;
}

.pay-counter-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--danger);
}

.pay-qr-section {
  padding: 24px;
  margin-top: 18px;
  text-align: center;
}

.pay-qr-box {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.pay-qr-large {
  width: 200px;
  height: 200px;
  display: block;
}

.pay-qr-desc {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.pay-qr-hint {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.pay-wx-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #07c160, #05a350);
  color: white;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(7, 193, 96, 0.28);
}

.pay-wx-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-block;
}

.pay-safe {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

.pay-polling {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.pay-success-card {
  padding: 36px 24px;
  margin-top: 18px;
  text-align: center;
}

.pay-success-icon {
  font-size: 56px;
  margin-bottom: 14px;
}

.pay-success-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
  color: var(--text);
}

.pay-success-card p {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 420px) {
  .hero h2 {
    font-size: 46px;
  }

  .result-copy h2 {
    font-size: 28px;
  }
}
