/* 余额不足弹窗 —— H5 与 PC 共用。
   独立成文件而不是写进 style.css：PC 版不加载 style.css，写那边 PC 弹窗会完全没样式。
   每个元素显式写全样式，不依赖任何一端的 reset 与继承。 */
.bm-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bm-fade .16s ease-out;
}
.bm-card {
  box-sizing: border-box;
  width: min(280px, calc(100vw - 56px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  /* 底部补安全区，刘海屏不压 Home 指示条 */
  padding: 20px 16px calc(10px + env(safe-area-inset-bottom));
  text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  animation: bm-pop .2s cubic-bezier(.22, 1, .36, 1);
}
.bm-badge {
  width: 50px;
  height: 50px;
  margin: 0 auto;
  border-radius: 50%;
  background: #fff2ee;
  color: #e04e2e;
  font-size: 23px;
  font-weight: 700;
  line-height: 50px;
}
.bm-title {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
}
.bm-detail {
  margin-top: 6px;
  font-size: 12px;
  color: #9a9a9f;
  line-height: 1.65;
  /* 金额位数变化时不左右抖动 */
  font-variant-numeric: tabular-nums;
}
.bm-need {
  margin-top: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #fff8f6;
  font-size: 12px;
  color: #e04e2e;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bm-go {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #e04e2e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.bm-go:active { background: #c8431f; }
.bm-later {
  display: block;
  width: 100%;
  padding: 12px 0 6px;
  border: none;
  background: none;
  color: #b0b0b5;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
/* 退场：close() 加 .bm-out 后等 150ms 摘节点，时长要和 JS 里的 setTimeout 一致 */
.bm-mask.bm-out { animation: bm-fade-out .15s ease-in forwards; }
.bm-mask.bm-out .bm-card { animation: bm-pop-out .15s ease-in forwards; }
@keyframes bm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bm-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bm-fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bm-pop-out { from { transform: scale(1); opacity: 1; } to { transform: scale(.96); opacity: 0; } }

/* ==== 通用弹窗（.m-*）：my.php 改昵称/改密码，H5 与 PC 共用 ==== */
.m-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.m-card {
  width: 100%; max-width: 400px;
  background: #fff; border-radius: 10px;
  overflow: hidden;
  animation: bm-pop .18s ease-out;
}
.m-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
}
.m-title { font-size: 16px; font-weight: bold; color: #333; }
.m-close {
  border: none; background: none; font-size: 22px; line-height: 1;
  color: #b0b0b5; cursor: pointer; padding: 0 4px;
}
.m-close:hover { color: #555; }
.m-body { padding: 16px; }
.m-body img { max-width: 100%; height: auto; }
.m-body input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid #ddd; border-radius: 6px;
  font-size: 14px; font-family: inherit; color: #333;
}
.m-body input:focus { outline: none; border-color: #e04e2e; }
.m-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 0 16px 16px;
}
.m-mask[hidden] { display: none; }

/* ==== 我的页：昵称/改密入口行（H5） ==== */
.profile-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; font-size: 14px; color: #555;
}
.profile-bar .btn.sm { padding: 5px 12px; font-size: 13px; }

/* ==== 已购视频折叠 ==== */
.fold-head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; box-sizing: border-box;
  padding: 13px 15px; margin-bottom: 10px;
  background: #fff; border: 1px solid #eee; border-radius: 8px;
  font-size: 15px; font-weight: bold; color: #333;
  font-family: inherit; cursor: pointer; text-align: left;
}
.fold-head:hover { border-color: #e04e2e; color: #e04e2e; }
.fold-arrow { transition: transform .2s; color: #999; }
.fold-head.open .fold-arrow { transform: rotate(180deg); }
.fold-body { margin-bottom: 10px; }
