/* ============================================================
   临风支付 · 网页版样式
   蓝少白多 · 简约液态玻璃（CSS 模拟 iOS 26 效果）
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #f4f6fa;
  --card: rgba(255,255,255,0.72);
  --brand: #408DFA;
  --brand-soft: rgba(64,141,250,0.10);
  --ink: #1a1a1a;
  --ink-soft: #8a8f98;
  --green: #21c268;
  --orange: #ff9500;
  --red: #ff3b30;
  --radius: 20px;
  --shadow: 0 8px 32px rgba(31,38,135,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-user-select: none; user-select: none;
}

/* ---------- 应用壳 ---------- */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ---------- 登录页 ---------- */
.auth-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; background: var(--card); border-radius: 28px; padding: 36px 28px;
  box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  text-align: center;
}
.logo { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.logo-l {
  font-size: 52px; font-weight: 900; color: #000; line-height: 0.8;
  transform: scale(1.1,1.25); display: inline-block; font-family: "Comic Sans MS", "Marker Felt", sans-serif;
}
.logo-pay { font-size: 20px; font-weight: 700; letter-spacing: 3px; color: #000; align-self: flex-end; margin-bottom: 6px; }
.auth-title { font-size: 26px; font-weight: 800; }
.auth-sub { font-size: 13px; color: var(--ink-soft); margin: 6px 0 22px; }
.auth-hint { margin-top: 20px; font-size: 12px; color: var(--ink-soft); }

.auth-form input {
  width: 100%; padding: 14px 16px; margin-bottom: 12px; border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.9);
  font-size: 16px; outline: none; transition: border .2s;
}
.auth-form input:focus { border-color: var(--brand); }

.btn {
  width: 100%; padding: 14px; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .12s, opacity .2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--brand); color: #fff; margin-bottom: 12px; }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-block { margin-top: 16px; }
.btn-danger { background: var(--red); color: #fff; margin-bottom: 12px; }

.msg { font-size: 13px; color: var(--red); min-height: 18px; margin-top: 8px; }

/* ---------- 底部导航（液态玻璃） ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; width: calc(100% - 24px); max-width: 456px;
  display: flex; background: var(--card); border-radius: 24px; padding: 8px;
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.7); z-index: 50;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; border-radius: 16px; color: var(--ink-soft); font-size: 11px; cursor: pointer;
  transition: background .2s, color .2s;
}
.tab .ti { font-size: 20px; }
.tab.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

/* ---------- 内容区 ---------- */
.content { padding: 20px 16px 110px; }

/* ---------- 通用组件 ---------- */
.glass {
  background: var(--card); border-radius: var(--radius);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,0.7);
}
.card { padding: 20px; }
.card + .card { margin-top: 16px; }

.row { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }

.balance-num { font-size: 44px; font-weight: 800; letter-spacing: -1px; }
.balance-label { font-size: 13px; color: var(--ink-soft); }
.section-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 6px;
  border-radius: 18px; cursor: pointer; background: var(--card); border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--shadow); font-size: 13px; font-weight: 500; transition: transform .12s;
}
.quick-btn:active { transform: scale(0.95); }
.quick-btn .q-icon { font-size: 26px; }

/* 交易列表 */
.tx-list { list-style: none; }
.tx-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.tx-item:last-child { border-bottom: none; }
.tx-left .tx-note { font-size: 14px; font-weight: 500; }
.tx-left .tx-time { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.tx-amount { font-size: 15px; font-weight: 700; }
.tx-amount.in { color: var(--green); }
.tx-amount.out { color: var(--red); }

/* 二维码区 */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-box {
  background: #fff; padding: 16px; border-radius: 16px; width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}
#qrTarget, #qrPay { width: 188px; height: 188px; }

.field { width: 100%; padding: 14px 16px; margin-bottom: 12px; border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.9); font-size: 16px; outline: none; }
.field:focus { border-color: var(--brand); }

.hint { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.ok-msg { color: var(--green); font-size: 14px; }
.err-msg { color: var(--red); font-size: 14px; }
.orange { color: var(--orange); }
.green { color: var(--green); }

/* 开关 */
.switch { position: relative; width: 48px; height: 28px; }
.switch input { display: none; }
.switch .slider { position: absolute; inset: 0; background: #d4d7de; border-radius: 28px; transition: .25s; }
.switch .slider::before { content: ""; position: absolute; width: 24px; height: 24px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: .25s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* 交易明细 / 成功页 */
.success-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 70vh; text-align: center; }
.success-icon { font-size: 84px; color: var(--green); margin-bottom: 12px; animation: pop .5s cubic-bezier(.2,.8,.4,1); }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.success-amount { font-size: 40px; font-weight: 800; }
.success-label { font-size: 14px; color: var(--ink-soft); margin-top: 10px; }

/* 扫码框 */
#scanBox { position: relative; width: 100%; max-width: 340px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: #000; }

/* 风险提示 */
.warn { text-align: center; padding: 40px 20px; }
.warn-icon { font-size: 64px; color: var(--orange); margin-bottom: 16px; }
.warn-url { color: var(--brand); word-break: break-all; font-size: 13px; margin: 12px 0 24px; }

/* 加载 */
#loading { position: fixed; inset: 0; background: rgba(244,246,250,0.6); z-index: 99; display: none; align-items: center; justify-content: center; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 遮罩层 ---------- */
.overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.overlay-mask { position: absolute; inset: 0; background: rgba(20,24,36,0.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.overlay-panel {
  position: relative; width: 100%; max-width: 480px; padding: 16px;
  background: var(--card); border-radius: 24px 24px 0 0;
  backdrop-filter: blur(28px) saturate(1.6); -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.7); box-shadow: 0 -10px 40px rgba(0,0,0,0.12);
  animation: slideUp .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: 46%; transform: translate(-50%,-50%); z-index: 300;
  background: rgba(20,24,36,0.85); color: #fff; padding: 12px 22px; border-radius: 14px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); max-width: 80%; text-align: center;
  animation: fadeIn .25s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
