:root {
  --primary: #1677FF;
  --primary-dark: #0958D9;
  --primary-light: #4096FF;
  --gold: #FF8A00;
  --gold-light: #FFB020;
  --vip: #7B61FF;
  --vip-dark: #5B3EE8;
  --success: #00B96B;
  --danger: #FF4D4F;
  --bg: #F2F4F7;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --text-2: #595959;
  --text-3: #8C8C8C;
  --border: #E8E8E8;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(22,119,255,0.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #0a1530;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 主容器 */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0,0,0,0.2);
}
/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  z-index: 10;
}
/* 视图切换 — 修复:确保所有 view 默认 none */
.view { display: none; animation: fadeIn 0.4s ease; }
.view.active { display: block; }
.view.success-view.active,
.view.fail-view.active { display: flex; } /* 结果页用 flex 布局 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ===== 登录页 ===== */
.login-view {
  min-height: 100vh;
  background: linear-gradient(160deg, #1677FF 0%, #0958D9 60%, #003EB3 100%);
  position: relative;
  overflow: hidden;
}
.login-view::before {
  content: '';
  position: absolute;
  top: -120px; right: -100px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}
.login-view::after {
  content: '';
  position: absolute;
  bottom: -180px; left: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(64,150,255,0.35), transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}
.login-content {
  position: relative;
  z-index: 2;
  padding: 50px 32px 40px;
  color: #fff;
}
.login-logo {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.login-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.login-subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 48px;
}
.login-card {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 6px;
  margin-bottom: 22px;
}
.input-group {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.input-group:last-child { border-bottom: none; }
.input-icon {
  width: 22px; height: 22px;
  margin-right: 14px;
  opacity: 0.85;
  flex-shrink: 0;
}
.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  min-width: 0;
}
.input-group input::placeholder { color: rgba(255,255,255,0.55); }
.pwd-toggle {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 4px;
  cursor: pointer;
}
.pwd-toggle svg { width: 20px; height: 20px; display: block; }
.login-btn {
  width: 100%;
  height: 52px;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  transition: all 0.2s;
  letter-spacing: 1px;
}
.login-btn:active { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.6; }
.login-footer {
  text-align: center;
  margin-top: 36px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
}
.icp-link {
  color: inherit;
  text-decoration: none;
}
.icp-link:active {
  opacity: 0.75;
}
/* ===== 充值主页 ===== */
.home-view { padding-bottom: 124px; }
.user-header {
  background: linear-gradient(135deg, #1677FF 0%, #0958D9 100%);
  padding: 0 20px 28px;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
}
.user-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(255,255,255,0.14), transparent 70%);
  border-radius: 50%;
}
.user-header::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,176,32,0.18), transparent 70%);
  border-radius: 50%;
}
.user-info {
  display: flex;
  align-items: center;
  padding: 12px 0 22px;
  position: relative;
  z-index: 2;
}
.user-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-weight: 700;
  color: #fff;
  font-size: 17px;
}
.user-meta { flex: 1; min-width: 0; }
.user-name {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-id {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  margin-top: 2px;
}
.logout-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.logout-btn:active { transform: scale(0.95); }
.balance-card {
  background: rgba(255,255,255,0.16);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 18px;
  padding: 20px;
  position: relative;
  z-index: 2;
}
.balance-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}
.balance-summary-item {
  min-width: 0;
}
.balance-summary-full {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.balance-summary-label {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  margin-bottom: 8px;
}
.balance-summary-value {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Tab */
.tabs {
  display: flex;
  background: #fff;
  margin: 20px;
  border-radius: 14px;
  padding: 4px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
  z-index: 5;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.tab svg { width: 14px; height: 14px; }
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 12px rgba(22,119,255,0.35);
}
/* 充值区 */
.recharge-section {
  padding: 0 20px;
  display: none;
  animation: fadeIn 0.3s;
}
.recharge-section.active { display: block; }
.section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title svg { color: var(--primary); }
/* 银币套餐 */
.coin-grid {
  display: grid;
  gap: 10px;
}
.coin-grid.cols-1 { grid-template-columns: 1fr; }
.coin-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.coin-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-footer {
  padding: 28px 20px 10px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.6;
}
.app-download-section {
  padding: 12px 20px 0;
}
.recharge-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #CFE2FF;
  border-radius: 16px;
  background: #F7FAFF;
  color: #667894;
}
.recharge-note-icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
  flex: 0 0 auto;
  margin-top: 2px;
}
.recharge-note-text {
  min-width: 0;
  font-size: 13px;
  line-height: 1.75;
}
.recharge-note-text p + p {
  margin-top: 4px;
}
.download-card {
  margin-top: 14px;
  padding: 22px 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, #121B30 0%, #2C405C 100%);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 28px rgba(18,27,48,0.16);
}
.download-app-icon,
.download-dialog-icon {
  background: linear-gradient(135deg, #FFB000 0%, #FF7A00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(255,138,0,0.22);
}
.download-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
}
.download-app-icon svg,
.download-dialog-icon svg {
  width: 72%;
  height: 72%;
  display: block;
}
.download-card-copy {
  min-width: 0;
}
.download-card-title {
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
  white-space: nowrap;
}
.download-card-desc {
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
}
.download-card-btn {
  min-width: 122px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #121B30;
  font-size: 16px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.download-card-btn svg {
  width: 20px;
  height: 20px;
}
.download-card-btn:active {
  transform: scale(0.97);
}
.coin-item {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 8px 12px;
  min-height: 132px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.coin-item:active { transform: scale(0.97); }
.coin-item.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, #FFF7E6, #FFFBF0);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,138,0,0.18);
}
.coin-item.selected::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-top: 26px solid var(--gold);
  border-left: 26px solid transparent;
}
.coin-item.selected::after {
  content: '✓';
  position: absolute;
  top: 2px; right: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.coin-item.selected.has-discount::before,
.coin-item.selected.has-discount::after {
  display: none;
}
.coin-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.2;
}
.coin-amount.is-medium { font-size: 19px; }
.coin-amount.is-long,
.coin-grid.cols-3 .coin-amount { font-size: 17px; }
.coin-item.selected .coin-amount { color: var(--gold); }
.coin-amount .coin-icon {
  width: 14px; height: 14px;
  background: linear-gradient(135deg, #FFD66E, #FF8A00);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}
.coin-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.2;
}
.coin-price {
  font-size: 18px;
  color: var(--primary);
  font-weight: 900;
}
.coin-discount {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 32px;
  padding: 3px 6px;
  border-radius: 7px;
  background: linear-gradient(135deg, #FF4D4F, #FF7A45);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  z-index: 3;
}
.coin-origin {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 7px;
  line-height: 1;
  text-decoration: line-through;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coin-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 2px 10px;
  border: 1px solid #8AD64B;
  background: #F0FFE8;
  color: #38A300;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}
.coin-bonus {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
}
.coin-bonus.hot {
  left: auto; right: 6px;
  background: linear-gradient(135deg, #FF4D4F, #FF7A45);
}
/* 自定义金额 */
.custom-amount {
  margin-top: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.custom-label {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.custom-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.custom-input-wrap:focus-within {
  border-color: var(--primary);
  background: #fff;
}
.custom-input-wrap .currency {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-right: 8px;
}
.custom-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  min-width: 0;
}
.custom-coins-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.custom-coins-hint b {
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
}
/* 底部操作栏 */
.action-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: none; /* 修复:默认隐藏，由JS控制显示 */
  align-items: center;
  gap: 16px;
  z-index: 100;
}
.action-bar.show { display: flex; }
.action-info { flex: 1; min-width: 0; }
.action-label { font-size: 11px; color: var(--text-3); }
.action-amount {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-top: 2px;
}
.action-amount .yuan {
  font-size: 14px;
  font-weight: 600;
}
.action-amount .coins {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  margin-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-saving {
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1px solid #8AD64B;
  background: #F0FFE8;
  color: #38A300;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  width: fit-content;
}
.action-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(22,119,255,0.35);
  transition: all 0.2s;
  flex-shrink: 0;
}
.action-btn:active { transform: scale(0.97); }
.action-btn:disabled { opacity: 0.5; box-shadow: none; }
/* ===== 支付确认弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-mask.active {
  display: flex;
  animation: fadeInBg 0.25s;
}
@keyframes fadeInBg {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: pan-y;
}
.app-download-modal {
  align-items: center;
  padding: 20px 12px;
  z-index: 240;
}
.app-download-dialog {
  position: relative;
  width: min(430px, calc(100vw - 24px));
  background: #fff;
  border-radius: 26px;
  padding: 56px 24px 28px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0,0,0,0.24);
  animation: downloadDialogIn 0.25s ease-out;
}
.app-download-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-download-close svg {
  width: 24px;
  height: 24px;
}
.download-dialog-icon {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  margin: 0 auto 30px;
}
.download-dialog-title {
  color: #050505;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 18px;
}
.download-dialog-subtitle {
  color: #777;
  font-size: 17px;
  line-height: 1.45;
  margin-bottom: 34px;
}
.download-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.download-dialog-cancel,
.download-dialog-confirm {
  min-width: 0;
  min-height: 56px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.download-dialog-cancel {
  border: 1px solid #E1E1E1;
  background: #fff;
  color: #1A1A1A;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.download-dialog-confirm {
  border: none;
  background: linear-gradient(90deg, #10B8ED 0%, #1677FF 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22,119,255,0.26);
}
.download-dialog-confirm svg {
  width: 22px;
  height: 22px;
}
.download-dialog-cancel:active,
.download-dialog-confirm:active {
  transform: scale(0.98);
}
@keyframes downloadDialogIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.first-claim-modal {
  align-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.62);
  z-index: 260;
}
.first-claim-card {
  width: min(340px, calc(100vw - 30px));
  max-width: 340px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  padding: 0 16px 22px;
  text-align: center;
  animation: claimPopIn 0.24s ease-out;
  touch-action: auto;
  box-shadow: 0 18px 45px rgba(0,0,0,0.28);
}
.first-claim-hero {
  height: 128px;
  margin: 0 -16px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0 15px, transparent 15px 30px),
    linear-gradient(135deg, #FFAA18 0%, #FF8A00 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.first-claim-gift {
  width: 45px;
  height: 45px;
  margin-top: 4px;
}
.first-claim-gift svg {
  display: block;
  width: 100%;
  height: 100%;
}
.first-claim-title {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  margin-top: 8px;
  text-shadow: 0 2px 8px rgba(190,80,0,0.18);
}
.first-claim-body {
  position: relative;
  margin-top: -20px;
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px 0;
}
.first-claim-bonus {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: #FF9500;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  margin: 4px 0 18px;
}
.first-claim-bonus span {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}
.first-claim-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  background: #FAFAFA;
  border-radius: 12px;
  padding: 13px 12px;
  margin-bottom: 17px;
}
.first-claim-amount {
  min-width: 0;
  text-align: left;
}
.first-claim-amount.is-after {
  text-align: right;
}
.first-claim-amount span {
  display: block;
  color: #9A9A9A;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 3px;
}
.first-claim-amount strong {
  display: block;
  color: #333;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.first-claim-amount.is-after strong {
  color: #FF7900;
}
.first-claim-arrow {
  color: #CFCFCF;
  display: flex;
  align-items: center;
  justify-content: center;
}
.first-claim-arrow svg {
  width: 19px;
  height: 19px;
}
.first-claim-btn {
  width: 100%;
  min-height: 69px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(90deg, #FFB800 0%, #FF7600 100%);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 12px 24px rgba(255,128,0,0.22);
}
.first-claim-btn:active { transform: scale(0.98); }
.first-claim-btn:disabled {
  opacity: 0.65;
  box-shadow: none;
}
.first-claim-btn-text {
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}
.first-claim-btn-badge {
  min-width: 66px;
  height: 20px;
  padding: 0 10px;
  border-radius: 999px;
  background: #00C878;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.first-claim-btn-badge::before {
  content: '⚡';
  font-size: 11px;
  line-height: 1;
}
.first-claim-btn.is-loading .first-claim-btn-badge {
  display: none;
}
@keyframes claimPopIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-handle {
  width: 48px; height: 5px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto 20px;
  cursor: grab;
  touch-action: none;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}
.modal-subtitle {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 24px;
}
.order-amount-display {
  text-align: center;
  margin-bottom: 24px;
}
.order-amount-display .label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.order-amount-display .amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}
.order-amount-display .amount .yuan {
  font-size: 20px;
  font-weight: 600;
  margin-right: 2px;
}
.order-detail {
  background: var(--bg);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 20px;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 13px;
}
.order-row + .order-row {
  border-top: 1px solid #E8E8E8;
}
.order-row .label { color: var(--text-3); }
.order-row .value { color: var(--text); font-weight: 600; text-align: right; }
.pay-method {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.pay-method-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #1677FF, #0958D9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}
.pay-method-info { flex: 1; }
.pay-method-name { font-size: 14px; font-weight: 600; }
.pay-method-desc { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.pay-method-radio {
  width: 20px; height: 20px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: relative;
}
.pay-method-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}
.modal-actions {
  display: grid;
  grid-template-columns: minmax(112px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 2;
}
.cancel-pay-btn,
.confirm-pay-btn {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  touch-action: manipulation;
  white-space: nowrap;
}
.cancel-pay-btn {
  background: var(--bg);
  color: var(--text);
}
.confirm-pay-btn {
  background: linear-gradient(135deg, #1677FF, #0958D9);
  color: #fff;
  box-shadow: 0 8px 20px rgba(22,119,255,0.35);
}
.cancel-pay-btn:active,
.confirm-pay-btn:active { transform: scale(0.98); }
.confirm-pay-btn:disabled { opacity: 0.6; }
/* ===== 支付成功页 — 修复:去掉 display:flex，由 .view.success-view.active 控制 ===== */
.success-view {
  min-height: 100vh;
  background: linear-gradient(180deg, #fff 0%, #F2F4F7 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
}
.success-icon {
  width: 88px; height: 88px;
  background: linear-gradient(135deg, #00B96B, #00945D);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  animation: popIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.success-icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid #00B96B;
  border-radius: 50%;
  opacity: 0.3;
  animation: ripple 1.5s ease-out infinite;
}
.success-icon::after {
  content: '';
  position: absolute;
  inset: -16px;
  border: 2px solid #00B96B;
  border-radius: 50%;
  opacity: 0.15;
  animation: ripple 1.5s ease-out 0.4s infinite;
}
@keyframes popIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes ripple {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}
.success-icon svg { width: 44px; height: 44px; color: #fff; }
.fail-icon {
  background: linear-gradient(135deg, #FF4D4F, #CF1322);
}
.fail-icon::before {
  border-color: #FF4D4F;
}
.fail-icon::after {
  border-color: #FF4D4F;
}
.success-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.success-desc {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.success-info {
  background: #fff;
  border-radius: 16px;
  padding: 6px 18px;
  width: 100%;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}
.success-info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 13px;
  align-items: center;
}
.success-info-row + .success-info-row {
  border-top: 1px solid var(--border);
}
.success-info-row .label { color: var(--text-3); }
.success-info-row .value { font-weight: 600; text-align: right; }
.success-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}
.btn-secondary {
  flex: 1;
  height: 48px;
  background: var(--bg);
  color: var(--text);
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn-primary {
  flex: 1;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(22,119,255,0.3);
}
/* ===== 配置面板 ===== */
.config-fab {
  position: fixed;
  top: 12px; right: 16px;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  color: #fff;
  transition: all 0.2s;
}
.config-fab:active { transform: scale(0.92); }
.config-fab svg { width: 18px; height: 18px; }
.config-fab.spin svg { animation: spin 1s; }
@keyframes spin { to { transform: rotate(360deg); } }
.config-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.config-panel.active { display: flex; animation: fadeInBg 0.25s; }
.config-content {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  max-height: 88vh;
  overflow-y: auto;
  animation: slideUp 0.3s;
}
.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.config-title {
  font-size: 18px;
  font-weight: 700;
}
.config-close {
  background: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-2);
}
.config-tip {
  background: linear-gradient(135deg, #E6F4FF, #F0F8FF);
  border: 1px solid #BAE0FF;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--primary-dark);
  margin: 12px 0 20px;
  line-height: 1.6;
}
.config-group {
  margin-bottom: 14px;
}
.config-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.config-label .required { color: var(--danger); }
.config-input {
  width: 100%;
  height: 44px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.config-input:focus { border-color: var(--primary); background: #fff; }
.config-textarea {
  width: 100%;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  font-family: 'Manrope', monospace;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.config-textarea:focus { border-color: var(--primary); background: #fff; }
.config-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.config-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.config-actions button {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.config-actions button:active { transform: scale(0.97); }
.config-actions .btn-reset {
  background: var(--bg);
  color: var(--text);
}
.config-actions .btn-save {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 16px rgba(22,119,255,0.3);
}
/* Toast */
.toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(20px);
  color: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  white-space: nowrap;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; }
.claim-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 8px));
  min-width: 218px;
  max-width: calc(100vw - 32px);
  min-height: 58px;
  background: rgba(17,17,17,0.96);
  color: #fff;
  border-radius: 9px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  white-space: nowrap;
}
.claim-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.claim-toast-icon {
  font-size: 18px;
  line-height: 1;
}
/* Loading */
.loading-mask {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.loading-mask.active { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(22,119,255,0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@supports (padding: env(safe-area-inset-top)) {
  .status-bar {
    height: calc(44px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
}
@media (max-width: 430px) {
  .app-download-section {
    padding: 12px 12px 0;
  }
  .download-card {
    grid-template-columns: 56px minmax(0, 1fr) 104px;
    padding: 18px 16px;
    border-radius: 20px;
    gap: 12px;
  }
  .download-app-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }
  .download-card-title {
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 5px;
  }
  .download-card-desc {
    font-size: 11px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .download-card-btn {
    min-width: 0;
    width: 104px;
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    gap: 6px;
  }
  .download-card-btn svg {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 360px) {
  .login-title { font-size: 24px; }
  .app-download-section {
    padding: 12px 8px 0;
  }
  .download-card {
    grid-template-columns: 48px minmax(0, 1fr) 92px;
    padding: 14px 12px;
    border-radius: 20px;
    gap: 8px;
  }
  .download-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }
  .download-card-btn {
    width: 92px;
    height: 40px;
    padding: 0 8px;
    font-size: 13px;
    gap: 5px;
  }
  .download-card-btn svg {
    width: 16px;
    height: 16px;
  }
  .download-card-title {
    font-size: 14px;
    margin-bottom: 4px;
  }
  .download-card-desc {
    font-size: 10px;
    line-height: 1.4;
  }
  .download-dialog-title {
    font-size: 24px;
  }
  .download-dialog-actions {
    gap: 10px;
  }
  .download-dialog-cancel,
  .download-dialog-confirm {
    min-height: 50px;
    font-size: 15px;
  }
}
