/* ============ 打赏前台样式 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #333;
  background: #f0f4f8;
  min-height: 100vh;
}

/* 页面背景 */
.page-bg { position: fixed; inset: 0; z-index: 0; background: linear-gradient(135deg, #2b8ef4, #56ccf2); }
.bg-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-mask { position: absolute; inset: 0; background: rgba(20, 40, 70, 0.45); }

/* 主卡片 */
.card {
  position: relative; z-index: 1;
  max-width: 560px; margin: 24px auto;
  background: #fff; border-radius: 16px;
  box-shadow: 0 12px 40px rgba(20, 50, 90, 0.18);
  overflow: hidden;
}

/* 横幅与作者区 */
.banner { position: relative; height: 210px; background: linear-gradient(135deg, #2b8ef4, #56ccf2); }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-mask { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,40,70,0.1), rgba(20,40,70,0.55)); }
.author {
  position: absolute; left: 0; right: 0; bottom: 18px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
}
.avatar {
  width: 68px; height: 68px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(255,255,255,0.9);
  background: #fff;
}
.avatar-text {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff9a62, #ff6a5e);
}
.author-info { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.3); min-width: 0; }
.nickname { font-size: 22px; font-weight: 700; }
.subtitle { font-size: 13px; opacity: 0.92; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 文案 */
.desc { padding: 18px 24px 4px; font-size: 15px; line-height: 1.8; color: #555; white-space: pre-line; }

/* 统计 */
.stats {
  display: flex; justify-content: center; gap: 40px;
  padding: 14px 24px 6px;
}
.stat-item { text-align: center; }
.stat-item .num { display: block; font-size: 22px; font-weight: 700; color: #2b8ef4; }
.stat-item .lbl { font-size: 12px; color: #999; margin-top: 2px; }

/* 区块 */
.section { padding: 14px 24px 6px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }

/* 金额按钮 */
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amount-btn {
  padding: 14px 6px; border: 1.5px solid #dde6ee; border-radius: 10px;
  background: #f8fafc; font-size: 15px; font-weight: 600; color: #444;
  cursor: pointer; transition: all 0.15s;
}
.amount-btn:hover { border-color: #2b8ef4; color: #2b8ef4; }
.amount-btn.active { border-color: #2b8ef4; background: #eaf4fe; color: #2b8ef4; }
.amount-custom { font-weight: 500; color: #888; }

/* 自定义金额 */
.custom-box { margin-top: 10px; }
.custom-box input {
  width: 100%; padding: 12px 14px; border: 1.5px solid #dde6ee; border-radius: 10px;
  font-size: 15px; outline: none;
}
.custom-box input:focus { border-color: #2b8ef4; }

/* 支付方式 */
.pay-type { display: flex; gap: 10px; margin-top: 14px; }
.pay-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 6px; border: 1.5px solid #dde6ee; border-radius: 10px;
  background: #fff; font-size: 14px; font-weight: 600; color: #444;
  cursor: pointer; transition: all 0.15s;
}
.pay-btn.active { border-color: #2b8ef4; box-shadow: 0 0 0 2px rgba(43,142,244,0.15); }
.pay-icon { display: inline-flex; }

/* 留言框 */
.remark {
  width: 100%; margin-top: 14px; padding: 12px 14px;
  border: 1.5px solid #dde6ee; border-radius: 10px;
  font-size: 14px; outline: none;
}
.remark:focus { border-color: #2b8ef4; }

/* 打赏按钮 */
.pay-submit {
  width: 100%; margin-top: 14px; padding: 14px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg, #2b8ef4, #56ccf2);
  color: #fff; font-size: 17px; font-weight: 700; letter-spacing: 2px;
  cursor: pointer; transition: opacity 0.15s;
}
.pay-submit:hover { opacity: 0.9; }
.pay-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.pay-tip { text-align: center; font-size: 12px; color: #aaa; margin: 10px 0 16px; }

/* 打赏记录 */
.record-list { list-style: none; }
.record-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px dashed #eef2f6;
}
.record-name { font-weight: 600; font-size: 14px; }
.record-amt { font-size: 13px; color: #e67e22; }
.record-time { margin-left: auto; font-size: 12px; color: #aaa; }
.empty-tip { color: #aaa; font-size: 13px; text-align: center; padding: 12px 0; }

/* 页脚 */
.footer { padding: 10px 24px 20px; text-align: center; font-size: 12px; color: #aaa; white-space: pre-line; }

/* ============ 支付结果页 ============ */
.result-card { padding: 40px 28px; text-align: center; }
.result-icon {
  width: 72px; height: 72px; margin: 0 auto 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 700; color: #fff;
}
.result-icon.ok { background: linear-gradient(135deg, #2ed573, #7bed9f); }
.result-icon.fail { background: linear-gradient(135deg, #ff6a5e, #ff9a62); }
.result-title { font-size: 22px; margin-bottom: 8px; }
.result-sub { color: #888; font-size: 14px; margin-bottom: 20px; }
.result-info { list-style: none; text-align: left; margin: 0 auto 24px; max-width: 320px; }
.result-info li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px dashed #eef2f6; font-size: 14px;
}
.result-info li span { color: #888; }
.result-info li b { font-weight: 600; }
.btn-back {
  display: inline-block; padding: 12px 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2b8ef4, #56ccf2); color: #fff;
  text-decoration: none; font-size: 15px; font-weight: 600;
}

/* ============ 二维码页 ============ */
.qr-card { padding: 36px 28px; text-align: center; }
.qr-box { width: 280px; height: 280px; margin: 0 auto 18px; border: 6px solid #eef2f6; border-radius: 16px; overflow: hidden; }
.qr-box img { width: 100%; height: 100%; display: block; }
.qr-title { font-size: 18px; }
.qr-sub { color: #666; margin: 8px 0; }
.qr-sub b { color: #e67e22; }

/* 工具类 */
.hidden { display: none !important; }

/* 移动端 */
@media (max-width: 600px) {
  .card { margin: 12px; border-radius: 14px; }
  .banner { height: 170px; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .amount-btn { padding: 13px 4px; font-size: 14px; }
  .section { padding: 12px 18px 4px; }
  .desc { padding: 14px 18px 2px; font-size: 14px; }
  .author { padding: 0 18px; }
  .avatar { width: 60px; height: 60px; }
  .nickname { font-size: 20px; }
  .pay-btn { font-size: 13px; padding: 11px 4px; gap: 5px; }
  .pay-submit { padding: 13px; font-size: 16px; }
  .stats { gap: 28px; }
  .stat-item .num { font-size: 20px; }
  .record-list li { padding: 9px 2px; }
  .record-time { font-size: 11px; }
}

/* 超窄屏（如 320px）额外收紧 */
@media (max-width: 380px) {
  .card { margin: 8px; }
  .amount-btn { font-size: 13px; padding: 12px 2px; }
  .record-amt { font-size: 12px; }
  .record-time { display: none; }
}
