/* ============================================================
   乐手币充值 / 账单页样式
   风格:沿用 t8 站 ys-* 前缀 + #1E9FFF 主色 + mobile-first
   ============================================================ */

/* ===== Hero (余额卡) ===== */
.ys-coin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1E9FFF 0%, #2BB4FF 60%, #5BC8FF 100%);
  color: #fff;
  padding: 22px 20px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(30, 159, 255, 0.18);
}
.ys-coin-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ys-coin-icon {
  width: 52px;
  height: 52px;
  line-height: 52px;
  text-align: center;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  font-style: normal;
}
.ys-coin-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 4px;
}
.ys-coin-num {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.ys-coin-hero .ys-btn-ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.ys-coin-hero .ys-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* ===== Section 标题 ===== */
.ys-coin-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 3px solid #1E9FFF;
  line-height: 1.2;
}
.ys-coin-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 12px 0 0;
}

/* ===== 套餐网格 ===== */
.ys-coin-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.ys-coin-plan {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  user-select: none;
}
.ys-coin-plan:hover {
  border-color: #b3dffe;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(30, 159, 255, 0.08);
}
.ys-coin-plan.active {
  border-color: #1E9FFF;
  background: #f0f7ff;
  box-shadow: 0 4px 14px rgba(30, 159, 255, 0.16);
}
.ys-coin-plan.active::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background: #1E9FFF;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.ys-coin-plan-name {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}
.ys-coin-plan-coin {
  font-size: 22px;
  font-weight: 700;
  color: #1E9FFF;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ys-coin-plan-unit {
  font-size: 12px;
  font-weight: 500;
  color: #1E9FFF;
}
.ys-coin-plan-give {
  font-size: 12px;
  color: #ef4444;
  background: #fef2f2;
  border-radius: 10px;
  padding: 1px 8px;
  display: inline-block;
  margin: 4px 0 6px;
}
.ys-coin-plan-price {
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
  margin-top: 6px;
}

/* ===== 自定义金额 (预留,默认隐藏) ===== */
.ys-coin-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ys-coin-custom-prefix {
  font-size: 22px;
  color: #1f2937;
  font-weight: 600;
}
.ys-coin-custom-input {
  flex: 1;
  height: 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
}
.ys-coin-custom-input:focus {
  border-color: #1E9FFF;
}

/* ===== 支付方式 ===== */
.ys-coin-pay-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ys-coin-pay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}
.ys-coin-pay-item.active {
  border-color: #1E9FFF;
  background: #f0f7ff;
}
.ys-coin-pay-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.ys-coin-pay-item.active .ys-coin-pay-radio {
  border-color: #1E9FFF;
}
.ys-coin-pay-item.active .ys-coin-pay-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #1E9FFF;
  border-radius: 50%;
}
.ys-coin-pay-icon {
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ys-coin-pay-wechat { background: #07c160; }
.ys-coin-pay-alipay { background: #1677ff; }
.ys-coin-pay-name {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
}
.ys-coin-pay-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-left: auto;
}

/* ===== 微信二维码区 ===== */
.ys-qrcode-box {
  text-align: center;
  padding: 8px 0 4px;
}
.ys-qrcode-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 14px;
}
#qrcode-img {
  display: inline-block;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 12px;
}
#qrcode-img img,
#qrcode-img canvas {
  display: block;
  margin: 0 auto;
}
.ys-qrcode-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 4px 0;
}

/* ===== 支付按钮 ===== */
.ys-coin-pay-action {
  margin: 24px 0 40px;
  padding: 0 4px;
}
.ys-coin-pay-action .ys-btn-lg {
  height: 48px;
  font-size: 16px;
  font-weight: 600;
}
.ys-coin-pay-action .ys-btn-block {
  width: 100%;
}

/* ===== 余额条 (账单页) ===== */
.ys-coin-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1E9FFF 0%, #2BB4FF 100%);
  color: #fff;
  padding: 18px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.ys-coin-balance-bar .ys-coin-num {
  margin-top: 4px;
}

/* ===== 流水列表 ===== */
.ys-coin-tx-list {
  display: flex;
  flex-direction: column;
}
.ys-coin-tx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.ys-coin-tx:last-child {
  border-bottom: none;
}
.ys-coin-tx-main {
  flex: 1;
  min-width: 0;
}
.ys-coin-tx-type {
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
  margin-bottom: 4px;
}
.ys-coin-tx-sub {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.ys-coin-tx-time {
  font-size: 12px;
  color: #94a3b8;
}
/* 分类 / 实付 小标签 */
.ys-coin-tx-cat {
  display: inline-block;
  font-size: 11px;
  color: #1E9FFF;
  background: #e8f4ff;
  border-radius: 8px;
  padding: 1px 8px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
  white-space: nowrap;
}
.ys-coin-tx-amount {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.ys-coin-tx-amount.in {
  color: #10b981;
}
.ys-coin-tx-amount.out {
  color: #ef4444;
}
.ys-coin-tx-after {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

/* ===== 空状态 ===== */
.ys-empty {
  text-align: center;
  padding: 40px 16px;
  color: #94a3b8;
  font-size: 14px;
}

/* ===== 支付成功弹窗 ===== */
.ys-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ys-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 360px;
  width: 100%;
  padding: 32px 24px 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  animation: ys-modal-pop 0.22s ease-out;
}
@keyframes ys-modal-pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.ys-modal-success {
  width: 100%;
  max-width: 360px;
  padding: 32px 24px 24px;
}
.ys-modal-success-icon {
  width: 64px;
  height: 64px;
  line-height: 64px;
  text-align: center;
  background: #10b981;
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto 16px;
}
.ys-modal-card h3,
.ys-modal h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: #1f2937;
}
.ys-modal-card p,
.ys-modal p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
}
.ys-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.ys-modal-actions .ys-btn {
  flex: 1;
  min-width: 100px;
}

/* ===== 二维码支付弹窗 (PC 端体验) =====
   注意: 内层卡片用 .ys-modal-card (不挂 .ys-modal)
   原因: index.css 里 .ys-modal 是全屏遮罩样式 (display:flex + position:fixed)
         coins.css 里 .ys-modal 是卡片样式, 跟 index.css 撞 class 名
         挂两个 class 会让 index.css 的遮罩样式压过来, 内层卡片变成全屏 flex 容器
         → 子元素被压扁, 文字竖排. 用 .ys-modal-card 命名空间彻底脱钩
*/
.ys-modal-card {
  background: #fff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  animation: ys-modal-pop 0.22s ease-out;
  position: relative;
}
.ys-modal-qrcode {
  width: 100%;
  max-width: 340px;
  padding: 28px 24px 22px;
}
.ys-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  font-size: 24px;
  font-weight: 300;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.15s;
  user-select: none;
}
.ys-modal-close:hover {
  background: #f1f5f9;
  color: #1f2937;
}
.ys-modal-qrcode-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ys-modal-qrcode-title::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: #07c160;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
  background-image: linear-gradient(135deg, #07c160, #00b86a);
}
.ys-modal-qrcode-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: #94a3b8;
  text-align: center;
}
.ys-modal-qrcode-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 220px;
  margin: 0 auto 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.ys-modal-qrcode-img img,
.ys-modal-qrcode-img canvas {
  display: block;
  width: 200px;
  height: 200px;
}
.ys-modal-qrcode-amount {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}
.ys-modal-qrcode-amount #qrcode-amount {
  font-size: 22px;
  font-weight: 700;
  color: #ef4444;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.ys-modal-qrcode-no {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 12px;
  word-break: break-all;
  padding: 0 8px;
}
.ys-modal-qrcode-hint {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 16px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
}
/* 弹窗打开时锁滚动 (避免背景跟着滚) */
body.ys-no-scroll {
  overflow: hidden;
}

/* ===== 响应式:窄屏 =====
   主要是 hero 在很窄的屏幕需要垂直堆叠, 套餐网格自适应 2 列 */
@media (max-width: 480px) {
  .ys-coin-plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ys-coin-plan-coin {
    font-size: 20px;
  }
  .ys-coin-num {
    font-size: 26px;
  }
  .ys-coin-hero {
    padding: 18px 16px;
  }
}

/* ===== 充值结果页 (/recharge/result) =====
   支付平台 (支付宝/微信) 同步跳转回来后展示订单状态
   状态: loading / success / fail / timeout / notfound */
.ys-coin-result-panel {
  max-width: 560px;
  margin: 24px auto;
  padding: 36px 28px;
  text-align: center;
}
.ys-coin-result-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.ys-coin-result-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.ys-coin-result-loading .ys-coin-result-icon {
  background: #f0f4f8;
}
.ys-coin-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #d8e6f5;
  border-top-color: #1E9FFF;
  border-radius: 50%;
  animation: ys-coin-spin 0.9s linear infinite;
}
@keyframes ys-coin-spin {
  to { transform: rotate(360deg); }
}
.ys-coin-result-success .ys-coin-result-icon {
  background: linear-gradient(135deg, #1E9FFF 0%, #2BB4FF 100%);
}
.ys-coin-result-check {
  font-size: 42px;
  line-height: 1;
  color: #fff;
}
.ys-coin-result-fail .ys-coin-result-icon,
.ys-coin-result-notfound .ys-coin-result-icon {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
}
.ys-coin-result-cross {
  font-size: 42px;
  line-height: 1;
  color: #fff;
  font-style: italic;
  font-family: Georgia, serif;
}
.ys-coin-result-timeout .ys-coin-result-icon {
  background: linear-gradient(135deg, #f6b73c 0%, #f6a73c 100%);
}
.ys-coin-result-question {
  font-size: 42px;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}
.ys-coin-result-title {
  font-size: 24px;
  font-weight: 600;
  color: #222;
  margin: 0;
}
.ys-coin-result-sub {
  font-size: 14px;
  color: #888;
  margin: 0;
}
.ys-coin-result-detail {
  margin: 24px auto 28px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f5fafe 0%, #eaf4ff 100%);
  border-radius: 12px;
  max-width: 420px;
}
.ys-coin-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #555;
}
.ys-coin-result-row + .ys-coin-result-row {
  border-top: 1px dashed #cfe2f5;
}
.ys-coin-result-label {
  color: #888;
}
.ys-coin-result-value {
  color: #222;
  font-weight: 500;
}
.ys-coin-result-row-coin .ys-coin-result-value {
  font-weight: 700;
  color: #1E9FFF;
}
.ys-coin-result-coin-num {
  font-size: 22px;
  font-weight: 700;
}
.ys-coin-result-unit {
  font-size: 13px;
  color: #888;
  font-weight: 400;
  margin-left: 4px;
}
.ys-coin-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
