/* ===== 基础重置 (mobile-first) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #2c3e50;
  background: #f5f5f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; border: none; }
img { max-width: 100%; display: block; }

/* ===== 顶部导航 (浅蓝青渐变) ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(135deg, #6bbce8 0%, #8bd0d0 50%, #5ec5c5 100%);
  box-shadow: 0 2px 8px rgba(120,180,210,0.2);
  margin: 0;
  border: none;
  width: 100%;
  left: 0;
  right: 0;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.topbar .brand .logo-icon,
.topbar .brand .logo-img {
  width: 42px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #8bc1eb 0%, #6dcccc 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px;
  font-weight: 800;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(123,184,232,0.35);
  border: 1.5px solid rgba(255,255,255,0.6);
}
.topbar .home-btn {
  padding: 5px 18px;
  background: rgba(255,255,255,0.25);
  color: #ffffff;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  letter-spacing: 1px;
}
.topbar .home-btn:active {
  background: rgba(255,255,255,0.4);
}

/* ===== Banner 区域 ===== */
.hero-banner {
  height: 140px;
  background: linear-gradient(135deg, #6bbce8 0%, #8bd0d0 50%, #5ec5c5 100%);
  position: relative;
  overflow: hidden;
}
.hero-banner .banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 主体容器 (手机) ===== */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px 40px;
}

/* ===== 标题卡 ===== */
.title-card {
  background: linear-gradient(180deg, #f0f7fc 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  border: 1px solid #e8f0f8;
}
.title-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
  pointer-events: none;
}
.title-card h1 {
  font-size: 22px;
  font-weight: 800;
  color: #2471a3;
  margin-bottom: 6px;
  letter-spacing: 1.5px;
}
.title-card .subtitle {
  color: #43a047;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.title-card .features {
  color: #8a9aab;
  font-size: 12px;
  font-weight: 500;
}

/* ===== 公告卡片 ===== */
.announcement {
  background: #fffbf5;
  border-left: 4px solid #d4a574;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.75;
  max-height: 280px;
  overflow-y: auto;
  color: #333333;
}
.announcement::-webkit-scrollbar { width: 4px; }
.announcement::-webkit-scrollbar-thumb { background: rgba(212,165,116,0.3); border-radius: 2px; }
.announcement h3 {
  color: #c25e00;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
  letter-spacing: 0.5px;
}
.announcement h4 {
  color: #c25e00;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 6px;
  border-left: 2px solid #d4a574;
  padding: 2px 10px 2px 8px;
  background: rgba(212,165,116,0.08);
  border-radius: 2px;
  display: inline-block;
}
.announcement h4:first-of-type { margin-top: 6px; }
.announcement ul {
  list-style: none;
  padding: 0;
  margin: 0 0 6px 0;
}
.announcement li {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 12.5px;
  color: #555555;
  line-height: 1.65;
}
.announcement li::before {
  content: '·';
  position: absolute;
  left: 4px;
  top: 4px;
  color: #d4a574;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

/* ===== 通用卡片 ===== */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  margin-bottom: 14px;
  position: relative;
}
.card-title {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 14px;
}
.card-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 14px;
  background: #2471a3;
  border-radius: 2px;
  margin-right: 8px;
}
.card-title .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2471a3;
  margin-right: 6px;
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  color: #5a6b7d;
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: 500;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  background: #ffffff;
  border: 1.5px solid #d8e4ee;
  border-radius: 28px;
  font-size: 16px;
  color: #2c3e50;
  transition: all 0.2s;
  -webkit-appearance: none;
  letter-spacing: 0.5px;
}
.form-group input::placeholder {
  color: #b0c4d8;
  letter-spacing: 0.5px;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  background: #ffffff;
  border-color: #2471a3;
  box-shadow: 0 0 0 3px rgba(36,113,163,0.08);
}
.form-group .hint {
  font-size: 12px;
  color: #8a9aab;
  margin-top: 6px;
  margin-left: 8px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  text-align: center;
  user-select: none;
  min-height: 46px;
  letter-spacing: 1px;
}
.btn-primary {
  background: #f7b733;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(247,183,51,0.3);
  font-weight: 500;
}
.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
  background: #f09819;
}
.btn-primary:disabled {
  background: #d8dde3;
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-block { width: 100%; }

/* 代金券已领取徽章（居中显示） */
.coupon-claimed-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 7px 18px;
  background: #5ba0e8;
  color: #ffffff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(91,160,232,0.35);
}
.coupon-claimed-badge .check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: #ffffff;
  color: #5ba0e8;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  margin-right: 3px;
}

/* 状态指示 */
.status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 0;
  font-size: 12px;
  color: #2471a3;
}
.status-row .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2471a3;
  animation: pulse 1.5s infinite;
}
.status-row.success { color: #43a047; }
.status-row.success .dot { background: #4caf50; animation: none; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== 步骤容器 ===== */
.step { display: none; }
.step.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 折扣标识 ===== */
.discount-badge {
  display: inline-flex;
  align-items: center;
  background: #f7b733;
  color: #fff;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(247,183,51,0.25);
  letter-spacing: 0.5px;
}
.discount-badge::before {
  content: '🔥';
  margin-right: 4px;
  font-size: 11px;
}

/* ===== 金额选择网格 ===== */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.amount-card {
  position: relative;
  padding: 14px 10px;
  background: #ffffff;
  border: 1.5px solid #e0e6ec;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.amount-card:active:not(.disabled) {
  transform: scale(0.97);
}
.amount-card.selected {
  background: #fff8e1;
  border-color: #f7b733;
  box-shadow: 0 2px 8px rgba(247,183,51,0.15);
}
.amount-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fb;
  border-style: dashed;
}
.amount-card .value {
  font-size: 19px;
  font-weight: 700;
  color: #2471a3;
  margin-bottom: 3px;
}
.amount-card.selected .value {
  color: #e65100;
}
.amount-card .value small { font-size: 11px; color: #8a9aab; font-weight: 400; }
.amount-card .price {
  font-size: 12.5px;
  color: #e65100;
  font-weight: 600;
}
.amount-card .stock-tag {
  position: absolute;
  top: 5px; right: 5px;
  background: #f7b733;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(247,183,51,0.25);
  letter-spacing: 0.5px;
}
.amount-card .original {
  text-decoration: line-through;
  color: #b0b8c1;
  font-size: 10.5px;
  margin-top: 1px;
}

/* ===== 订单摘要 ===== */
.order-summary {
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.order-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  color: #5a6b7d;
}
.order-summary .row span:last-child {
  color: #2c3e50;
  font-weight: 500;
}
.order-summary .row .discount {
  color: #43a047;
  font-weight: 600;
}
.order-summary .row.total {
  border-top: 1px dashed #d0d7e0;
  margin-top: 6px;
  padding-top: 10px;
  color: #2c3e50;
  font-weight: 600;
}
.order-summary .row .price {
  color: #e53935;
  font-weight: 700;
  font-size: 18px;
}

/* ===== 支付方式 ===== */
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.pay-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  background: #ffffff;
  border: 1.5px solid #e0e6ec;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 76px;
  text-align: center;
}
.pay-method:active { background: #fff8e1; }
.pay-method.selected {
  background: #fff8e1;
  border-color: #f7b733;
  box-shadow: 0 2px 8px rgba(247,183,51,0.15);
}
.pay-method .icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.pay-method .icon.wechat { background: #07c160; }
.pay-method .icon.alipay { background: #1677ff; }
.pay-method .name { font-weight: 500; color: #2c3e50; font-size: 13.5px; }
.pay-method .desc { font-size: 11.5px; color: #8a9aab; }

/* ===== 支付页面 ===== */
.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 14px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 14px;
}
.qr-box {
  width: 200px; height: 200px;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  margin-bottom: 12px;
}
.qr-box img, .qr-box canvas, .qr-box svg {
  width: 100%; height: 100%;
  object-fit: contain;
}
.qr-tip {
  font-size: 12.5px;
  color: #5a6b7d;
  text-align: center;
  line-height: 1.7;
}
.qr-tip strong {
  color: #e53935;
  font-size: 15px;
  margin: 0 3px;
}

.confirm-list {
  background: #ffffff;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.confirm-list .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: #5a6b7d;
}
.confirm-list .row strong {
  color: #2c3e50;
  font-weight: 600;
}
.confirm-list .row.actual strong {
  color: #e53935;
  font-size: 17px;
}

/* ===== 上传区域 ===== */
.upload-area {
  border: 2px dashed #d8dde3;
  border-radius: 12px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafbfc;
  margin-bottom: 14px;
}
.upload-area:active, .upload-area.dragover {
  border-color: #2471a3;
  background: #f0f7fc;
}
.upload-area .icon {
  font-size: 36px;
  color: #b0b8c1;
  margin-bottom: 6px;
}
.upload-area .text {
  color: #5a6b7d;
  font-size: 13.5px;
  margin-bottom: 4px;
}
.upload-area .hint {
  color: #8a9aab;
  font-size: 11.5px;
}
.upload-preview {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f7fa;
  margin-bottom: 14px;
  text-align: center;
}
.upload-preview img {
  max-height: 280px;
  margin: 0 auto;
  border-radius: 8px;
}
.upload-preview .remove {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
}

/* ===== 充值中动画 ===== */
.loading-wrap {
  text-align: center;
  padding: 50px 20px;
}
.loading-spinner {
  width: 70px; height: 70px;
  margin: 0 auto 20px;
  position: relative;
}
.loading-spinner::before,
.loading-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #e4e7ec;
  border-top-color: #f7b733;
  animation: spin 1s linear infinite;
}
.loading-spinner::after {
  border-top-color: #5ec5c5;
  animation-direction: reverse;
  animation-duration: 1.5s;
  inset: 10px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loading-text {
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.loading-sub {
  color: #8a9aab;
  font-size: 12.5px;
}

/* ===== 招商卡片 ===== */
.recruit-card {
  background: linear-gradient(180deg, #fff8e1 0%, #ffffff 100%);
  border-left: 4px solid #d4a574;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.recruit-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
  pointer-events: none;
}
.recruit-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  position: relative;
}
.recruit-icon { font-size: 19px; }
.recruit-title {
  font-size: 15px;
  font-weight: 800;
  color: #5d4037;
  letter-spacing: 0.5px;
}
.recruit-tag {
  background: #f7b733;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 10px;
  margin-left: auto;
  box-shadow: 0 2px 6px rgba(247,183,51,0.25);
  letter-spacing: 0.5px;
}
.recruit-text {
  color: #555555;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 500;
  position: relative;
}

/* ===== 结果页 ===== */
.result-wrap {
  text-align: center;
  padding: 30px 16px;
}
.result-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  color: #fff;
}
.result-icon.success { background: linear-gradient(135deg, #4caf50 0%, #81c784 100%); }
.result-icon.fail { background: linear-gradient(135deg, #d84315 0%, #f7b733 100%); }
.result-title {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 6px;
}
.result-desc {
  color: #5a6b7d;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.7;
}
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-outline {
  background: #fff;
  color: #5a6b7d;
  border: 1px solid #d8dde3;
  box-shadow: none;
}
.btn-outline:active { background: #f5f7fa; }

/* ===== 响应式 - 更大屏幕 (横屏手机/平板) ===== */
@media (min-width: 540px) {
  .container { max-width: 520px; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-banner { height: 160px; }
  .title-card h1 { font-size: 24px; }
  .pay-methods { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  body { background: #e8ecef; }
  .container {
    max-width: 420px;
    margin: 24px auto;
    padding: 20px 16px 40px;
    background: #f5f7fa;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
    min-height: calc(100vh - 48px);
  }
  .topbar {
    border-radius: 0;
    max-width: none;
    width: 100%;
    margin: 0;
    box-shadow: 0 2px 6px rgba(78,193,193,0.15);
  }
  .topbar { padding: 14px 18px; }
  .topbar .brand { font-size: 17px; }
  .topbar .brand .logo-icon, .topbar .brand .logo-img { width: 42px; height: 32px; }
  .hero-banner {
    max-width: none;
    margin: 0;
    height: 160px;
    border-radius: 0;
  }
  .title-card { padding: 22px 18px; }
  .title-card h1 { font-size: 23px; }
  .title-card .subtitle { font-size: 14px; }
  .card { padding: 20px 18px; }
  .qr-box { width: 220px; height: 220px; }
}
@media (min-width: 1024px) {
  .container { max-width: 420px; margin: 40px auto; min-height: calc(100vh - 80px); }
  .topbar, .hero-banner { max-width: none; width: 100%; }
}

/* ===== 超小屏适配 (iPhone SE 1代 / 320px) ===== */
@media (max-width: 360px) {
  .container { padding: 10px 10px 32px; }
  .topbar { padding: 8px 12px; }
  .topbar .brand { font-size: 15px; gap: 6px; }
  .topbar .brand .logo-icon, .topbar .brand .logo-img { width: 26px; height: 26px; font-size: 14px; }
  .topbar .home-btn { padding: 4px 12px; font-size: 11px; }
  .hero-banner { height: 120px; }
  .title-card { padding: 16px 14px; }
  .title-card h1 { font-size: 19px; }
  .title-card .subtitle { font-size: 12px; }
  .title-card .features { font-size: 11px; }
  .announcement { padding: 10px 12px; font-size: 12px; }
  .card { padding: 14px 12px; }
  .amount-grid { gap: 8px; }
  .amount-card { padding: 12px 8px; }
  .amount-card .value { font-size: 17px; }
  .amount-card .price { font-size: 12px; }
  .pay-method { padding: 10px; min-height: 50px; }
  .pay-method .icon { width: 28px; height: 28px; font-size: 14px; }
  .qr-box { width: 180px; height: 180px; padding: 8px; }
  .btn { padding: 12px 18px; font-size: 14px; min-height: 42px; }
  .recruit-card { padding: 12px 14px; }
  .recruit-title { font-size: 14px; }
  .recruit-text { font-size: 12px; }
  .result-icon { width: 70px; height: 70px; font-size: 36px; }
  .result-title { font-size: 18px; }
}
@media (max-width: 320px) {
  .container { padding: 8px 8px 28px; }
  .topbar { padding: 6px 10px; }
  .amount-grid { gap: 6px; }
  .amount-card .value { font-size: 15px; }
  .qr-box { width: 160px; height: 160px; }
}
