/* ============================================================ * 徽章弹窗(zibll medal 1:1 风格) * ------------------------------------------------------------ * 共享于两个入口: * 1. 用户中心「我的徽章」弹窗(.uc-badges-modal,JS 渲染) * 2. 远程弹窗徽章明细/单卡(.medal-modal,PHP 渲染) * 加载条件与 user-badges.js 一致(badge surface 页面)。 * ============================================================ */ /* ---------- 顶部资料卡入口(zibll user-medal-info parity) ---------- */ .aksrt-medal-entry, .uc-header__meta-item { display: inline-flex; align-items: center; gap: 4px; min-width: 0; margin: 2px 8px 2px 0; padding: .3em .6em; border: 1px solid var(--color-line-soft, var(--main-border-color, rgba(136, 136, 136, .18))); border-radius: var(--mini-radius, 4px); background: var(--surface-2, rgba(136, 136, 136, .1)); box-shadow: var(--shadow-xs, 0 1px 3px rgba(0, 0, 0, .08)); color: var(--muted-2-color, var(--color-ink-3)); font: inherit; font-size: 12px; line-height: 1.44; white-space: nowrap; } .aksrt-medal-entry { cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease; } .aksrt-medal-entry:hover, .aksrt-medal-entry:focus-visible { border-color: var(--focus-color-opacity3, var(--focus-color)); background: var(--focus-color-opacity1, rgba(59, 130, 246, .1)); box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, .1)); color: var(--focus-color); opacity: 1; } .aksrt-medal-entry:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; } .aksrt-medal-entry__icons { display: inline-flex; align-items: center; flex: none; min-width: 0; } .aksrt-medal-entry__icon { width: auto; height: 1.45em; max-width: 2.2em; margin: 0 1px; object-fit: contain; vertical-align: middle; } .aksrt-medal-entry__icon + .aksrt-medal-entry__icon { margin-left: -1px; } .aksrt-medal-entry__fallback { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; color: var(--focus-color); background: var(--focus-color-opacity1); border-radius: 50%; } .aksrt-medal-entry__count { margin-left: 2px; } .aksrt-medal-entry__arrow { margin-left: 1px; font-size: .9em; } @media (max-width: 767px) { .aksrt-medal-entry, .uc-header__meta-item { margin-right: 4px; max-width: 100%; } } .medal-cat-box { position: relative; text-align: center; padding: 8px 8px 4px; margin-bottom: 16px; background: var(--muted-border-color, rgba(136, 136, 136, 0.06)); border-radius: var(--main-radius, 8px); } .medal-cat-box:last-child { margin-bottom: 0; } .medal-cat-head { margin-bottom: 6px; } .medal-cat-name { display: inline-block; margin-top: -8px; padding: 6px 22px; font-size: 13px; font-weight: 600; color: var(--focus-color); background: var(--focus-color-opacity1); border-radius: 0 0 1000px 1000px; } /* ---------- 卡片网格(zibll .medal-list-box / .medal-list) ---------- */ .medal-list-box { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px 4px; } .medal-list { display: block; min-width: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; } .medal-card { position: relative; text-align: center; padding: 8px 4px 6px; border-radius: var(--mini-radius, 6px); transition: transform 0.15s ease, background-color 0.15s ease; } .medal-list:hover .medal-card, .medal-list:focus-visible .medal-card { transform: translateY(-2px); background: var(--focus-color-opacity1); } .medal-list:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; border-radius: var(--mini-radius, 6px); } .medal-card .medal-icon { width: auto; height: 70px; max-width: 100%; object-fit: contain; } .medal-card .medal-icon--fa { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 70px; font-size: 34px; color: var(--focus-color); } /* 未获得:灰度 + 透明(zibll .no-has) */ .medal-card.no-has { -webkit-filter: grayscale(100%); filter: grayscale(100%); opacity: 0.6; } .medal-card__name { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--muted-color, var(--color-ink-3)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .medal-card.is-has .medal-card__name { color: var(--key-color, var(--color-ink)); } .medal-card__wear { margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--focus-color); } /* ---------- 单徽章详情卡(zibll .medal-single-card) ---------- */ .medal-single-card { position: relative; overflow: hidden; text-align: center; padding: 22px 14px 18px; margin-bottom: 14px; background: var(--muted-border-color, rgba(136, 136, 136, 0.06)); border-radius: var(--main-radius, 8px); } .medal-single-bg { position: absolute; top: 43px; left: 0; right: 0; bottom: 0; opacity: 0.5; pointer-events: none; } .medal-single-bg img { width: 100%; height: 100%; object-fit: cover; } .medal-single-main { position: relative; } .medal-single-card .medal-icon { width: auto; height: 120px; max-width: 200px; object-fit: contain; } .medal-single-card .medal-icon--fa { display: inline-flex; align-items: center; justify-content: center; height: 120px; font-size: 72px; color: var(--focus-color); } .medal-single-name { margin-top: 12px; font-size: 16px; font-weight: 700; } .medal-single-desc { margin-top: 8px; font-size: 12px; line-height: 1.6; } .medal-single-state { margin-top: 10px; font-size: 12px; } /* ---------- 弹窗骨架(远程弹窗 .medal-modal) ---------- */ .medal-modal { position: relative; padding: 6px 4px 12px; } .medal-modal__empty { padding: 24px 0; text-align: center; color: var(--muted-2-color, var(--color-ink-4)); } .medal-modal__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-right: 28px; } .medal-modal__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--focus-color-opacity1); } .medal-modal__title { display: flex; align-items: center; flex-wrap: wrap; min-width: 0; font-size: 15px; font-weight: 700; } .medal-modal__title .medal-icon { width: auto; height: 1.6em; margin-left: 4px; object-fit: contain; } .medal-modal__scroll { max-height: 50vh; max-height: 50dvh; overflow-y: auto; padding: 2px; } /* 底部操作区(zibll .modal-buts.but-average 语义) */ .medal-modal__buts { display: flex; margin: 12px -4px -12px; border-top: 1px solid var(--main-border-color, var(--color-line)); } .medal-modal__buts > .but { flex: 1; padding: 0.7em; background: transparent; border-radius: 0; } .medal-modal__buts > .but + .but { border-left: 1px solid var(--main-border-color, var(--color-line)); } .medal-modal__buts > .but:hover { background: var(--focus-color-opacity05); opacity: 1; } /* 单卡弹窗 */ .medal-modal--single { padding: 10px 8px 14px; text-align: center; } .medal-modal__actions { margin-top: 4px; } .medal-modal__actions .but.btn-block, .medal-modal__actions .badg.btn-block { display: block; width: 100%; } .medal-modal__back { display: inline-block; margin-top: 12px; text-decoration: none; } .medal-modal__back:hover { color: var(--focus-color); } /* ---------- 用户中心「我的徽章」弹窗 ---------- */ .uc-badges-dialog { max-width: 560px; padding: 0; overflow: hidden; } .uc-badges-head { display: flex; align-items: center; gap: 10px; padding: 16px 46px 12px 18px; border-bottom: 1px solid var(--main-border-color, var(--color-line)); } .uc-badges-head__icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; font-size: 16px; color: var(--focus-color); background: var(--focus-color-opacity1); border-radius: 10px; } .uc-badges-head__title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; } .uc-badges-head__count { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--muted-2-color, var(--color-ink-4)); } .uc-badges-head__wear { flex: none; } .uc-badges-head__wear-tag { display: inline-flex; align-items: center; gap: 5px; max-width: 140px; padding: 3px 10px; font-size: 12px; color: var(--focus-color); background: var(--focus-color-opacity1); border-radius: 100px; } .uc-badges-head__wear-tag .medal-icon { width: auto; height: 18px; object-fit: contain; } .uc-badges-head__wear-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .uc-badges-body { max-height: 56vh; max-height: 56dvh; overflow-y: auto; padding: 16px 14px 18px; } .uc-badges-loading, .uc-badges-error { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px 0; } /* 详情视图 */ .uc-badges-view--detail { padding: 8px 16px 18px; } .uc-badges-detail__head { margin-bottom: 6px; } .uc-badges-back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted-2-color, var(--color-ink-4)); cursor: pointer; border-radius: var(--mini-radius, 6px); transition: color 0.15s ease, background-color 0.15s ease; } .uc-badges-back:hover { color: var(--focus-color); background: var(--focus-color-opacity1); } /* ---------- 细滚动条(zibll .mini-scrollbar) ---------- */ .mini-scrollbar { scrollbar-width: thin; scrollbar-color: var(--muted-border-color, rgba(136, 136, 136, 0.3)) transparent; } .mini-scrollbar::-webkit-scrollbar { width: 5px; height: 5px; } .mini-scrollbar::-webkit-scrollbar-thumb { background: var(--muted-border-color, rgba(136, 136, 136, 0.3)); border-radius: 10px; } .mini-scrollbar::-webkit-scrollbar-track { background: transparent; } /* ---------- 响应式(zibll: 桌面 5 列 / 移动 4 列) ---------- */ @media (max-width: 768px) { .medal-list-box { grid-template-columns: repeat(4, 1fr); } .medal-card .medal-icon { height: 55px; } .medal-card .medal-icon--fa { width: 44px; height: 55px; font-size: 26px; } .medal-single-card .medal-icon { height: 96px; } .uc-badges-dialog { max-width: 100%; } .uc-badges-body { max-height: 62vh; max-height: 62dvh; } } @media (max-width: 400px) { .medal-list-box { grid-template-columns: repeat(3, 1fr); } }