/* 用户中心插件共享样式（前台页面 + 论坛模板用户元素共用） */
.uc-avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; background: #e5e7eb; display: inline-block; }

/* 全局兜底：带 hidden 属性的元素一律隐藏（防止被组件里的 display:flex 覆盖） */
[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.uc-topbar { background: #1f2733; color: #fff; }
.uc-topbar-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.uc-logo { color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; }
.uc-topbar-right { display: flex; align-items: center; gap: 10px; }
.uc-main { margin: 4px 0 32px; min-height: 60vh; }
.uc-footer { text-align: center; color: #9ca3af; font-size: 12px; padding: 24px 0 40px; }

/* ---------- 卡片 / 表单 ---------- */
.uc-card { background: #fff; border: 1px solid #e8ebf0; border-radius: 12px; padding: 24px; }
.uc-auth-card, .uc-post-card { max-width: 460px; margin: 32px auto; }
.uc-card-title { font-size: 18px; font-weight: 700; color: #1f2733; margin: 0 0 16px; }
.uc-form { display: flex; flex-direction: column; gap: 8px; }
.uc-label { font-size: 13px; color: #6b7280; margin-top: 8px; }
.uc-input { height: 40px; padding: 0 12px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-size: 14px; outline: none; width: 100%; box-sizing: border-box; background: #fff; color: #1f2733; }
.uc-input:focus { border-color: #2f6fed; }
.uc-textarea { height: auto; min-height: 200px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.uc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; cursor: pointer; text-decoration: none; transition: opacity .15s; }
.uc-btn:hover { opacity: .88; }
.uc-btn-primary { background: #2f6fed; color: #fff; }
.uc-btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.uc-topbar .uc-btn-ghost { color: #d6dae1; border-color: #4b5563; }
.uc-btn-block { width: 100%; margin-top: 14px; }
.uc-muted { color: #9ca3af; font-size: 13px; margin-top: 14px; }
.uc-muted a { color: #2f6fed; text-decoration: none; }

/* ---------- 提示 ---------- */
.uc-alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.uc-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.uc-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- 个人中心 ---------- */
.uc-center { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
/* 关键：grid 项默认 min-width:auto，内部超宽内容（如滚动公告）会把整列撑变形 */
.uc-center-body { min-width: 0; }
.uc-center-solo { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 800px) { .uc-center { grid-template-columns: 1fr; } }
.uc-me-card { text-align: center; }
.uc-me-name { display: block; font-size: 16px; font-weight: 700; margin-top: 10px; color: #1f2733; text-decoration: none; }
.uc-me-name:hover { color: #2f6fed; }
.uc-me-sub { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.uc-me-title { display: flex; justify-content: center; margin-top: 6px; }
.uc-center-nav { display: flex; flex-direction: column; gap: 2px; margin: 16px 0; text-align: left; }
.uc-center-nav a { padding: 9px 12px; border-radius: 8px; color: #4b5563; text-decoration: none; font-size: 14px; }
.uc-center-nav a:hover { background: #f3f4f6; }
.uc-center-nav a.on { background: #eef4ff; color: #2f6fed; font-weight: 600; }

/* ---------- 列表 ---------- */
.uc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.uc-list-item { border-bottom: 1px solid #f1f3f6; padding-bottom: 10px; }
.uc-list-item:last-child { border-bottom: 0; }
.uc-list-title { color: #1f2733; font-weight: 600; text-decoration: none; margin: 0 6px; }
.uc-list-title:hover { color: #2f6fed; }
.uc-list-meta { color: #9ca3af; font-size: 12px; }
.uc-list-item a { color: #2f6fed; font-size: 12px; text-decoration: none; }
.uc-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px; background: #eef4ff; color: #2f6fed; }
.uc-reply-item .uc-reply-snip { color: #374151; font-size: 13px; margin-top: 4px; }

/* ---------- 等级徽章 / 图标（自绘 SVG，可商用） ---------- */
.uc-lv-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; line-height: 1.65; white-space: nowrap; }
.uc-lv-badge svg { flex: 0 0 auto; }
.uc-lv-badge-inline { font-size: 11px; padding: 0 6px; }
.uc-lv-badge-sm { font-size: 11px; }
.uc-lv-char { display: inline-block; vertical-align: -0.1em; }

/* ---------- 我的主题：删除相关 ---------- */
.uc-bulkbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0 12px; border-bottom: 1px solid #f1f3f6; margin-bottom: 4px; }
.uc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; cursor: pointer; }
.uc-check input { width: 15px; height: 15px; cursor: pointer; }
.uc-topic-pick { margin-right: 2px; }
.uc-list-item.uc-topic-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uc-topic-del { margin-left: auto; border: 1px solid #fecaca; background: #fff; color: #dc2626; font-size: 12px; padding: 3px 10px; border-radius: 7px; cursor: pointer; }
.uc-topic-del:hover { background: #fef2f2; border-color: #fca5a5; }
.uc-btn-danger { background: #dc2626; color: #fff; }
.uc-btn-danger:hover { background: #b91c1c; }
.uc-btn-danger:disabled { background: #f3f4f6; color: #9ca3af; cursor: default; }

/* ---------- 我的积分（明细） ---------- */
.uc-pt-stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin: 4px 0 14px; }
@media (max-width: 640px) { .uc-pt-stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.uc-pt-stat { background: #f8fafc; border: 1px solid #eef1f5; border-radius: 10px; padding: 12px; text-align: center; }
.uc-pt-stat b { display: block; font-size: 19px; color: #1f2733; line-height: 1.35; }
.uc-pt-stat b.in { color: #059669; }
.uc-pt-stat b.out { color: #dc2626; }
.uc-pt-stat span { font-size: 12px; color: #9aa4b2; }
.uc-pt-level { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid #f1f3f6; }
.uc-pt-bar { flex: 1; min-width: 120px; height: 8px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.uc-pt-bar i { display: block; height: 100%; border-radius: 999px; }
.uc-pt-row { display: flex; align-items: center; gap: 10px; }
.uc-pt-delta { font-weight: 700; font-size: 14px; min-width: 56px; font-family: Monospace; }
.uc-pt-delta.in { color: #059669; }
.uc-pt-delta.out { color: #dc2626; }
.uc-pt-reason { flex: 1; font-size: 13.5px; color: #374151; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-pager { display: flex; gap: 6px; justify-content: center; padding: 14px 0 4px; flex-wrap: wrap; }
.uc-pager a, .uc-pager span { min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; color: #4b5563; text-decoration: none; }
.uc-pager .on { background: #2f6fed; border-color: #2f6fed; color: #fff; }

/* ---------- 共享组件：标签页 / 面板 / 列表 / 空状态（消息中心、关注页等共用） ---------- */
.ucm-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ucm-tab { padding: 8px 16px; border-radius: 9px; background: #fff; border: 1px solid #e8ebf0; color: #4b5563; font-size: 13.5px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.ucm-tab:hover { border-color: #c7d6f5; color: #2f6fed; }
.ucm-tab.on { background: #2f6fed; border-color: #2f6fed; color: #fff; font-weight: 600; }
.ucm-tab.on:hover { color: #fff; }
.ucm-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.ucm-tab.on .ucm-badge { background: rgba(255,255,255,.25); }
.ucm-panel { background: #fff; border: 1px solid #e8ebf0; border-radius: 12px; overflow: hidden; }
.ucm-list { list-style: none; margin: 0; padding: 0; }
.ucm-item { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid #f4f6f9; }
.ucm-item:last-child { border-bottom: 0; }
.ucm-item:hover { background: #fbfcfe; }
.ucm-item.unread { background: #f7faff; }
.ucm-item-main { flex: 1; min-width: 0; }
.ucm-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ucm-item-name { font-size: 13.5px; font-weight: 600; color: #1f2733; }
.ucm-item-time { margin-left: auto; font-size: 11.5px; color: #9aa4b2; }
.ucm-item-snip { font-size: 12.5px; color: #6b7280; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucm-hint { font-size: 12px; color: #9aa4b2; }
.ucm-pager { display: flex; gap: 6px; justify-content: center; padding: 14px; flex-wrap: wrap; }
.ucm-pager a, .ucm-pager span { min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; color: #4b5563; text-decoration: none; }
.ucm-pager .on { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.ucm-empty { padding: 40px 20px; text-align: center; color: #9aa4b2; font-size: 13px; }
/* 好友标识（关注页、公开名片共用） */
.ucfw-friend { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #fff7ed; color: #ea580c; font-weight: 600; }

/* ---------- 称号徽章（称号殿堂、文章楼层、公开名片共用） ---------- */
.uc-title-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.uc-title-badge .uc-title-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 18px;
  width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.72); font-size: 11px; line-height: 1; }
.uc-title-badge .uc-title-ico svg { display: block; }
.uc-title-badge .uc-title-nm { line-height: 1.4; }
.uc-title-badge .uc-title-rar { font-style: normal; font-size: 10px; font-weight: 800; opacity: .75; margin-left: 1px; }
.uc-title-badge.uc-title-badge-inline { font-size: 11px; padding: 1px 6px 1px 2px; }
.uc-title-badge.uc-title-badge-inline .uc-title-ico { flex-basis: 15px; width: 15px; height: 15px; }
.uc-title-badge.uc-title-badge-inline .uc-title-ico svg { width: 11px; height: 11px; }

/* ---------- 称号特权：展示特效 ---------- */
/* 徽章加大（SSR/UR） */
.uc-title-badge.fx-big { font-size: 13px; padding: 3px 10px 3px 4px; }
.uc-title-badge.fx-big .uc-title-ico { flex-basis: 21px; width: 21px; height: 21px; }
.uc-title-badge.fx-big .uc-title-ico svg { width: 15px; height: 15px; }
/* SR：淡紫呼吸光 */
.uc-title-badge.fx-glow { box-shadow: 0 0 0 1px rgba(139,92,246,.35), 0 0 8px rgba(139,92,246,.35);
  animation: uc-tfx-glow 2.6s ease-in-out infinite; }
/* SSR：金光扫过 + 外发光 */
.uc-title-badge.fx-gold { position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(245,158,11,.55), 0 0 12px rgba(245,158,11,.45); }
.uc-title-badge.fx-gold::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.85), transparent);
  animation: uc-tfx-shine 2.8s ease-in-out infinite; pointer-events: none; }
/* UR：徽章内部旋转红金极光 + 流光（overflow:hidden 全部裁剪，绝不外溢干扰周围内容） */
.uc-title-badge.fx-ur { position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(185,28,28,.85), 0 0 0 2px rgba(245,158,11,.35), 0 0 6px rgba(220,38,38,.35);
  animation: uc-tfx-ursheen 2.1s linear infinite, uc-tfx-urpulse 1.9s ease-in-out infinite; }
.uc-title-badge.fx-ur::before { content: ''; position: absolute; inset: -45%; border-radius: 999px;
  background: conic-gradient(from 0deg, rgba(245,158,11,.85), rgba(220,38,38,.9), rgba(253,230,138,.7), rgba(185,28,28,.85), rgba(245,158,11,.85));
  filter: blur(7px); opacity: .32; z-index: -1; pointer-events: none;
  animation: uc-tfx-urspin 3.2s linear infinite; }
@keyframes uc-tfx-ursheen { 0% { background-position: 210% 0; } 100% { background-position: -110% 0; } }
@keyframes uc-tfx-urspin { to { transform: rotate(360deg); } }
@keyframes uc-tfx-urpulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(185,28,28,.9), 0 0 0 2px rgba(245,158,11,.35), 0 0 5px rgba(220,38,38,.3); }
  50% { box-shadow: 0 0 0 1px rgba(245,158,11,.95), 0 0 0 2px rgba(220,38,38,.55), 0 0 10px rgba(245,158,11,.6); }
}
@keyframes uc-tfx-glow { 0%,100% { box-shadow: 0 0 0 1px rgba(139,92,246,.3), 0 0 6px rgba(139,92,246,.3); }
  50% { box-shadow: 0 0 0 1px rgba(139,92,246,.55), 0 0 12px rgba(139,92,246,.5); } }
@keyframes uc-tfx-shine { 0% { left: -120%; } 55%,100% { left: 130%; } }

/* 头像框（稀有度描边） */
.uc-avatar-frame { border-radius: 50%; }
.uc-avatar-frame.af-n    { box-shadow: 0 0 0 2px #9aa4b2; }
.uc-avatar-frame.af-r    { box-shadow: 0 0 0 2px #2f6fed; }
.uc-avatar-frame.af-sr   { box-shadow: 0 0 0 2px #8b5cf6, 0 0 8px rgba(139,92,246,.5); }
.uc-avatar-frame.af-ssr  { box-shadow: 0 0 0 2px #f59e0b, 0 0 10px rgba(245,158,11,.6); }
/* UR 头像框：红金呼吸光环（幅度收敛，不外溢干扰周围内容） */
.uc-avatar-frame.af-ur   { box-shadow: 0 0 0 2px #b91c1c, 0 0 0 4px rgba(245,158,11,.5), 0 0 8px rgba(220,38,38,.5);
  animation: uc-af-ur 2s ease-in-out infinite; }
@keyframes uc-af-ur {
  0%, 100% { box-shadow: 0 0 0 2px #b91c1c, 0 0 0 4px rgba(245,158,11,.5), 0 0 8px rgba(220,38,38,.5); }
  50%      { box-shadow: 0 0 0 2px #f59e0b, 0 0 0 4px rgba(220,38,38,.7), 0 0 12px rgba(245,158,11,.8); }
}
/* UR 觉醒（Lv.10+）：红金三重环 + 更强呼吸（幅度仍受控，不外溢干扰排版） */
.uc-avatar-frame.af-ur.af-ur-awaken {
  box-shadow: 0 0 0 2px #b91c1c, 0 0 0 4px #f59e0b, 0 0 0 6px rgba(185,28,28,.5), 0 0 12px rgba(245,158,11,.7);
  animation: uc-af-awaken 1.7s ease-in-out infinite;
}
@keyframes uc-af-awaken {
  0%, 100% { box-shadow: 0 0 0 2px #b91c1c, 0 0 0 4px #f59e0b, 0 0 0 6px rgba(185,28,28,.45), 0 0 11px rgba(245,158,11,.65); }
  50%      { box-shadow: 0 0 0 2px #f59e0b, 0 0 0 4px #dc2626, 0 0 0 7px rgba(245,158,11,.6), 0 0 16px rgba(220,38,38,.85); }
}

@media (prefers-reduced-motion: reduce) {
  .uc-title-badge.fx-glow, .uc-title-badge.fx-gold::after, .uc-title-badge.fx-ur,
  .uc-title-badge.fx-ur::before, .uc-avatar-frame.af-ur, .uc-avatar-frame.af-ur-awaken { animation: none; }
}

/* ---------- 头像设置（我的头像卡 + 更换头像弹窗 + 裁剪器） ---------- */
.ucav-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ucav-cur img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #eef2f7;
  box-shadow: 0 6px 18px -10px rgba(31,39,51,.5); }
.ucav-info { flex: 1; min-width: 220px; }
.ucav-desc { font-size: 12.5px; color: #6b7280; line-height: 1.75; }
.ucav-desc b { color: #1f2733; }
.ucav-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.ucav-modal { position: fixed; inset: 0; z-index: 9990; display: flex; align-items: center; justify-content: center; }
.ucav-modal[hidden] { display: none; }
.ucav-mask { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.ucav-dlg { position: relative; z-index: 1; width: min(520px, 94vw); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 30px 70px -24px rgba(0,0,0,.6);
  animation: ucav-rise .28s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes ucav-rise { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.ucav-dlg-hd { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px 12px; }
.ucav-dlg-title { font-size: 16px; font-weight: 700; color: #1f2733; }
.ucav-x { border: 0; background: transparent; font-size: 24px; line-height: 1; color: #9aa4b2; cursor: pointer; padding: 0 4px; }
.ucav-x:hover { color: #4b5563; }
.ucav-tabs { display: flex; gap: 6px; padding: 0 18px; border-bottom: 1px solid #f1f3f6; }
.ucav-tab { border: 0; background: transparent; padding: 9px 4px 11px; margin-right: 14px; font-size: 13.5px;
  color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.ucav-tab.on { color: #2f6fed; font-weight: 700; border-bottom-color: #2f6fed; }
.ucav-pane { padding: 16px 18px 18px; }
.ucav-pane[hidden] { display: none; }

.ucav-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 520px) { .ucav-grid { grid-template-columns: repeat(4, 1fr); } }
.ucav-cell { margin: 0; }
.ucav-pick { width: 100%; border: 2px solid #eef0f5; background: #fff; border-radius: 12px; padding: 6px 2px 5px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: inherit; transition: .15s; }
.ucav-pick img { border-radius: 50%; display: block; }
.ucav-pick span { font-size: 11px; color: #6b7280; }
.ucav-pick:hover { border-color: #c7d6f5; transform: translateY(-1px); }
.ucav-pick.on { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.14); }
.ucav-pick.on span { color: #2f6fed; font-weight: 700; }

.ucav-locked { text-align: center; font-size: 13px; color: #6b7280; line-height: 1.9; padding: 22px 10px; }
.ucav-locked b { color: #1f2733; }
.ucav-locked-sub { font-size: 12px; color: #9aa4b2; margin-top: 6px; }
.ucav-locked-sub a { color: #2f6fed; }

.ucav-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ucav-up-hint { font-size: 12px; color: #9aa4b2; }
.ucav-crop { margin-top: 14px; }
.ucav-stage { position: relative; width: 260px; height: 260px; margin: 0 auto; overflow: hidden; border-radius: 12px;
  background: #0f172a; cursor: grab; touch-action: none; user-select: none; }
.ucav-stage:active { cursor: grabbing; }
.ucav-stage img { position: absolute; top: 0; left: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.ucav-frame { position: absolute; inset: 0; pointer-events: none; border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(15,23,42,.35) inset; }
.ucav-frame::after { content: ''; position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.85); }
.ucav-ctrls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.ucav-zoom { font-size: 12.5px; color: #6b7280; display: flex; align-items: center; gap: 8px; }
.ucav-zoom input { width: 140px; accent-color: #2f6fed; }
.ucav-acts { display: flex; gap: 8px; }
