/* ==========================================================================
 * vip.css — 钻石中心弹窗（余额 + 每日任务 + 钻石能解锁什么）
 * 打开入口：顶部账号区的钻石余额（.uchip__dia）
 * 内容全部来自后台「运营 → 每日任务」，任务数量可变：
 *   · 余额卡：一眼看到现在有多少钻石、几项可以领
 *   · 解锁项：auto-fill 自动分列，项少也不拉伸
 *   · 任务列表：单列纵向，进度条 + 奖励 + 领取按钮
 * 桌面居中弹窗，≤560px 变整屏。
 * ========================================================================== */
.vip {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.vip.is-on { display: flex; }
.vip__mask {
  position: absolute; inset: 0;
  background: rgba(4, 4, 7, .76);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.vip__box {
  position: relative; display: flex; flex-direction: column;
  width: min(760px, 100%); max-height: min(92vh, 940px);
  background: linear-gradient(180deg, #131317, #0B0B0D);
  border: 1px solid #26262E; border-radius: 22px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .68);
  overflow: hidden;
  animation: vipIn .22s ease;
}
@keyframes vipIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- 头部 ---------- */
.vip__hd {
  position: relative; flex: none;
  display: flex; align-items: center; justify-content: center;
  padding: 17px 56px; border-bottom: 1px solid #1E1E26;
}
.vip__title {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: #fff;
}
.vip__title svg { width: 22px; height: 22px; color: #F5C544; }
.vip__close {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: #8E8E98;
  cursor: pointer; transition: color .16s, background .16s;
}
.vip__close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.vip__close svg { width: 19px; height: 19px; }

/* ---------- 内容区（内部滚动） ---------- */
.vip__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 22px 18px; }
.vip__body::-webkit-scrollbar { width: 8px; }
.vip__body::-webkit-scrollbar-thumb { background: #2C2E36; border-radius: 99px; }

/* 顶部提示条 */
.vip__note {
  margin: 0 0 12px; padding: 9px 18px;
  border-radius: 999px; text-align: center;
  font-size: 13px; color: #F0BDE8;
  background: linear-gradient(90deg, rgba(120, 38, 96, .55), rgba(78, 28, 66, .38));
  border: 1px solid rgba(224, 69, 155, .28);
}
.vip__note:empty { display: none; }

/* ---------- 余额卡 ---------- */
.vip__bal {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-bottom: 16px; padding: 16px 20px 15px;
  border-radius: 16px;
  background: linear-gradient(135deg, #241426 0%, #170F1B 100%);
  border: 1px solid #33222F;
}
.vip__balLbl { font-size: 12.5px; color: #A79FAE; letter-spacing: .02em; }
.vip__balVal {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 40px; font-weight: 900; line-height: 1.05; color: #fff;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.vip__balVal svg { width: 30px; height: 30px; color: #F5C544; fill: #F5C544; stroke: #F5C544; }
.vip__balTip {
  margin-top: 4px; padding: 3px 12px; border-radius: 999px;
  font-style: normal; font-size: 11.5px; font-weight: 700; color: #1B0E10;
  background: #F5C544;
}

/* ---------- 区块 ---------- */
.vip__sec { margin-bottom: 18px; }
.vip__sec:last-of-type { margin-bottom: 0; }
.vip__h { font-size: 16px; font-weight: 800; color: #fff; margin: 0 0 10px; }
.vip__sechd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vip__reset { font-size: 12px; color: #7E7E88; }
.vip__all { font-size: 12.5px; color: #8A8A94; }

/* ---------- 用钻石解锁 ---------- */
.vip__unlocks {
  display: grid; gap: 9px 12px;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
}
.vip__unlocks:empty { display: none; }
.vunlock {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 13px; text-align: left;
  border: 1px solid #2A2A33; border-radius: 13px;
  background: #141419; color: #fff; cursor: pointer;
  font: inherit;
  transition: border-color .16s, background .16s;
}
.vunlock:hover { border-color: #3D3D49; background: #17171D; }
.vunlock__ic {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(224, 69, 155, .22), rgba(138, 75, 255, .18));
  color: #F067C0;
}
.vunlock__ic svg { width: 19px; height: 19px; }
.vunlock__tx { min-width: 0; flex: 1 1 auto; display: block; }
.vunlock__tx b { display: block; font-size: 14px; font-weight: 700; color: #fff; }
.vunlock__tx i {
  display: block; margin-top: 2px;
  font-style: normal; font-size: 12px; color: #9696A2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vunlock__price {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-size: 13.5px; font-weight: 800; color: #F5C544;
  font-variant-numeric: tabular-nums;
}
.vunlock__price svg { width: 13px; height: 13px; color: #F5C544; fill: #F5C544; stroke: #F5C544; }
.vunlock__ok {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 700; color: #3FBF6A;
}
.vunlock__ok svg { width: 14px; height: 14px; }
.vunlock__go { flex: none; display: grid; place-items: center; color: #6E6E78; }
.vunlock__go svg { width: 16px; height: 16px; }
.vunlock.is-done { border-color: rgba(63, 191, 106, .34); background: rgba(63, 191, 106, .07); }
.vunlock.is-done .vunlock__ic { background: rgba(63, 191, 106, .18); color: #3FBF6A; }

/* ---------- 每日任务 ---------- */
.vip__tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vip__tasks:empty { display: none; }
.vt {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border: 1px solid #26262E; border-radius: 13px;
  background: #111116;
}
.vt.is-ready { border-color: rgba(245, 197, 68, .42); background: rgba(245, 197, 68, .06); }
.vt.is-done { opacity: .5; }
.vt__ic {
  width: 36px; height: 36px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: #1B1B22; color: #C9C9D4;
}
.vt__ic svg { width: 18px; height: 18px; }
.vt.is-ready .vt__ic { background: rgba(245, 197, 68, .16); color: #F5C544; }
.vt__bd { flex: 1 1 auto; min-width: 0; }
.vt__bd b { display: block; font-size: 13.5px; font-weight: 700; color: #fff; }
.vt__bd i {
  display: block; margin-top: 1px;
  font-style: normal; font-size: 11.5px; color: #8A8A94;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vt__bar {
  display: block; margin-top: 6px; height: 4px; border-radius: 99px;
  background: #26262E; overflow: hidden;
}
.vt__bar u {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #F5C544, #F067C0);
  transition: width .3s ease;
}
.vt.is-done .vt__bar u { background: #3FBF6A; }
.vt__pg {
  display: block; margin-top: 3px;
  font-size: 10.5px; font-weight: 700; color: #7E7E88;
  font-variant-numeric: tabular-nums;
}
.vt__rw {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-size: 13.5px; font-weight: 800; color: #F5C544;
  font-variant-numeric: tabular-nums;
}
.vt__rw svg { width: 13px; height: 13px; color: #F5C544; fill: #F5C544; stroke: #F5C544; }
.vt__btn {
  flex: none; min-width: 62px; height: 32px; padding: 0 13px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; font-family: inherit;
  background: #24242C; color: #7E7E88; cursor: default;
}
.vt__btn.is-ready {
  background: linear-gradient(90deg, #F5C544, #F0A93B);
  color: #1B0E10; cursor: pointer;
  box-shadow: 0 4px 14px rgba(245, 197, 68, .28);
}
.vt__btn.is-ready:hover { filter: brightness(1.07); }
.vt__btn.is-done { background: rgba(63, 191, 106, .14); color: #3FBF6A; }

/* 弹窗打开时锁住页面滚动 */
html.vip-open, html.vip-open body { overflow: hidden; }

/* ---------- 移动端：整屏 ---------- */
@media (max-width: 560px) {
  .vip { padding: 0; }
  .vip__box { width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; }
  .vip__hd { padding: 15px 52px; }
  .vip__title { font-size: 18px; }
  .vip__body { padding: 14px 14px 22px; }
  .vip__note { font-size: 12.5px; padding: 9px 14px; }
  .vip__bal { padding: 14px 16px 13px; }
  .vip__balVal { font-size: 34px; }
  .vip__balVal svg { width: 26px; height: 26px; }
  .vip__unlocks { grid-template-columns: 1fr; }
  .vip__h { font-size: 15px; }
  .vt { gap: 9px; padding: 10px 11px; }
  .vt__ic { width: 32px; height: 32px; border-radius: 9px; }
  .vt__ic svg { width: 16px; height: 16px; }
  .vt__bd b { font-size: 13px; }
  .vt__bd i { font-size: 11px; }
  .vt__rw { font-size: 12.5px; }
  .vt__btn { min-width: 56px; height: 30px; padding: 0 10px; font-size: 12px; }
}
/* 矮屏：压缩纵向留白 */
@media (max-height: 700px) {
  .vip__bal { padding: 12px 18px 11px; margin-bottom: 12px; }
  .vip__balVal { font-size: 32px; }
  .vip__sec { margin-bottom: 14px; }
}
