/* mc-gamify 成长中心/排行榜样式(规范 docs/design/ui-refresh.md §4.2/§4.4)
   颜色/圆角/阴影统一引用 mc-brand theme.css 的 var(--mc-*) 令牌;
   令牌没有的色值(徽章灰底/渐变端色/金银铜)在本文件局部定义。 */

/* ---- 统计卡(§4.2)---- */
.mc-gamify-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.mc-gamify-stat {
    flex: 1;
    min-width: 8rem;
    text-align: center;
    padding: 16px 12px;
    background: var(--mc-card);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow-sm);
    transition: var(--mc-ease);
}
.mc-gamify-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--mc-shadow-md);
}
.mc-gamify-stat .num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--mc-primary);
}
.mc-gamify-stat .label {
    margin-top: 4px;
    font-size: 12px;
    color: var(--mc-text-3);
}

/* ---- 徽章墙(§4.2)---- */
.mc-gamify-badges {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 14px;
}
.mc-badge {
    position: relative;
    padding: 18px 12px 14px;
    border-radius: var(--mc-radius);
    text-align: center;
    transition: var(--mc-ease);
}
.mc-badge:hover {
    transform: translateY(-2px);
}
.mc-badge__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
}
/* 排行榜行内徽章小圆标:20px 圆底(档位色) + emoji,hover title 显示名称与条件 */
.mc-badge-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 1;
    cursor: default;
}
.mc-badge__name {
    font-weight: 600;
}
.mc-badge__desc {
    margin-top: 2px;
    font-size: 12px;
}
/* 已获得:主色渐变底 + 白字 + shadow-md(渐变端色 #7c9bff 令牌外,局部定义) */
.mc-badge.owned {
    background: linear-gradient(135deg, var(--mc-primary), #7c9bff);
    box-shadow: var(--mc-shadow-md);
    color: #fff;
}
.mc-badge.owned .mc-badge__icon {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}
.mc-badge.owned .mc-badge__desc {
    color: rgba(255, 255, 255, .85);
}
.mc-badge.owned:hover {
    box-shadow: var(--mc-shadow-lg);
}
/* "已获得"角标:右上角白底圆形对勾 */
.mc-badge__flag {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    color: var(--mc-success);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--mc-shadow-sm);
}
.mc-badge__flag svg {
    width: 10px;
    height: 10px;
    display: block;
}
/* 未获得:灰底 + 弱化文字 + 60% 透明(灰底 #f0f1f3 令牌外,局部定义) */
.mc-badge.locked {
    background: #f0f1f3;
    opacity: .6;
}
.mc-badge.locked .mc-badge__icon {
    background: #e2e4e8;
    color: var(--mc-text-3);
}
.mc-badge.locked .mc-badge__name {
    color: var(--mc-text-2);
}
.mc-badge.locked .mc-badge__desc {
    color: var(--mc-text-3);
}
/* 徽章佩戴(2026-09-01):提示/错误回显 + 称号/展示标记 + 本人操作按钮 */
.mc-badge-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--mc-text-3);
}
.mc-badge-err {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--mc-danger);
}
.mc-badge__mark {
    display: inline-block;
    margin-top: 6px;
    padding: 0 8px;
    border-radius: var(--mc-radius-pill);
    font-size: 11px;
    line-height: 18px;
}
.mc-badge__mark--title { background: linear-gradient(90deg, #f6c244, #e6a23c); color: #5c3a00; }
.mc-badge__mark--pin { background: var(--mc-primary-soft); color: var(--mc-primary); }
.mc-badge__ops {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}
.mc-badge__op {
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--mc-border-soft);
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    opacity: .55;
    transition: var(--mc-ease);
}
.mc-badge__op:hover { opacity: 1; box-shadow: var(--mc-shadow-sm); }
.mc-badge__op--on {
    opacity: 1;
    border-color: var(--mc-gold);
    background: rgba(246, 194, 68, .18);
}

/* ---- 流水正负着色(§4.2)---- */
.mc-tx-amount {
    font-weight: 600;
}
.mc-tx-amount--pos {
    color: var(--mc-success);
}
.mc-tx-amount--neg {
    color: var(--mc-danger);
}

/* ---- 签到/今日目标侧栏(§4.2)---- */
.mc-checkin-done {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--mc-text-2);
}
.mc-checkin-done__icon {
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--mc-success);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mc-checkin-done__icon svg {
    width: 11px;
    height: 11px;
    display: block;
}
.mc-goal-bar {
    height: 6px;
    margin: 8px 0;
    border-radius: var(--mc-radius-pill);
    background: var(--mc-border-soft);
    overflow: hidden;
}
.mc-goal-bar__fill {
    height: 100%;
    border-radius: var(--mc-radius-pill);
    background: var(--mc-primary);
    transition: width .3s ease;
}
.mc-goal-awarded {
    color: var(--mc-success);
    font-weight: 600;
}

/* ---- 每日运势签(v4,纯趣味)---- */
.mc-fortune {
    text-align: center;
}
.mc-fortune__head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.mc-fortune__emoji {
    font-size: 34px;
    line-height: 1;
}
.mc-fortune__name {
    font-size: 22px;
    font-weight: 700;
}
.mc-fortune--daikichi .mc-fortune__name {
    color: var(--mc-gold);
}
.mc-fortune--chukichi .mc-fortune__name {
    color: var(--mc-warning);
}
.mc-fortune--shokichi .mc-fortune__name {
    color: var(--mc-success);
}
.mc-fortune--kichi .mc-fortune__name {
    color: var(--mc-primary);
}
.mc-fortune--hei .mc-fortune__name {
    color: var(--mc-text-3);
}
.mc-fortune__text {
    margin: 10px 0 4px;
    color: var(--mc-text-2);
}
.mc-fortune__lucky {
    margin: 0;
    font-size: 12px;
    color: var(--mc-text-3);
}
.mc-fortune__hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--mc-text-3);
    text-align: center;
}

/* ---- 排行榜(§4.4)---- */
/* 分段控件:浅灰底容器,选中项白卡 + shadow-sm */
.mc-gamify-ranking-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.mc-seg-label {
    font-size: 13px;
    color: var(--mc-text-3);
}
.mc-seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--mc-border-soft);
    border-radius: var(--mc-radius-sm);
}
.mc-seg__item {
    padding: 4px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--mc-text-2);
    transition: var(--mc-ease);
}
.mc-seg__item:hover {
    color: var(--mc-text);
}
.mc-seg__item.active {
    background: var(--mc-card);
    box-shadow: var(--mc-shadow-sm);
    color: var(--mc-primary);
    font-weight: 600;
}
/* 前三名:24px 圆形徽标,浅底 + 同色文字(银/铜令牌外,局部定义) */
.mc-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
}
.mc-rank--1 {
    background: #fef3e2;
    color: var(--mc-gold);
}
.mc-rank--2 {
    background: #f2f3f5;
    color: #9ca3af;
}
.mc-rank--3 {
    background: #f7ece4;
    color: #b45309;
}
.mc-rank--plain {
    color: var(--mc-text-3);
    font-weight: 400;
}
/* 排行榜段位芯片(参考 oi-rank):彩色圆角底 + 等级称号,后跟 ⭐×等级 星级 */
.mc-lv {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}
.mc-lv--1 { background: #8a919f; }
.mc-lv--2 { background: #52c41a; }
.mc-lv--3 { background: #13c2c2; }
.mc-lv--4 { background: #3498db; }
.mc-lv--5 { background: #9d4dcf; }
.mc-lv--6 { background: #e6a23c; }
.mc-lv--7 { background: #f56c6c; }
.mc-lv--8 { background: linear-gradient(90deg, #b8860b, #d4a017); }
/* Lv9~Lv12(2026-09-01 扩级):王者绯红 / 荣耀紫罗兰 / 神话星空蓝 / 不朽黑金 */
.mc-lv--9 { background: linear-gradient(90deg, #a8071a, #f5222d); }
.mc-lv--10 { background: linear-gradient(90deg, #531dab, #9254de); }
.mc-lv--11 { background: linear-gradient(90deg, #10239e, #2f54eb); }
.mc-lv--12 { background: linear-gradient(90deg, #262626, #000); box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.55); }
.mc-lv-stars {
    margin-left: 3px;
    font-size: 10px;
    letter-spacing: 1px;
    vertical-align: middle;
}
/* 段位升级进度条(段位芯片旁,距下一级百分比;排行榜样内联细条) */
.mc-lv-prog {
    display: inline-block;
    margin: 0 0 0 6px;
    width: 56px;
    max-width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--mc-border-soft);
    overflow: hidden;
    vertical-align: middle;
}
.mc-lv-prog i {
    display: block;
    height: 100%;
    border-radius: 2px;
    background: var(--mc-primary);
    transition: width 0.4s;
}
/* 本周冲劲 +N 徽章(总榜 AC 数旁,本周新增首杀数) */
.mc-mom {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 8px;
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}
html.theme--dark .mc-mom {
    background: #16250f;
    color: #95de64;
    border-color: #3a5a24;
}
/* 行首段位色条:与 .mc-lv--N 同色系,表格一眼分档 */
.mc-rowlv--1 td:first-child { border-left: 3px solid #8a919f; }
.mc-rowlv--2 td:first-child { border-left: 3px solid #52c41a; }
.mc-rowlv--3 td:first-child { border-left: 3px solid #13c2c2; }
.mc-rowlv--4 td:first-child { border-left: 3px solid #3498db; }
.mc-rowlv--5 td:first-child { border-left: 3px solid #9d4dcf; }
.mc-rowlv--6 td:first-child { border-left: 3px solid #e6a23c; }
.mc-rowlv--7 td:first-child { border-left: 3px solid #f56c6c; }
.mc-rowlv--8 td:first-child { border-left: 3px solid #d4a017; }
.mc-rowlv--9 td:first-child { border-left: 3px solid #cf1322; }
.mc-rowlv--10 td:first-child { border-left: 3px solid #722ed1; }
.mc-rowlv--11 td:first-child { border-left: 3px solid #2f54eb; }
.mc-rowlv--12 td:first-child { border-left: 3px solid #262626; }
/* 前三名领奖台(总榜):冠军居中抬升放大 */
.mc-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 18px;
    margin: 10px 0 22px;
}
.mc-podium__item {
    text-align: center;
    padding: 14px 20px 12px;
    border-radius: var(--mc-radius-sm);
    background: var(--mc-card);
    box-shadow: var(--mc-shadow-sm);
    min-width: 140px;
}
.mc-podium__item--1 {
    transform: translateY(-12px);
    padding-top: 18px;
    padding-bottom: 18px;
    border: 1px solid rgba(230, 162, 60, 0.55);
    box-shadow: 0 10px 28px rgba(230, 162, 60, 0.28);
}
.mc-podium__medal {
    font-size: 24px;
    line-height: 1;
}
.mc-podium__avatar {
    border-radius: 50%;
    margin: 8px 0 6px;
}
.mc-podium__name {
    font-weight: 600;
    margin-bottom: 5px;
}
.mc-podium__xp {
    margin-top: 5px;
    font-size: 12px;
    color: var(--mc-text-3);
}
/* 段位头像框:段位色圆环;传说(Lv8)金色呼吸光晕 */
.mc-avf {
    display: inline-block;
    border-radius: 50%;
    padding: 2px;
    line-height: 0;
    vertical-align: middle;
    margin-right: 2px;
}
.mc-avf img {
    display: block;
    border-radius: 50%;
    margin: 0;
}
.mc-avf--1 { background: #8a919f; }
.mc-avf--2 { background: #52c41a; }
.mc-avf--3 { background: #13c2c2; }
.mc-avf--4 { background: #3498db; }
.mc-avf--5 { background: #9d4dcf; }
.mc-avf--6 { background: #e6a23c; }
.mc-avf--7 { background: #f56c6c; }
.mc-avf--8 {
    background: linear-gradient(135deg, #b8860b, #ffd700);
    animation: mcAvfGlow 1.6s ease-in-out infinite;
}
/* Lv9~12 头像框(2026-09-01):9~11 静态渐变环,不朽(Lv12)黑金环+金色呼吸光晕 */
.mc-avf--9 { background: linear-gradient(135deg, #a8071a, #ff7875); }
.mc-avf--10 { background: linear-gradient(135deg, #531dab, #b37feb); }
.mc-avf--11 { background: linear-gradient(135deg, #10239e, #85a5ff); }
.mc-avf--12 {
    background: linear-gradient(135deg, #000, #434343 55%, #b8860b);
    animation: mcAvfGlow 1.6s ease-in-out infinite;
}
@keyframes mcAvfGlow {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(212, 160, 23, 0.45); }
    50% { box-shadow: 0 0 12px 4px rgba(255, 215, 0, 0.85); }
}
.mc-podium .mc-avf { padding: 3px; }
/* 我的名次悬浮卡:右下角固定,点标题栏折叠;窄屏隐藏防遮挡 */
.mc-me {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 900;
    width: 210px;
    background: var(--mc-card);
    border: 1px solid var(--mc-border-soft);
    border-radius: var(--mc-radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}
.mc-me__head {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mc-text-2);
    border-bottom: 1px solid var(--mc-border-soft);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.mc-me__body { padding: 10px 12px 12px; }
.mc-me__rank {
    font-size: 22px;
    font-weight: 700;
    color: var(--mc-primary);
    margin-bottom: 4px;
}
.mc-me__rank--none {
    font-size: 13px;
    font-weight: 400;
    color: var(--mc-text-3);
}
.mc-me__xp {
    margin-top: 6px;
    font-size: 12px;
    color: var(--mc-text-3);
}
.mc-lv-prog--me { display: block; width: 100%; margin: 4px 0 0; }
.mc-me__gap {
    margin-top: 8px;
    font-size: 12px;
    color: var(--mc-text-2);
}
@media (max-width: 768px) {
    .mc-me { display: none; }
}
/* 赛季结算海报弹窗:金色海报 + 弹出动画,按钮关闭并记 localStorage */
.mc-poster-mask {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mc-poster {
    text-align: center;
    padding: 34px 44px 28px;
    border-radius: 16px;
    background: linear-gradient(160deg, #fff7e0, #ffe9b8);
    color: #7a4d00;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: mcPosterPop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
    max-width: 86vw;
}
@keyframes mcPosterPop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.mc-poster__emoji { font-size: 44px; line-height: 1; }
.mc-poster__title {
    font-size: 15px;
    letter-spacing: 6px;
    opacity: 0.75;
    margin-top: 8px;
}
.mc-poster__season {
    font-size: 20px;
    font-weight: 700;
    margin-top: 8px;
}
.mc-poster__rank {
    font-size: 30px;
    font-weight: 800;
    margin-top: 10px;
}
.mc-poster__beans {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #b8860b;
}
.mc-poster__btn {
    margin-top: 18px;
    padding: 8px 26px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #e6a23c, #d48806);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mc-poster__btn:hover { filter: brightness(1.06); }
/* 徽章动效体系(2026-08-24,程老师:难获得的徽章要发光且风格各异):
   gold 金光+白流光 / frost 冰蓝流光 / violet 紫金流光 / rainbow 彩虹色相环 / flame 火焰呼吸 / rare 蓝光呼吸;
   排行榜 20px 图标(.mc-badge-ico)与徽章墙 44px 图标(.mc-badge__icon)共用 */
.mc-badge-ico[class*="mc-fx-"],
.mc-badge__icon[class*="mc-fx-"],
.mc-badge__preview-icon[class*="mc-fx-"] {
    position: relative;
    overflow: hidden;
}
.mc-fx-gold::after, .mc-fx-frost::after, .mc-fx-violet::after {
    content: '';
    position: absolute;
    top: -40%;
    left: -70%;
    width: 45%;
    height: 180%;
    transform: skewX(-20deg);
    animation: mcFxShine 2.4s ease-in-out infinite;
}
.mc-fx-gold::after { background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.8), transparent); }
.mc-fx-frost::after { background: linear-gradient(105deg, transparent, rgba(190, 225, 255, 0.9), transparent); }
.mc-fx-violet::after { background: linear-gradient(105deg, transparent, rgba(230, 200, 255, 0.85), transparent); }
.mc-fx-gold { animation: mcFxGold 1.8s ease-in-out infinite; }
.mc-fx-frost { animation: mcFxFrost 2.4s ease-in-out infinite; }
.mc-fx-violet { animation: mcFxViolet 2.2s ease-in-out infinite; }
.mc-fx-rainbow {
    box-shadow: 0 0 6px 2px rgba(246, 194, 68, 0.5);
    animation: mcFxRainbow 3s linear infinite;
}
.mc-fx-flame { animation: mcFxFlame 1.1s ease-in-out infinite; }
.mc-fx-rare { animation: mcFxRare 2.2s ease-in-out infinite; }
.mc-fx-epic { animation: mcFxEpic 2s ease-in-out infinite; }
@keyframes mcFxShine {
    0% { left: -70%; }
    55%, 100% { left: 140%; }
}
@keyframes mcFxGold {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(246, 194, 68, 0.55); }
    50% { box-shadow: 0 0 10px 3px rgba(246, 194, 68, 0.95); }
}
@keyframes mcFxFrost {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(91, 143, 249, 0.4); }
    50% { box-shadow: 0 0 10px 3px rgba(140, 190, 255, 0.9); }
}
@keyframes mcFxViolet {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(146, 84, 222, 0.45); }
    50% { box-shadow: 0 0 10px 3px rgba(180, 120, 255, 0.9); }
}
@keyframes mcFxRainbow {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}
@keyframes mcFxFlame {
    0%, 100% { box-shadow: 0 0 4px 1px rgba(250, 84, 28, 0.55); transform: scale(1); }
    45% { box-shadow: 0 0 12px 4px rgba(255, 120, 40, 0.95); transform: scale(1.08); }
    70% { box-shadow: 0 0 7px 2px rgba(250, 84, 28, 0.7); transform: scale(1); }
}
@keyframes mcFxRare {
    0%, 100% { box-shadow: 0 0 2px 1px rgba(100, 160, 255, 0.25); }
    50% { box-shadow: 0 0 7px 2px rgba(100, 160, 255, 0.6); }
}
@keyframes mcFxEpic {
    0%, 100% { box-shadow: 0 0 3px 1px rgba(146, 84, 222, 0.4); }
    50% { box-shadow: 0 0 9px 3px rgba(146, 84, 222, 0.85); }
}
/* 徽章墙:四档角标(基本/稀有/史诗/传说,未获得也显示,让用户知道有高阶徽章可拿)与档位光边 */
.mc-badge__tier {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.7;
    z-index: 1;
}
.mc-badge__tier--legend { background: linear-gradient(90deg, #f6c244, #e6a23c); color: #5c3a00; }
.mc-badge__tier--epic { background: linear-gradient(90deg, #b37feb, #722ed1); color: #fff; }
.mc-badge__tier--rare { background: linear-gradient(90deg, #91caff, #5b8ff9); color: #fff; }
.mc-badge__tier--basic { background: #f0f0f0; color: #8c8c8c; }
html.theme--dark .mc-badge__tier--basic { background: #3a3a3a; color: #a6a6a6; }
.mc-badge--legend.owned { box-shadow: 0 0 0 1px rgba(246, 194, 68, 0.55), 0 6px 20px rgba(246, 194, 68, 0.35); }
.mc-badge--legend.locked { box-shadow: 0 0 0 1px rgba(246, 194, 68, 0.35); }
.mc-badge--epic.owned { box-shadow: 0 0 0 1px rgba(146, 84, 222, 0.5), 0 5px 16px rgba(146, 84, 222, 0.3); }
.mc-badge--epic.locked { box-shadow: 0 0 0 1px rgba(146, 84, 222, 0.3); }
.mc-badge--rare.owned { box-shadow: 0 0 0 1px rgba(100, 160, 255, 0.4), 0 4px 14px rgba(100, 160, 255, 0.25); }
.mc-badge--rare.locked { box-shadow: 0 0 0 1px rgba(100, 160, 255, 0.25); }
/* 排行榜个性简介列(参考 oi-rank) */
.mc-bio {
    font-size: 12px;
    color: var(--mc-text-3);
}
/* 排行榜排版(2026-08-24):colgroup 定宽——名次列收窄,用户/简介列弹性;
   用户列与等级列单行不折行(徽章图标/段位芯片不再掉第二行,行高压回一行) */
.mc-ranking-table .mc-col-rank { width: 52px; }
.mc-ranking-table .mc-col-level { width: 210px; }
.mc-ranking-table .mc-col-xp { width: 76px; }
.mc-ranking-table .mc-col-ac { width: 96px; }
.mc-ranking-table .mc-col-dist { width: 170px; }
.mc-ranking-table td:nth-child(2),
.mc-ranking-table td:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 简介点击展开/收起:短/全文切换,全文允许折行 */
.mc-bio--toggle { cursor: pointer; }
.mc-bio__full { white-space: normal; }
/* 榜单标题:金色渐变字 + 副标题 */
.mc-rank-hero {
    background: linear-gradient(90deg, #d48806, #f6c244 55%, #e6a23c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mc-rank-hero__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--mc-text-3);
    font-weight: 400;
}
/* 称号芯片:用户最高优先级徽章名(参考 oi-rank「神秘商人」),用徽章自身配色 */
.mc-title-chip {
    display: inline-block;
    padding: 0 6px;
    margin: 0 2px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}
/* 名字按段位着色(游戏排行榜式,暗色主题下用亮色变体) */
.mc-name { font-weight: 600; }
/* 双类选择器:管理员视角名字是 <a> 链接,需压过 theme.css 的 html.theme--light body a 全局链接色 */
.mc-name.mc-name--2 { color: #389e0d; }
.mc-name.mc-name--3 { color: #08979c; }
.mc-name.mc-name--4 { color: #1d39c4; }
.mc-name.mc-name--5 { color: #722ed1; }
.mc-name.mc-name--6 { color: #d48806; }
.mc-name.mc-name--7 { color: #cf1322; }
.mc-name.mc-name--8 { color: #b8860b; text-shadow: 0 0 6px rgba(255, 215, 0, 0.35); }
/* Lv9~12 名字着色(2026-09-01):与段位芯片同色系,12 黑金 */
.mc-name.mc-name--9 { color: #cf1322; }
.mc-name.mc-name--10 { color: #9e1068; }
.mc-name.mc-name--11 { color: #10239e; }
.mc-name.mc-name--12 { color: #262626; text-shadow: 0 0 6px rgba(255, 215, 0, 0.55); }
html.theme--dark .mc-name.mc-name--2 { color: #95de64; }
html.theme--dark .mc-name.mc-name--3 { color: #36cfc9; }
html.theme--dark .mc-name.mc-name--4 { color: #85a5ff; }
html.theme--dark .mc-name.mc-name--5 { color: #b37feb; }
html.theme--dark .mc-name.mc-name--6 { color: #ffc53d; }
html.theme--dark .mc-name.mc-name--7 { color: #ff7875; }
html.theme--dark .mc-name.mc-name--8 { color: #ffd700; }
html.theme--dark .mc-name.mc-name--9 { color: #ff7875; }
html.theme--dark .mc-name.mc-name--10 { color: #ff85c0; }
html.theme--dark .mc-name.mc-name--11 { color: #adc6ff; }
html.theme--dark .mc-name.mc-name--12 { color: #ffe58f; text-shadow: 0 0 6px rgba(255, 215, 0, 0.45); }
/* 难度分布图例 */
.mc-diff-legend {
    margin-top: 10px;
    font-size: 12px;
    color: var(--mc-text-3);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}
.mc-diff-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.mc-diff-legend__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
}
/* 班级筛选下拉(§4.4) */
.mc-cls-form {
    margin: 0;
}
.mc-cls-select {
    padding: 4px 8px;
    border: 1px solid var(--mc-border-soft);
    border-radius: var(--mc-radius-sm);
    background: var(--mc-card);
    font-size: 13px;
    color: var(--mc-text-2);
}
/* 难度分布彩条(§4.4):洛谷式难度配色,令牌外色值局部定义;
   2026-08-18 对齐全站统一口径(mc-brand mc_difficulty.html / brand.css .mc-diff-tag):
   0 未评定灰,1-7 红橙黄绿青蓝紫,8 及以上 NOI 档黑(#0e1d69) */
.mc-diff-bar {
    display: flex;
    width: 120px;
    height: 10px;
    border-radius: var(--mc-radius-pill);
    overflow: hidden;
    background: #f0f1f3;
}
.mc-diff-bar__seg {
    height: 100%;
}
.mc-diff-empty {
    color: var(--mc-text-3);
}
.mc-diff--0 { background: #bfbfbf; }
.mc-diff--1 { background: #fe4c61; }
.mc-diff--2 { background: #f39c11; }
.mc-diff--3 { background: #ffc116; }
.mc-diff--4 { background: #52c41a; }
.mc-diff--5 { background: #13c2c2; }
.mc-diff--6 { background: #3498db; }
.mc-diff--7 { background: #9d4dcf; }
.mc-diff--8 { background: #0e1d69; }
.mc-diff--9 { background: #0e1d69; }
.mc-diff--10 { background: #0e1d69; }

/* ---- 移动端适配:表格横向滚动 + 难度条最小宽度 ---- */
.table-container {
    overflow-x: auto;
}
.table-container .data-table {
    min-width: 560px;
}
.mc-diff-bar {
    min-width: 120px;
}

/* ---- 排行榜"我的名次"(§4.4):本人行主色浅底高亮(浅底令牌外,局部定义) ---- */
.data-table tr.me > td {
    background: #eef2ff;
}
.me-rank > td {
    font-weight: 600;
    color: var(--mc-primary);
}

/* ---- AC 小店(2026-08-27 游戏化改版:品牌蓝钱包横幅 + 游戏商城风商品卡)---- */
/* hero 渐变配方同首页 mc-hero(brand.css),keyframes 自持一份(mcShopDrift),不跨插件引用 */
.mc-shop-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 18px 22px;
    margin-bottom: 16px;
    border-radius: var(--mc-radius-lg);
    overflow: hidden;
    color: #eef1ff;
    background:
        radial-gradient(400px 180px at 88% -20%, rgba(255, 255, 255, .22), transparent 70%),
        radial-gradient(360px 200px at 4% 115%, rgba(246, 194, 68, .32), transparent 70%),
        linear-gradient(115deg, #2a3f9e, var(--mc-primary) 55%, #5b6cff);
    background-size: 140% 140%, 140% 140%, 100% 100%;
    animation: mcShopDrift 14s ease-in-out infinite alternate;
}
@keyframes mcShopDrift {
    from { background-position: 0% 0%, 0% 100%, 0 0; }
    to { background-position: 70% 45%, 45% 55%, 0 0; }
}
.mc-shop-hero__title { font-size: 18px; font-weight: 700; }
.mc-shop-hero__sub { margin-top: 3px; font-size: 12px; color: rgba(238, 241, 255, .72); }
.mc-shop-hero__wallet {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
}
.mc-shop-hero__wallet-icon { font-size: 26px; }
.mc-shop-hero__wallet-info { display: flex; flex-direction: column; line-height: 1.15; }
.mc-shop-hero__wallet-num {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, #ffffff, #ffd166);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mc-shop-hero__wallet-label { font-size: 11px; color: rgba(238, 241, 255, .65); }
.mc-goods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
    gap: 16px;
}
.mc-goods-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: var(--mc-card);
    border: 1px solid var(--mc-border-soft);
    border-radius: var(--mc-radius-lg);
    box-shadow: var(--mc-shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.mc-goods-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mc-shadow-md);
    border-color: var(--mc-primary);
}
.mc-goods-card--out { opacity: .72; }
.mc-goods-card__stage {
    position: relative;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--mc-radius);
    background:
        radial-gradient(120px 60px at 50% 118%, rgba(246, 194, 68, .2), transparent 70%),
        linear-gradient(160deg, var(--mc-primary-soft), rgba(91, 143, 249, .06));
    overflow: hidden;
}
.mc-goods-card__emoji {
    font-size: 46px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .18));
    transition: transform .18s ease;
}
.mc-goods-card:hover .mc-goods-card__emoji { transform: scale(1.12) rotate(-4deg); }
.mc-goods-card__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.mc-goods-card__flag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.8;
    z-index: 1;
}
.mc-goods-card__flag--low { background: linear-gradient(90deg, #ffd591, #ffa940); color: #5c3a00; }
.mc-goods-card__flag--out { background: rgba(20, 22, 35, .55); color: #fff; }
.mc-goods-card__name {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc-goods-card__desc {
    flex: 1;
    font-size: 12px;
    color: var(--mc-text-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.mc-goods-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mc-goods-card__price {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(246, 194, 68, .16), rgba(246, 194, 68, .07));
    border: 1px solid rgba(246, 194, 68, .35);
    color: var(--mc-gold);
    font-weight: 700;
    font-size: 13px;
}
.mc-goods-card__stock { font-size: 11px; color: var(--mc-text-3); }
.mc-goods-card form { margin: 0; }
.mc-goods-card__btn {
    width: 100%;
    margin: 0;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, var(--mc-primary), #5b6cff);
    transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
.mc-goods-card__btn--go:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(91, 108, 255, .4);
    transform: translateY(-1px);
}
.mc-goods-card__btn[disabled] {
    background: var(--mc-border-soft);
    color: var(--mc-text-3);
    cursor: not-allowed;
    box-shadow: none;
}
.mc-shop-error {
    color: var(--mc-danger);
    font-weight: 600;
}
.mc-shop-empty { text-align: center; padding: 36px 0 28px; color: var(--mc-text-3); }
.mc-shop-empty__emoji { font-size: 44px; margin-bottom: 6px; }
/* 我的兑换:行式列表 + 状态药丸(管理页订单状态同款 chip) */
.mc-orders__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
}
.mc-orders__row + .mc-orders__row { border-top: 1px dashed var(--mc-border-soft); }
.mc-orders__name { font-size: 13px; font-weight: 600; }
.mc-orders__meta { font-size: 11px; color: var(--mc-text-3); }
.mc-order-chip {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
    white-space: nowrap;
}
.mc-order-chip--pending { background: rgba(230, 162, 60, .14); color: var(--mc-gold); }
.mc-order-chip--done { background: rgba(82, 196, 26, .12); color: var(--mc-success); }

/* ---- 发豆页班级成员勾选器 ---- */
.mc-cls-group {
    margin: 0 0 10px;
    padding: 8px 12px;
    border: 1px solid var(--mc-border-soft);
    border-radius: var(--mc-radius-sm);
}
.mc-cls-group legend {
    padding: 0 6px;
    font-size: 13px;
}
.mc-cls-member {
    display: inline-block;
    margin: 2px 12px 2px 0;
    font-weight: 400;
}

/* ---- 等级卡 / 每周挑战(v2)---- */
.mc-level-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--mc-primary);
}
.mc-level-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--mc-text-3);
}
.mc-level-block {
    margin-bottom: 14px;
}
.mc-level-block .mc-goal-bar {
    max-width: 320px;
}
/* 小店管理操作列:保存/删除两个按钮不折行不挤压(此前删除钮被挤成省略号) */
.mc-goods-actions { white-space: nowrap; min-width: 130px; }
.mc-goods-actions .button { margin-right: 6px; }

/* ---- 做题趋势热度图(成长中心,2026-08-26;2026-08-27 扩为一整年 + 格子流式铺满卡宽)---- */
.mc-heat-header .section__title { margin-bottom: 0; }
.mc-heat-summary {
    float: right;
    font-size: 13px;
    color: var(--mc-text-3);
    line-height: 28px;
}
.mc-heat-scroll { overflow-x: auto; padding-bottom: 2px; width: 100%; /* 必须显式定宽:否则 overflow-x 与内部 aspect-ratio 流式格子形成循环尺寸,Chrome 按 shrink-to-fit 收缩 */ }
.mc-heat { min-width: 620px; }
.mc-heat__row { display: flex; gap: 8px; align-items: stretch; }
.mc-heat__dow {
    width: 18px;
    flex: none;
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    gap: 4px;
}
.mc-heat__dow span {
    font-size: 10px;
    line-height: 1;
    color: var(--mc-text-3);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mc-heat__grid {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-rows: repeat(7, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
}
.mc-heat__months {
    margin: 6px 0 0 26px; /* 与格子区左缘对齐(周标签列 18px + 间距 8px) */
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    font-size: 11px;
    line-height: 14px;
    color: var(--mc-text-3);
}
.mc-heat__months span { white-space: nowrap; overflow: visible; }
.mc-heat__cell {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20%;
    background: #ebedf0;
}
.mc-heat__cell:hover { box-shadow: 0 0 0 1px var(--mc-text-3); }
.mc-heat__cell--1 { background: #fde68a; }
.mc-heat__cell--2 { background: #fcd34d; }
.mc-heat__cell--3 { background: #fbbf24; }
.mc-heat__cell--4 { background: #f59e0b; }
.mc-heat__cell.future { background: transparent; box-shadow: inset 0 0 0 1px #ebedf0; }
.mc-heat__legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--mc-text-3);
}
.mc-heat__legend .mc-heat__cell { display: inline-block; width: 12px; height: 12px; aspect-ratio: auto; border-radius: 3px; vertical-align: -2px; margin-right: 2px; }
html.theme--dark .mc-heat__cell--0 { background: rgba(255, 255, 255, .09); }
html.theme--dark .mc-heat__cell.future { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }

/* 徽章悬停特效预览小窗(2026-09-02,纯 CSS 无 JS):
   悬停任意徽章(含未获得)在上方弹出预览卡,大号图标持续播放该徽章特效动画;
   未获得徽章 opacity .6 会压暗子元素,悬停时整卡提亮(opacity:1)保证预览可读 */
.mc-badge.locked:hover { opacity: 1; }
.mc-badge__preview {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translate(-50%, 6px);
    width: 180px;
    padding: 14px 12px 12px;
    border-radius: var(--mc-radius-lg);
    background: var(--mc-card);
    border: 1px solid var(--mc-border-soft);
    box-shadow: var(--mc-shadow-lg);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 40;
}
.mc-badge__preview::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--mc-card);
    filter: drop-shadow(0 1px 0 var(--mc-border-soft));
}
.mc-badge:hover .mc-badge__preview {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.mc-badge__preview-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: var(--mc-primary-soft);
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mc-badge__preview-name { font-weight: 600; font-size: 14px; color: var(--mc-text); }
.mc-badge__preview .mc-badge__tier {
    position: static;
    display: inline-block;
    margin-left: 6px;
    vertical-align: 1px;
}
.mc-badge__preview-desc { margin-top: 4px; font-size: 12px; color: var(--mc-text-2); }
.mc-badge__preview-status { margin-top: 6px; font-size: 11px; color: var(--mc-text-3); }
@media (prefers-reduced-motion: reduce) {
    .mc-badge__preview { transition: none; }
}
