/* ============================================================
   迭代四十：新用户引导 / 首登红包 / 新剧推荐 / 账户头像下拉
   原生 JS 无依赖；配色复用 skin.css 深色 token，自动跟随双主题。
   ============================================================ */

/* ============ 账户头像下拉（顶栏右上角整合） ============ */
.acctMenu { position: relative; display: inline-block; }
.acctTrigger {
  display: inline-flex; align-items: center; gap: 7px; max-width: 190px;
  height: 36px; padding: 0 9px 0 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); border-radius: 999px;
  cursor: pointer; font-size: 13.5px; transition: border-color .18s, background .18s; position: relative;
}
.acctTrigger:hover { border-color: var(--v, #4f8cff); }
.acctTrigger .acctAvatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #133ab3, #4f8cff);
}
.acctTrigger .acctAvatar img { width: 100%; height: 100%; object-fit: cover; }
.acctTrigger .acctName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.acctTrigger .acctCaret { width: 13px; height: 13px; flex: none; opacity: .7; transition: transform .2s; }
.acctMenu.open .acctCaret { transform: rotate(180deg); }
.acctPanel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 208px;
  background: var(--elev, #1c2d55); border: 1px solid var(--line);
  border-radius: 12px; padding: 7px; box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
  opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
  transition: opacity .18s, transform .18s, visibility .18s; z-index: 1200;
}
.acctMenu.open .acctPanel { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.acctPanel .acctHead { padding: 8px 11px 9px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acctPanel .acctHead .nm { font-weight: 700; font-size: 14px; color: var(--text); }
.acctPanel .acctHead .em { font-size: 12px; color: var(--text3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acctPanel a {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px;
  color: var(--text2); font-size: 13.5px; text-decoration: none; position: relative;
}
.acctPanel a:hover { background: var(--surface2, #18274a); color: var(--text); }
.acctPanel a.danger { color: #fb7185; }
.acctPanel a .acctMailDot {
  margin-left: auto; min-width: 17px; height: 17px; line-height: 17px; padding: 0 5px;
  background: #e23b3b; color: #fff; border-radius: 9px; font-size: 11px; text-align: center;
}
.acctTrigger .acctTaskPing {
  position: absolute; left: 27px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: #e23b3b; border: 2px solid var(--surface); box-sizing: content-box;
}
.acctPanel a .acctTaskDot { background: #e23b3b !important; color: #fff !important; }
.acctPanel a svg { width: 16px; height: 16px; flex: none; opacity: .85; }

/* ============ 通用遮罩与模态 ============ */
.ob-overlay {
  position: fixed; inset: 0; z-index: 1400; display: none;
  align-items: center; justify-content: center; padding: 18px;
  background: rgba(6, 11, 24, .62); backdrop-filter: blur(3px);
}
.ob-overlay.show { display: flex; animation: obFade .22s ease; }
@keyframes obFade { from { opacity: 0; } to { opacity: 1; } }
.ob-modal {
  width: 520px; max-width: 100%; max-height: 90vh; overflow: auto;
  background: var(--elev, #1c2d55); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .55); position: relative;
  animation: obPop .28s cubic-bezier(.2, .8, .3, 1.1);
}
@keyframes obPop { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ob-close {
  position: absolute; right: 14px; top: 12px; width: 32px; height: 32px; border: 0;
  background: transparent; color: var(--text3); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 8px;
}
.ob-close:hover { color: var(--text); background: var(--surface2, #18274a); }

/* ============ 新手分步指引 ============ */
.ob-guide { padding: 30px 30px 24px; text-align: center; }
.ob-gIcon {
  width: 76px; height: 76px; margin: 4px auto 16px; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(79, 140, 255, .22), rgba(19, 58, 179, .18));
  border: 1px solid var(--line);
}
.ob-gIcon svg { width: 38px; height: 38px; color: var(--v, #4f8cff); }
.ob-gTitle { font-size: 19px; font-weight: 800; color: var(--text); margin-bottom: 9px; }
.ob-gDesc { font-size: 14px; line-height: 1.85; color: var(--text2); max-width: 400px; margin: 0 auto; }
.ob-gDesc b { color: var(--gold, #f5b544); font-weight: 700; }
.ob-dots { display: flex; gap: 7px; justify-content: center; margin: 20px 0 18px; }
.ob-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface2, #18274a); transition: all .2s; }
.ob-dots i.on { width: 22px; border-radius: 5px; background: var(--v, #4f8cff); }
.ob-gFoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ob-gFoot .sp { flex: 1; }
.ob-btn {
  border: 1px solid var(--line); background: var(--surface2, #18274a); color: var(--text);
  padding: 10px 20px; border-radius: 10px; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
.ob-btn:hover { border-color: var(--v, #4f8cff); }
.ob-btn.primary { background: linear-gradient(135deg, #133ab3, #2f63e0); border-color: transparent; color: #fff; font-weight: 700; }
.ob-btn.ghost { background: transparent; color: var(--text3); border-color: transparent; }
.ob-btn.ghost:hover { color: var(--text); }
.ob-skip { background: transparent; border: 0; color: var(--text3); font-size: 13px; cursor: pointer; padding: 8px; }
.ob-skip:hover { color: var(--text); }

/* ============ 首登红包 ============ */
.ob-gift { padding: 30px 28px 26px; text-align: center; }
.ob-giftGlow {
  width: 132px; height: 158px; margin: 2px auto 16px; position: relative;
  animation: obGiftFloat 2.4s ease-in-out infinite;
}
@keyframes obGiftFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.ob-giftPack {
  position: absolute; inset: 0; border-radius: 16px;
  background: linear-gradient(165deg, #f0564b 0%, #d12b23 55%, #a01713 100%);
  box-shadow: 0 16px 40px rgba(208, 45, 36, .45), inset 0 1px 0 rgba(255, 255, 255, .28);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #ffe9b0;
}
.ob-giftPack::before { content: ''; position: absolute; left: 0; right: 0; top: 42px; height: 3px; background: rgba(255, 220, 150, .55); }
.ob-giftPack .fu {
  width: 54px; height: 54px; border-radius: 50%; margin-bottom: 8px;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #f5c451 60%, #d4a017);
  color: #b3261e; font-size: 27px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.ob-giftPack .amt { font-size: 30px; font-weight: 900; color: #fff; }
.ob-giftPack .amt small { font-size: 15px; font-weight: 700; }
.ob-giftPack .cond { font-size: 12px; color: #ffe0c0; margin-top: 3px; }
.ob-giftTitle { font-size: 21px; font-weight: 900; color: var(--gold, #f5c451); letter-spacing: 1px; }
.ob-giftSub { font-size: 14.5px; color: var(--text2); margin: 8px 0 4px; line-height: 1.8; }
.ob-giftSub b { color: var(--gold, #f5c451); }
.ob-giftBtn {
  margin-top: 18px; width: 100%; padding: 13px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, #f5c451, #e8a91e); color: #6b3d00; font-size: 16px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(228, 174, 40, .35);
}
.ob-giftBtn:active { transform: translateY(1px); }
.ob-giftNote { margin-top: 12px; font-size: 12px; color: var(--text3); line-height: 1.7; }

/* ============ 新剧推荐 ============ */
.ob-reco { padding: 24px 24px 20px; }
.ob-recoHead { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ob-recoHead .tt { font-size: 18px; font-weight: 800; color: var(--text); }
.ob-recoHead .tag { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: rgba(251, 113, 133, .16); color: var(--hot, #fb7185); }
.ob-recoSub { font-size: 12.5px; color: var(--text3); margin-bottom: 16px; }
.ob-recoGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ob-recoCard { display: block; text-decoration: none; color: inherit; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); transition: transform .18s, border-color .18s; }
.ob-recoCard:hover { transform: translateY(-3px); border-color: var(--v, #4f8cff); }
.ob-recoPoster { position: relative; aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; color: rgba(255,255,255,.85); text-align: center; padding: 8px; }
.ob-recoPoster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ob-recoMeta { padding: 8px 9px 9px; }
.ob-recoMeta .nm { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ob-recoMeta .ch { font-size: 11.5px; color: var(--text3); margin-top: 3px; }
.ob-recoFoot { margin-top: 18px; text-align: right; }

/* ============ 响应式：手机 / 平板 ============ */
@media (max-width: 760px) {
  /* 顶栏账户区在汉堡菜单内纵向排列，下拉静态展开 */
  .navMenu .acctMenu { display: block; width: 100%; }
  .navMenu .acctTrigger { width: 100%; max-width: none; justify-content: flex-start; border-radius: 10px; }
  .navMenu .acctPanel {
    position: static; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    box-shadow: none; border: 0; background: transparent; padding: 4px 0 4px 12px; min-width: 0;
    display: none; margin-top: 4px;
  }
  .navMenu .acctMenu.open .acctPanel { display: block; }
  .ob-modal { width: 100%; border-radius: 16px; }
  .ob-guide { padding: 26px 20px 20px; }
  .ob-reco { padding: 20px 16px 16px; }
  .ob-recoGrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ob-gift { padding: 26px 20px 22px; }
}
@media (min-width: 601px) and (max-width: 1024px) {
  .ob-modal { width: 600px; }
  .ob-recoGrid { grid-template-columns: repeat(3, 1fr); }
}

/* ============ 20 元红包：完成指引前锁定 ============ */
.rfx-redCard.locked { filter: grayscale(.35); opacity: .85; }
.rfx-redCard.locked .rcTop { position: relative; }
.rfx-rcLockTag {
  position: absolute; top: 10px; right: 12px; font-size: 11px; padding: 2px 9px;
  border-radius: 999px; background: rgba(245, 181, 68, .14); color: var(--gold, #f5b544);
  border: 1px solid rgba(245, 181, 68, .4);
}
.rfx-redCard.locked .rfx-rcBtn {
  background: linear-gradient(135deg, #3a4a78, #2c3a63); color: var(--text); cursor: pointer;
}
.rfx-redCard.locked .rfx-rcBtn:hover { border-color: var(--gold, #f5b544); }
