/**
 * 用户中心页面样式（page-template-page-user-center 模板专用）
 *
 * 视觉与首页 home-jidi.css 的毛玻璃卡片风格保持统一：
 * - 同款 14px 圆角、半透明白毛玻璃（backdrop-filter blur + saturate）+ 白色高光描边
 * - 页面背景复用首页的 radial 光晕 + 44px 格子线纹理
 * - 暗色模式通过 [data-theme="dark"] 覆盖（面板底 rgba(15,23,42,0.5)）
 * - 响应式断点沿用主题习惯：1100px / 760px / 520px
 *
 * 颜色优先引用主题根 style.css 的 CSS 变量并带回退值；
 * checkin 卡片（.checkin-card/.checkin-btn 等）样式已在 style.css 全局定义，此处不重复。
 * 注意：.jidi-card 系列样式从 home-jidi.css 复制并以 .uc-page 作作用域前缀
 * （home-jidi.css 仅在首页加载，用户中心页必须自带一份）。
 */

/* ---------- 页面背景：radial 光晕 ×3 + 两层 44px 格子线（与首页同款） ---------- */

body.page-template-page-user-center .bg-decoration {
    background:
        radial-gradient(900px 420px at 50% -8%, rgba(37, 99, 235, 0.14), transparent 60%),
        radial-gradient(640px 320px at 12% 18%, rgba(99, 102, 241, 0.08), transparent 62%),
        radial-gradient(520px 280px at 88% 12%, rgba(14, 165, 233, 0.08), transparent 65%),
        linear-gradient(rgba(15, 23, 42, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.09) 1px, transparent 1px),
        #f5f7fb;
    background-size:
        auto,
        auto,
        auto,
        44px 44px,
        44px 44px,
        auto;
    background-position: center top, left top, right top, center top, center top, center;
    -webkit-mask-image: radial-gradient(140% 90% at 50% 0%, #000 35%, rgba(0, 0, 0, 0.92) 70%, #000 100%);
    mask-image: radial-gradient(140% 90% at 50% 0%, #000 35%, rgba(0, 0, 0, 0.92) 70%, #000 100%);
}

[data-theme="dark"] body.page-template-page-user-center .bg-decoration {
    background:
        radial-gradient(900px 420px at 50% -10%, rgba(59, 130, 246, 0.22), transparent 58%),
        radial-gradient(640px 320px at 10% 20%, rgba(99, 102, 241, 0.12), transparent 62%),
        radial-gradient(520px 280px at 90% 14%, rgba(56, 189, 248, 0.10), transparent 65%),
        linear-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
        #0b1220;
    background-size:
        auto,
        auto,
        auto,
        44px 44px,
        44px 44px,
        auto;
    background-position: center top, left top, right top, center top, center top, center;
}

/* ---------- 外壳 ---------- */

.uc-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: calc(var(--nav-height, 72px) + 20px) clamp(14px, 3vw, 32px) 40px;
}

/* ---------- 毛玻璃面板（面板 / Hero / 登录提示卡共用） ---------- */

.uc-panel,
.uc-hero,
.uc-login-required {
    background: rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    box-shadow: 0 10px 34px -6px rgba(2, 6, 23, 0.12);
}

[data-theme="dark"] .uc-panel,
[data-theme="dark"] .uc-hero,
[data-theme="dark"] .uc-login-required {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 10px 34px -6px rgba(0, 0, 0, 0.4);
}

.uc-panel {
    padding: 18px 20px 20px;
}

.uc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.uc-panel-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.uc-panel-title svg {
    flex: none;
    color: var(--primary, #2563eb);
}

.uc-empty {
    padding: 30px 0;
    font-size: 0.86rem;
    text-align: center;
    color: var(--text-muted, #64748b);
}

/* ---------- 未登录提示大卡片 ---------- */

.uc-login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    text-align: center;
}

.uc-login-required .uc-login-icon,
.uc-login-required > svg {
    font-size: 46px;
    line-height: 1;
    color: var(--primary, #2563eb);
}

.uc-login-required h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
}

.uc-login-required p {
    max-width: 420px;
    font-size: 0.88rem;
    color: var(--text-muted, #64748b);
}

.uc-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    padding: 11px 34px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary, #2563eb), var(--primary-hover, #1d4ed8));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 22px -8px rgba(37, 99, 235, 0.6);
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.uc-login-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -8px rgba(37, 99, 235, 0.65);
}

/* ---------- 顶部用户信息 Hero ---------- */

.uc-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
}

.uc-avatar {
    flex: none;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef1f5;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px -8px rgba(2, 6, 23, 0.3);
}

.uc-hero-info {
    flex: 1 1 auto;
    min-width: 0;
}

.uc-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uc-username {
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
}

.uc-level {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.uc-level-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary, #2563eb), #7c3aed);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
    box-shadow: 0 6px 14px -6px rgba(37, 99, 235, 0.7);
}

.uc-level-bar {
    width: 200px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.25);
    overflow: hidden;
}

.uc-level-bar i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary, #2563eb), #7c3aed);
    transition: width 0.4s ease;
}

.uc-level-points {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}

/* ---------- 统计卡一行（五张，窄屏换行） ---------- */

.uc-stats-row {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.uc-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1 1 0;
    min-width: 120px;
    padding: 14px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 26px -8px rgba(2, 6, 23, 0.1);
}

[data-theme="dark"] .uc-stat-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 8px 26px -8px rgba(0, 0, 0, 0.4);
}

.uc-stat-card b {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main, #0f172a);
    line-height: 1.1;
}

.uc-stat-card i {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
}

/* 高亮变体：连续签到等关键数字用橙色 */
.uc-stat-card.is-hl b,
.uc-stat-card b.is-hl {
    color: #f97316;
}

/* ---------- 两栏主布局 ---------- */

.uc-main {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.uc-col-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.uc-col-side {
    flex: 0 0 300px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------- 我的收藏：卡片网格（复用 .jidi-card，作用域限定在 .uc-page） ---------- */

.uc-fav-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.uc-page .jidi-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    min-width: 0;
}

.uc-page .jidi-card-cover {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f5;
}

[data-theme="dark"] .uc-page .jidi-card-cover {
    background: #1e293b;
}

.uc-page .jidi-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.uc-page .jidi-card:hover .jidi-card-cover img {
    transform: scale(1.05);
}

.uc-page .jidi-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uc-page .jidi-card:hover .jidi-card-title {
    color: var(--primary, #2563eb);
}

.uc-page .jidi-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.uc-page .jidi-card-version {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary, #2563eb);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.uc-page .jidi-card-size {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-muted, #94a3b8);
}

/* 移除收藏：小号幽灵按钮，hover 变红 */
.uc-fav-remove {
    align-self: flex-start;
    padding: 4px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, #64748b);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.uc-fav-remove:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.3);
}

/* ---------- 消息列表 ---------- */

.uc-msg-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.uc-msg-list li + li {
    border-top: 1px dashed var(--border, #e2e8f0);
}

.uc-msg-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 0;
}

.uc-msg-dot {
    flex: none;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: transparent;
}

.uc-msg-dot.is-unread,
.uc-msg-item.is-unread .uc-msg-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.uc-msg-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.uc-msg-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.uc-msg-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uc-msg-item.is-unread .uc-msg-title,
.uc-msg-title.is-unread {
    font-weight: 700;
}

.uc-msg-content {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted, #64748b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uc-msg-item time {
    flex: none;
    font-size: 0.7rem;
    color: #a5b0bf;
    white-space: nowrap;
}

/* 全部已读：小幽灵按钮，蓝色 hover */
.uc-msg-readall {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.uc-msg-readall:hover {
    color: var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
}

/* ---------- 账号信息列表 + 退出登录 ---------- */

.uc-account-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.uc-account-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
}

.uc-account-list li + li {
    border-top: 1px dashed var(--border, #e2e8f0);
}

.uc-account-list span {
    flex: none;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

.uc-account-list b {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main, #0f172a);
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
}

.uc-logout {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: 10px;
    background: transparent;
    color: #f43f5e;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.uc-logout:hover {
    background: rgba(244, 63, 94, 0.1);
    box-shadow: 0 8px 18px -10px rgba(244, 63, 94, 0.5);
}

/* ---------- 工具类 ---------- */

.hidden {
    display: none !important;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
    .uc-main {
        flex-direction: column;
    }

    .uc-col-side {
        width: 100%;
        flex: 1 1 auto;
    }
}

@media (max-width: 760px) {
    .uc-page {
        padding-top: calc(var(--nav-height, 72px) + 12px);
    }

    .uc-panel,
    .uc-hero,
    .uc-login-required {
        padding: 14px 14px 16px;
    }

    .uc-login-required {
        padding: 44px 16px;
    }

    .uc-hero {
        gap: 14px;
    }

    .uc-fav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .uc-stats-row {
        gap: 10px;
        margin: 16px 0;
    }

    .uc-stat-card {
        min-width: 96px;
        padding: 12px 8px;
    }

    .uc-level-bar {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .uc-fav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 8px;
    }

    .uc-avatar {
        width: 64px;
        height: 64px;
        border-width: 2px;
    }

    .uc-name {
        font-size: 1.15rem;
    }

    .uc-stat-card b {
        font-size: 1.05rem;
    }

    .uc-stat-card i {
        font-size: 0.66rem;
    }
}

/* ---------- 首页主题切换面板 ---------- */

#uc-home-theme .uc-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uc-theme-current {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}

.uc-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.uc-theme-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.uc-theme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(2, 6, 23, 0.16);
}

.uc-theme-card.is-active {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .uc-theme-card {
    background: rgba(15, 23, 42, 0.5);
}

.uc-theme-preview {
    display: block;
    width: 100%;
    max-height: 96px;
    aspect-ratio: 16 / 7;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #eef1f6;
}

.uc-theme-preview img {
    width: 100%;
    height: 100%;
    min-height: 96px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.uc-theme-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main, #0f172a);
}

.uc-theme-desc {
    font-size: 0.76rem;
    color: var(--text-muted, #64748b);
}

.uc-theme-check {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--primary, #2563eb);
    color: #fff;
    font-size: 0.72rem;
}

.uc-theme-card.is-active .uc-theme-check {
    display: inline-flex;
}

@media (max-width: 520px) {
    .uc-theme-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- 管理员数据面板 ---------- */
#uc-admin-stats {
	overflow-x: hidden;
}
#uc-admin-stats .uc-panel-head {
	align-items: center;
	gap: 12px;
}
#uc-admin-stats .uc-admin-panel-meta {
	font-size: 12px;
	color: var(--text-muted, #6b7280);
}
.uc-admin-layout {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}
.uc-admin-sidebar {
	flex: 0 0 140px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.uc-admin-tab {
	display: block;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--border-color, #e5e7eb);
	border-radius: 10px;
	background: var(--card-bg, #fff);
	color: var(--text-main, #1f2937);
	text-align: left;
	font-size: 14px;
	cursor: pointer;
	transition: all .2s;
	max-width: 100%;
	overflow-wrap: break-word;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.uc-admin-tab:hover {
	border-color: var(--primary, #2563eb);
}
.uc-admin-tab.is-active {
	background: var(--primary, #2563eb);
	border-color: var(--primary, #2563eb);
	color: #fff;
}
.uc-admin-content {
	flex: 1;
	min-width: 0;
	width: 100%;
}
.uc-admin-pane {
	display: none;
}
.uc-admin-pane.is-active {
	display: block;
}
.uc-admin-kpis {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
	gap: 12px;
	margin-bottom: 18px;
}
.uc-admin-kpis .uc-stat-card {
	background: var(--card-bg, #fff);
}
.uc-admin-rank-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 18px 0 10px;
}
.uc-admin-rank-head h3 {
	font-size: 15px;
	font-weight: 600;
	color: var(--text-main, #1f2937);
	margin: 0;
	min-width: 0;
	flex-shrink: 1;
}
.uc-rank-toggle {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}
.uc-rank-btn {
	padding: 5px 12px;
	border: 1px solid var(--border-color, #e5e7eb);
	border-radius: 7px;
	background: var(--card-bg, #fff);
	color: var(--text-main, #1f2937);
	font-size: 12px;
	cursor: pointer;
}
.uc-rank-btn.is-active {
	background: var(--primary, #2563eb);
	border-color: var(--primary, #2563eb);
	color: #fff;
}
.uc-rank-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.uc-rank-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 9px;
	background: var(--card-bg, #fff);
	border: 1px solid var(--border-color, #e5e7eb);
}
.uc-rank-no {
	flex: 0 0 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--primary, #2563eb);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}
.uc-rank-item:nth-child(1) .uc-rank-no { background: #f59e0b; }
.uc-rank-item:nth-child(2) .uc-rank-no { background: #9ca3af; }
.uc-rank-item:nth-child(3) .uc-rank-no { background: #d97706; }
.uc-rank-title {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--text-main, #1f2937);
	text-decoration: none;
}
.uc-rank-title:hover { color: var(--primary, #2563eb); }
.uc-rank-bar {
	flex: 0 0 90px;
	height: 6px;
	border-radius: 3px;
	background: var(--border-color, #e5e7eb);
	overflow: hidden;
}
.uc-rank-bar i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--primary, #2563eb), #60a5fa);
	border-radius: 3px;
}
.uc-rank-count {
	flex: 0 0 auto;
	font-size: 13px;
	color: var(--text-main, #1f2937);
	font-weight: 600;
}
.uc-rank-empty {
	color: var(--text-muted, #9ca3af);
	font-size: 13px;
	padding: 12px;
	text-align: center;
}
.uc-admin-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}
.uc-admin-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 16px;
	border: 1px solid var(--border-color, #e5e7eb);
	border-radius: 10px;
	background: var(--card-bg, #fff);
	color: var(--text-main, #1f2937);
	text-decoration: none;
	font-size: 14px;
	transition: all .2s;
}
.uc-admin-link:hover {
	border-color: var(--primary, #2563eb);
	color: var(--primary, #2563eb);
}
@media (max-width: 760px) {
	.uc-admin-layout {
		flex-direction: column;
	}
	.uc-admin-sidebar {
		flex: 0 0 auto;
		flex-direction: row;
		overflow-x: auto;
		width: 100%;
	}
	.uc-admin-tab {
		flex: 0 0 auto;
	}
	.uc-admin-content {
		width: 100%;
	}
	.uc-admin-kpis {
		grid-template-columns: repeat(2, 1fr);
	}
	.uc-rank-bar {
		flex: 0 0 60px;
	}
	.uc-rank-item {
		flex-wrap: wrap;
	}
	.uc-rank-title {
		max-width: 100%;
	}
}

/* ---------- 移动端边界修复：数据面板把整页撑宽 → 右侧被裁 ----------
 * 实测（390×844 移动视口，Chromium 复现 + 真机 UA）：
 *   1. main.page 是 flex 列容器，而 .uc-page 带 margin:0 auto —— 交叉轴上的
 *      自动外边距会取消 align-self:stretch 的拉伸，于是 .uc-page 走
 *      shrink-to-fit：宽度 = clamp(可用宽度, min-content, max-content)，
 *      被内容的「最小内容宽度」顶到 597px（视口只有 390px）。
 *   2. 顶起最小内容宽度的是数据面板的下载排行：游戏名 .uc-rank-title 是
 *      white-space:nowrap，"…/theHunter: Call of the Wild" 这类长标题的最小
 *      内容宽度就是整串文字的宽度，经 .uc-rank-item → .uc-rank-list →
 *      .uc-admin-content 这一串 flex 链路（min-width:auto）传给 .uc-page。
 *   3. main.page 在 ≤640px 是 overflow-x:hidden：超出的部分既不换行也不出
 *      横向滚动条，直接被裁掉 —— KPI 卡右列、排行条、下载次数全部看不见。
 * 修复：
 *   - 窄屏（≤900px）给 .uc-page 明确宽度（100% + border-box），宽度不再取决于
 *     内容最小宽度。只在窄屏加，是为了让桌面（>900px）保持原来那套
 *    「内容自适应宽度」的栏宽表现，不因这次修手机端顺带动 PC 版；
 *   - 面板内 flex 链路的 min-width:auto 归零，长标题一律走省略号，
 *     不再有「隐形最小宽度」把容器顶宽。
 */
@media (max-width: 900px) {
	.uc-page {
		width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}
}

#uc-admin-stats,
.uc-admin-layout,
.uc-admin-content,
.uc-admin-pane,
.uc-admin-kpis,
.uc-admin-rank-head,
.uc-rank-list,
.uc-rank-item {
	min-width: 0;
}

.uc-rank-item > * {
	min-width: 0;
}

.uc-rank-count {
	white-space: nowrap;
}

/* ---------- 移动端细节适配（窄屏一屏可读，不与上面各断点冲突） ---------- */
@media (max-width: 760px) {
	/* 1) 面板 tab：桌面是竖排 140px 侧栏，窄屏改为「内容宽度横排」——
	 *    原来每个 tab 是 width:100%（=整条容器宽），三个 tab 只能露出一条、
	 *    其余要横滑才能看到；改成按内容宽度后 3 个 tab 在 360px 以上可同屏放下，
	 *    仍保留 overflow-x:auto 作为字体放大/超窄屏的兜底。 */
	.uc-admin-sidebar {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 2px;
	}

	.uc-admin-sidebar::-webkit-scrollbar {
		display: none;
	}

	.uc-admin-tab {
		flex: 0 0 auto;
		width: auto;
		padding: 9px 12px;
		font-size: 13px;
		text-align: center;
	}

	/* 2) 我的数据 5 张统计卡：flex 换行时第二行的卡片会被拉宽（3+2 两部分
	 *    宽度不一致）；改 grid 让所有卡片等宽，第二行留一个空格更整齐。 */
	.uc-stats-row {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.uc-stats-row .uc-stat-card {
		min-width: 0;
	}
}

/* 360px 以下 3 列会挤到 ~95px/张，降为 2 列 */
@media (max-width: 359px) {
	.uc-stats-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
