/* ============================================================
 * styles-account.css —— 账户与设置面板 + 充值弹窗 + 右上角头像胶囊
 * 最后加载，覆盖前面所有主题样式；深浅色都走变量。
 * ============================================================ */

/* ---------------- 左下角账号卡：充值按钮改为金色系 ---------------- */
html[data-theme] .sn-pay {
  background: linear-gradient(180deg, rgba(255, 196, 84, .16), rgba(255, 160, 40, .10)) !important;
  border: 1px solid rgba(255, 190, 92, .55) !important;
  color: #ffd48a !important;
  box-shadow: 0 0 0 1px rgba(255, 190, 92, .08), 0 10px 24px -14px rgba(255, 170, 60, .55) !important;
}
html[data-theme] .sn-pay:hover {
  background: linear-gradient(180deg, rgba(255, 196, 84, .26), rgba(255, 160, 40, .16)) !important;
  border-color: rgba(255, 200, 110, .85) !important;
  color: #ffe3ae !important;
}
html[data-theme="light"] .sn-pay {
  background: linear-gradient(180deg, #fff7e6, #ffefd0) !important;
  border-color: rgba(214, 158, 46, .6) !important;
  color: #8a5c00 !important;
}
html[data-theme] .sn-first {
  background: linear-gradient(135deg, #ffd264, #ffab2e) !important;
  color: #4a2c00 !important;
  border: 0 !important;
  box-shadow: 0 10px 22px -14px rgba(255, 170, 50, .9) !important;
}

/* ---------------- 账户与设置面板 ---------------- */
.acc-panel {
  position: fixed;
  z-index: 320;
  width: 404px;
  max-width: calc(100vw - 24px);
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  background: color-mix(in srgb, var(--panel, #14141a) 99%, #000);
  -webkit-backdrop-filter: blur(26px) saturate(120%);
  backdrop-filter: blur(26px) saturate(120%);
  border: 1px solid var(--line, rgba(255, 255, 255, .12));
  border-radius: 16px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  overflow: hidden;
  animation: accIn .16s ease-out;
}
@keyframes accIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.acc-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 14px 10px 16px;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .08));
  flex: 0 0 auto;
}
.acc-head-t { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.acc-head-t b { font-size: 15px; font-weight: 700; color: var(--ink, #f4f4f5); }
.acc-head-t em { font-style: normal; font-size: 10.5px; letter-spacing: 1.4px; color: var(--ink-soft, #8b8b95); }
.acc-close {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; border: 0;
  background: transparent; color: var(--ink-soft, #9a9aa4); font-size: 17px; line-height: 1; cursor: pointer;
}
.acc-close:hover { background: rgba(255, 255, 255, .08); color: var(--ink, #fff); }

.acc-body {
  padding: 6px 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 160, 190, .32) transparent;
}
.acc-body::-webkit-scrollbar { width: 8px; }
.acc-body::-webkit-scrollbar-thumb { background: rgba(150, 160, 190, .28); border-radius: 8px; }

.acc-group { margin-top: 10px; }
.acc-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px 8px;
}
.acc-group-t { font-size: 12.5px; font-weight: 650; color: var(--ink, #e9e9ee); }
.acc-group-l { font-style: normal; font-size: 10px; letter-spacing: 1.6px; color: var(--ink-soft, #7d7d88); }

.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc-card {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px;
  text-align: left; cursor: pointer;
  background: var(--panel-soft, rgba(255, 255, 255, .035));
  border: 1px solid var(--line, rgba(255, 255, 255, .07));
  border-radius: 12px;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.acc-card:hover {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(139, 92, 246, .45);
  transform: translateY(-1px);
}
.acc-ic {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .08);
}
.acc-ic svg { width: 16px; height: 16px; }
.acc-ic.tone-blue { background: rgba(59, 130, 246, .16); color: #7fb2ff; }
.acc-ic.tone-indigo { background: rgba(99, 102, 241, .16); color: #a5b4fc; }
.acc-ic.tone-cyan { background: rgba(6, 182, 212, .16); color: #67e8f9; }
.acc-ic.tone-teal { background: rgba(13, 148, 136, .18); color: #5eead4; }
.acc-ic.tone-violet { background: rgba(139, 92, 246, .18); color: #c4b5fd; }
.acc-ic.tone-amber { background: rgba(245, 158, 11, .18); color: #fcd34d; }
.acc-ic.tone-rose { background: rgba(244, 63, 94, .16); color: #fda4af; }
.acc-ic.tone-green { background: rgba(34, 197, 94, .16); color: #86efac; }
.acc-ic.tone-slate { background: rgba(148, 163, 184, .16); color: #cbd5e1; }

.acc-txt { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.acc-t { font-size: 13px; font-weight: 600; color: var(--ink, #f2f2f5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-d { font-size: 11px; line-height: 1.35; color: var(--ink-soft, #8e8e99); white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; max-width: 100%; display: block; }
.acc-t { max-width: 100%; }

/* 开关型条目（隐私模式 / 隐藏宠物 / 隐藏代理商按钮） */
.acc-switch {
  position: absolute; right: 9px; top: 9px;
  width: 26px; height: 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  transition: background .16s ease;
}
.acc-switch::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 10px; height: 10px; border-radius: 50%; background: #fff;
  transition: transform .16s ease;
}
.acc-card.is-on .acc-switch { background: #8b5cf6; }
.acc-card.is-on .acc-switch::after { transform: translateX(12px); }
.acc-empty { padding: 28px; text-align: center; color: var(--ink-soft, #8e8e99); font-size: 13px; }

/* ---------------- 意见反馈回复未读角标 ----------------
 * 后台回复后前台要「一眼看到」：面板卡片右上角挂红色数字，
 * 顶栏账户球右下角再挂一个（不点开面板也知道有回复）。
 * pointer-events: none —— 角标不吃点击，点上去仍然打开对应功能。 */
.acc-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: #e5484d; color: #fff;
  font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 1;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--panel, #14141a), 0 2px 6px rgba(229, 72, 77, .45);
  pointer-events: none; z-index: 3;
}
html[data-theme] .top-orb .orb-fb {
  /* 数字角标压在图标右上角：和「公告小圆点」错开，视觉上不遮挡那 4 个彩色方块 */
  position: absolute; right: -5px; top: -5px; bottom: auto;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: #e5484d; color: #fff;
  font-size: 10px; font-weight: 700; font-style: normal; line-height: 1;
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--surface-raised, #17171c);
  box-shadow: 0 0 8px rgba(229, 72, 77, .7);
  pointer-events: none; z-index: 3;
}

/* ---------------- 充值弹窗 ---------------- */
.rc-mask {
  position: fixed; inset: 0; z-index: 340;
  background: rgba(4, 6, 12, .62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 18px;
  animation: rcFade .15s ease-out;
}
@keyframes rcFade { from { opacity: 0; } to { opacity: 1; } }

.rc-modal {
  width: 460px; max-width: 100%;
  max-height: calc(100vh - 36px);
  overflow-y: auto; overscroll-behavior: contain;
  background: color-mix(in srgb, var(--panel, #14141a) 97%, transparent);
  border: 1px solid var(--line, rgba(255, 255, 255, .12));
  border-radius: 18px;
  padding: 18px 18px 18px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 160, 190, .3) transparent;
}
.rc-modal::-webkit-scrollbar { width: 8px; }
.rc-modal::-webkit-scrollbar-thumb { background: rgba(150, 160, 190, .28); border-radius: 8px; }

.rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rc-head-t { display: flex; flex-direction: column; gap: 3px; }
.rc-head-t b { font-size: 17px; color: var(--ink, #f6f6f8); }
.rc-head-t span { font-size: 11.5px; color: var(--ink-soft, #8e8e99); }
.rc-close {
  width: 28px; height: 28px; border-radius: 9px; border: 0; background: transparent;
  color: var(--ink-soft, #9a9aa4); font-size: 18px; cursor: pointer;
}
.rc-close:hover { background: rgba(255, 255, 255, .08); color: var(--ink, #fff); }

.rc-gift {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0 4px; padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 205, 100, .16), rgba(255, 150, 40, .08));
  border: 1px solid rgba(255, 195, 90, .40);
}
.rc-gift-ic {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 190, 80, .22); color: #ffcf76;
}
.rc-gift-ic svg { width: 16px; height: 16px; }
.rc-gift-t { min-width: 0; }
.rc-gift-t b { display: block; font-size: 13px; color: #ffd88f; }
.rc-gift-t span { font-size: 11.5px; color: rgba(255, 220, 170, .8); }

.rc-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 0; overflow: visible; }
.rc-tier {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 15px 8px 10px;
  border-radius: 12px; cursor: pointer;
  background: var(--panel-soft, rgba(255, 255, 255, .035));
  border: 1px solid var(--line, rgba(255, 255, 255, .09));
  color: var(--ink, #ececf1);
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.rc-tier:hover { border-color: rgba(255, 195, 90, .5); transform: translateY(-1px); }
.rc-tier.is-on {
  border-color: rgba(255, 195, 90, .95);
  background: linear-gradient(180deg, rgba(255, 200, 92, .16), rgba(255, 160, 40, .06));
  box-shadow: 0 0 0 1px rgba(255, 195, 90, .25) inset;
}
.rc-tier b { font-size: 16px; font-weight: 700; margin-top: 3px; }
.rc-tier .rc-bonus { font-size: 11px; color: #ffcf7a; }
.rc-tag {
  position: absolute; top: 6px; right: 6px;
  font-size: 9.5px; line-height: 15px; padding: 0 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: var(--ink, #fff); pointer-events: none;
}
.rc-tag.is-hot { background: linear-gradient(135deg, #ff9f43, #ff6b6b); color: #fff; }

.rc-custom { margin-top: 10px; }
.rc-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  color: var(--ink, #f0f0f4); font-size: 13px; outline: none;
}
.rc-input:focus { border-color: rgba(255, 195, 90, .7); }

.rc-chips { display: flex; gap: 8px; margin-top: 10px; }
.rc-chip {
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line, rgba(255, 255, 255, .12));
  color: var(--ink-soft, #a1a1ac); font-size: 12.5px;
}
.rc-chip.is-on { border-color: rgba(255, 195, 90, .8); color: #ffd58a; background: rgba(255, 195, 90, .1); }

.rc-sum {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 10px; color: var(--ink-soft, #9a9aa4); font-size: 12.5px;
}
.rc-sum b { font-size: 18px; color: #ffd58a; }
.rc-sum em { font-style: normal; font-size: 11px; color: #ffbf5f; }

.rc-go {
  width: 100%; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 0; font-size: 14px; font-weight: 650;
  background: linear-gradient(135deg, #ffd264, #ffab2e);
  color: #3d2400;
  box-shadow: 0 14px 30px -16px rgba(255, 170, 50, .9);
}
.rc-go:hover { filter: brightness(1.05); }
.rc-go:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.rc-order { margin-top: 12px; }
.rc-pay {
  border: 1px solid var(--line, rgba(255, 255, 255, .1));
  border-radius: 14px; padding: 12px;
  background: rgba(255, 255, 255, .03);
  text-align: center;
}
.rc-pay-t { font-size: 13px; color: var(--ink, #f0f0f4); margin-bottom: 8px; }
.rc-qr-box { display: inline-flex; padding: 8px; background: #fff; border-radius: 10px; }
.rc-qr-box img, .rc-qr-box canvas { display: block; }
.rc-qr-link { display: inline-block; margin-top: 8px; font-size: 12px; color: #8ab4ff; }
.rc-order-no { display: block; margin-top: 8px; font-size: 11.5px; color: var(--ink-soft, #8e8e99); }
.rc-note { margin: 6px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-soft, #8e8e99); }

/* ---------------- 充值弹窗 · 卡密充值标签页（对齐蓝猫） ---------------- */
.rcc-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line, rgba(255, 255, 255, .1)); margin: 14px 0 0; }
.rcc-tab {
  position: relative; background: none; border: 0; padding: 8px 2px 10px;
  font-size: 13.5px; color: var(--ink-soft, #8e8e99); cursor: pointer;
}
.rcc-tab:hover { color: var(--ink, #f0f0f4); }
.rcc-tab.is-on { color: #ffd58a; font-weight: 650; }
.rcc-tab.is-on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  border-radius: 2px; background: linear-gradient(135deg, #ffd264, #ffab2e);
}
.rcc-pane { padding-top: 14px; }
.rcc-hidden { display: none !important; }
.rcc-field { display: flex; flex-direction: column; gap: 8px; }
.rcc-field label { font-size: 13px; color: var(--ink, #f0f0f4); font-weight: 600; }
.rcc-code {
  width: 100%; min-height: 44px; border-radius: 10px;
  border: 1px solid var(--line, rgba(255, 255, 255, .12));
  background: rgba(255, 255, 255, .04); color: var(--ink, #f0f0f4);
  padding: 0 14px; font-size: 14px; letter-spacing: .02em; outline: none;
}
.rcc-code:focus { border-color: rgba(255, 195, 90, .7); }
.rcc-code:disabled { opacity: .6; }
.rcc-notice {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line, rgba(255, 255, 255, .07));
}
.rcc-notice b { display: block; font-size: 12.5px; color: var(--ink, #f0f0f4); margin-bottom: 7px; }
.rcc-notice ul { margin: 0; padding-left: 18px; }
.rcc-notice li { font-size: 12px; color: var(--ink-soft, #8e8e99); line-height: 1.9; }
.rcc-result {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px;
  border-radius: 9px; font-size: 12.5px; line-height: 1.6;
}
.rcc-result.rcc-ok { background: rgba(52, 199, 123, .14); color: #4ade80; }
.rcc-result.rcc-err { background: rgba(228, 86, 86, .14); color: #ff8a8a; }
.rcc-result-ic {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: currentColor; color: #17181d;
  font-size: 11px; font-weight: 700;
}
.rcc-actions { display: flex; gap: 10px; margin-top: 16px; }
.rcc-btn {
  flex: 1; min-height: 44px; border-radius: 10px; font-size: 14px; font-weight: 650;
  cursor: pointer; border: 1px solid var(--line, rgba(255, 255, 255, .14));
  background: rgba(255, 255, 255, .06); color: var(--ink, #f0f0f4);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.rcc-btn:hover { background: rgba(255, 255, 255, .1); }
.rcc-redeem {
  border-color: transparent;
  background: linear-gradient(135deg, #ffd264, #ffab2e);
  color: #3d2400;
  box-shadow: 0 14px 30px -16px rgba(255, 170, 50, .9);
}
.rcc-redeem:hover { background: linear-gradient(135deg, #ffd264, #ffab2e); filter: brightness(1.05); }
.rcc-redeem.is-busy { opacity: .75; cursor: wait; box-shadow: none; }
.rcc-spinner {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid rgba(61, 36, 0, .35); border-top-color: #3d2400;
  animation: rccSpin .8s linear infinite;
}
@keyframes rccSpin { to { transform: rotate(360deg); } }
@media (max-width: 520px) {
  .rcc-tabs { gap: 18px; }
  .rcc-actions { flex-direction: column-reverse; }
  .rcc-btn { min-height: 42px; }
}

/* ---------------- 右上角头像胶囊 ---------------- */
html[data-theme] .chip.user-chip.is-avatar {
  width: auto !important;
  height: 38px !important;
  min-width: 38px;
  padding: 3px 12px 3px 3px !important;
  border-radius: 999px !important;
  overflow: visible !important;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-raised, rgba(255, 255, 255, .06)) !important;
}
html[data-theme] .chip.user-chip.is-avatar .uc-av {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #22d3ee);
  color: #fff; font-size: 13px; font-weight: 650; position: relative;
}
html[data-theme] .chip.user-chip.is-avatar .uc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
html[data-theme] .chip.user-chip.is-avatar .uc-av::after {
  content: ''; position: absolute; right: -1px; bottom: -1px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e; border: 2px solid var(--surface-raised, #17171c);
}
html[data-theme] .chip.user-chip.is-avatar .uc-name {
  max-width: 96px; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink, #f2f2f5);
}
html[data-theme] .chip.user-chip.is-avatar .uc-pts {
  font-size: 12px; color: #ffcf7a; font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  html[data-theme] .chip.user-chip.is-avatar .uc-name,
  html[data-theme] .chip.user-chip.is-avatar .uc-pts { display: none; }
  html[data-theme] .chip.user-chip.is-avatar { padding: 3px !important; width: 38px !important; justify-content: center; }
}

/* ---------------- 本地偏好：隐私模式 / 隐藏宠物 / 隐藏代理商 ---------------- */
html.pref-privacy .sn-balance-n,
html.pref-privacy .ph-value,
html.pref-privacy .uc-pts { filter: blur(6px); transition: filter .2s ease; }
html.pref-privacy .sn-balance-n:hover { filter: none; }
html.pref-hide-pet .lk-dock,
html.pref-hide-pet .ai-eye-spark-layer { display: none !important; }
html.pref-hide-agent .lk-dock-item[data-hash="invite"],
html.pref-hide-agent .sn-center-item[data-hash="partner"] { display: none !important; }

/* ---------------- 浅色主题 ---------------- */
html[data-theme="light"] .acc-panel,
html[data-theme="light"] .rc-modal {
  background: #fff;
  border-color: rgba(23, 25, 35, .1);
  box-shadow: 0 24px 60px -26px rgba(23, 25, 35, .28);
}
html[data-theme="light"] .acc-head-t b,
html[data-theme="light"] .acc-t,
html[data-theme="light"] .rc-head-t b,
html[data-theme="light"] .rc-pay-t { color: #171923; }
html[data-theme="light"] .acc-head-t em,
html[data-theme="light"] .acc-d,
html[data-theme="light"] .acc-group-l,
html[data-theme="light"] .rc-head-t span,
html[data-theme="light"] .rc-note { color: #6b7280; }
html[data-theme="light"] .acc-group-t { color: #111827; }
html[data-theme="light"] .acc-card { background: rgba(15, 23, 42, .03); border-color: rgba(15, 23, 42, .08); }
html[data-theme="light"] .acc-card:hover { background: rgba(15, 23, 42, .06); border-color: rgba(139, 92, 246, .45); }
html[data-theme="light"] .acc-close:hover { background: rgba(15, 23, 42, .06); color: #111827; }
html[data-theme="light"] .rc-tier { background: rgba(15, 23, 42, .03); border-color: rgba(15, 23, 42, .1); color: #111827; }
html[data-theme="light"] .rc-input { background: #fff; border-color: rgba(15, 23, 42, .14); color: #111827; }
html[data-theme="light"] .rc-chip { color: #4b5563; border-color: rgba(15, 23, 42, .14); }
html[data-theme="light"] .rc-pay { background: rgba(15, 23, 42, .03); border-color: rgba(15, 23, 42, .1); }
html[data-theme="light"] .rc-mask { background: rgba(15, 23, 42, .35); }
