/* =============================================================
   现代化小程序风格样式表
   主色：紫色渐变  #667eea → #764ba2
   设计语言：玻璃拟态 / 柔和阴影 / 渐变光效 / 流畅动画
   ============================================================= */

/* ===== 设计令牌 ===== */
:root {
    /* 主题色 */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-accent: #ec4899;
    --color-accent-light: #f472b6;

    /* 背景色 */
    --color-bg: #f5f7fb;
    --color-bg-soft: #fafbff;
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;

    /* 文字 */
    --color-text: #1e293b;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-text-on-dark: #ffffff;

    /* 状态 */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;

    /* 边框 */
    --color-border: #eef0f5;
    --color-border-strong: #e2e8f0;

    /* 阴影 */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 24px 60px rgba(102, 126, 234, 0.25);
    --shadow-glow: 0 8px 28px rgba(99, 102, 241, 0.35);

    /* 渐变 */
    --grad-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --grad-primary-soft: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    --grad-pink: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --grad-cyan: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --grad-green: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --grad-orange: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    /* 真正的金黄(偏黄不偏棕,避免和第三名混淆) */
    --grad-gold: linear-gradient(135deg, #ca8a04 0%, #a16207 100%);
    --grad-silver: linear-gradient(135deg, #64748b 0%, #475569 100%);
    /* 深铜(明显比金色偏红棕) */
    --grad-bronze: linear-gradient(135deg, #b45309 0%, #7c2d12 100%);
    --grad-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    /* ===== 公告 / 指令 / 手册 Hero 共用渐变（与首页一致） ===== */
    --grad-news: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 999px;

    /* 全局 focus 样式：
       - 非交互元素（标题/区块/列表等）被自动聚焦时 → 完全不画 outline（彻底解决跳转后蓝框）
       - 真正的可交互元素（a / button / input 等）保留键盘 :focus-visible 视觉反馈（鼠标点击不画） */
    h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
    .hero:focus, .hero-content:focus,
    .hero-title:focus, .hero-eyebrow:focus, .hero-subtitle:focus,
    .news-hero:focus, .news-hero-content:focus,
    .news-hero-title:focus, .news-hero-eyebrow:focus, .news-hero-subtitle:focus,
    section:focus, article:focus, main:focus, aside:focus,
    header:focus, footer:focus, nav:focus, p:focus,
    div:focus, span:focus, li:focus, ul:focus, ol:focus,
    figure:focus, blockquote:focus { outline: none !important; }
    :where(a, button, input, textarea, select, [tabindex]):focus { outline: none; }
    :where(a, button, input, textarea, select, [tabindex]):focus-visible {
        outline: 2px solid var(--color-primary-light, #818cf8);
        outline-offset: 2px;
        border-radius: 4px;
    }

    /* 间距 */
    --topbar-height: 60px;
}

/* ===== 全局基础 ===== */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--color-text);
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(102, 126, 234, 0.12), transparent),
        radial-gradient(ellipse 60% 50% at 100% 50%, rgba(236, 72, 153, 0.08), transparent),
        var(--color-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--color-primary-dark);
}

/* ===== 页面骨架 ===== */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 隐藏 Blazor 自带的错误提示条（仅隐藏，不影响真实异常的日志记录） */
#blazor-error-ui {
    display: none !important;
}

/* ===== 顶部导航 ===== */
.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-xs);
}

.topbar .container {
    height: 100%;
}

.topbar-row {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    gap: 0.6rem;
    transition: transform 0.25s ease;
}
.brand:hover {
    transform: translateY(-1px);
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--grad-primary);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--shadow-glow);
    transition: transform 0.3s ease;
}
.brand-icon-img {
    background: #fff;
    padding: 4px;
    object-fit: contain;
}
.brand-icon-fallback {
    display: none;
}
.brand:hover .brand-icon {
    transform: rotate(-8deg) scale(1.05);
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 0.2rem;
    flex: 1;
    justify-content: flex-end;
}

.main-nav a {
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.main-nav a:hover {
    background: var(--grad-primary-soft);
    color: var(--color-primary-dark);
}
.main-nav a.active {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* 移动端菜单按钮 */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    margin-left: auto;
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 1001;
    flex-shrink: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}
.mobile-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    top: var(--topbar-height);
}

/* 汉堡按钮 → 关闭按钮 X 动画 */
.mobile-toggle.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.open .bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-toggle.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    padding-bottom: 1.5rem;
}

/* ===== 页脚 ===== */
.footer {
    padding: 1.5rem 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

.footer-beian {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.footer-beian a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-beian a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.footer-beian .beian-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 0.25rem;
    vertical-align: -2px;
}

.footer-beian .beian-divider {
    margin: 0 0.5rem;
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* ===== 页面标题 ===== */
.page-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.4rem;
    position: relative;
}
.page-title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
}

/* ===== 按钮增强 ===== */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.5rem 1.15rem;
    transition: all 0.25s ease;
}
.btn-primary {
    background: var(--grad-primary);
    border: none;
    box-shadow: var(--shadow-glow);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--grad-primary);
    filter: brightness(1.08);
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}
.btn-outline-primary {
    color: var(--color-primary-dark);
    border: 1.5px solid var(--color-primary-light);
    background: rgba(99, 102, 241, 0.05);
}
.btn-outline-primary:hover {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.btn-lg {
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
}
.btn-outline-light {
    border-width: 1.5px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.08);
}
.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
}

/* ===== Hero 横幅 ===== */
.hero {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    padding: 2.75rem 2rem 2.25rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--grad-hero);
    color: #fff;
    box-shadow: var(--shadow-xl);
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.hero-bg::before,
.hero-bg::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: float 14s ease-in-out infinite;
}
.hero-bg::before {
    width: 340px;
    height: 340px;
    background: #f093fb;
    top: -100px;
    left: -80px;
}
.hero-bg::after {
    width: 280px;
    height: 280px;
    background: #4facfe;
    bottom: -80px;
    right: -60px;
    animation-delay: -7s;
}
.hero-bg .blob {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(40px);
    animation: float 18s ease-in-out infinite;
}
.hero-bg .blob.b1 { top: 30%; left: 18%; animation-delay: -3s; }
.hero-bg .blob.b2 { top: 60%; right: 22%; animation-delay: -9s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.08); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 2.9rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}
.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.75rem;
    letter-spacing: 0.5px;
}
.hero-actions {
    display: flex;
    gap: 0.85rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== 快捷入口 ===== */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;      /* 与下方公告保持合理节奏，不贴死 */
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.85rem 0.6rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.quick-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: linear-gradient(135deg, transparent 0%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}
.quick-card:hover::before { opacity: 1; }

.qc-icon {
    font-size: 1.4rem;
    margin-bottom: 0.35rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: var(--grad-primary-soft);
    transition: transform 0.3s ease;
}
.quick-card:hover .qc-icon {
    transform: scale(1.08) rotate(-4deg);
}
.qc-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.1rem;
}
.qc-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.qc-1 .qc-icon { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.qc-2 .qc-icon { background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%); }
.qc-3 .qc-icon { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }
.qc-4 .qc-icon { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); }
.qc-1:hover { border-color: #4f46e5; }
.qc-2:hover { border-color: #7c3aed; }
.qc-3:hover { border-color: #dc2626; }
.qc-4:hover { border-color: #059669; }

/* ===== 通用卡片 ===== */
.surface-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.surface-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== 数据统计卡（KPI） ===== */
.stat-card {
    position: relative;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    color: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    isolation: isolate;
}
.stat-card::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    top: -60px;
    right: -50px;
    z-index: -1;
    transition: transform 0.4s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card:hover::before {
    transform: scale(1.2);
}
.stat-card-1 { background: var(--grad-primary); }
.stat-card-2 { background: var(--grad-pink); }
.stat-card-3 { background: var(--grad-cyan); }
.stat-card-4 { background: var(--grad-green); }
.stat-card-5 { background: var(--grad-orange); }

.stat-card-icon {
    font-size: 1.7rem;
    margin-bottom: 0.4rem;
    opacity: 0.95;
}
.stat-label {
    font-size: 0.82rem;
    opacity: 0.92;
    margin-bottom: 0.3rem;
    letter-spacing: 0.5px;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.stat-meta {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    opacity: 0.85;
}

/* ===== 通用卡片样式（覆盖 Bootstrap） ===== */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card-header {
    background: var(--color-bg-soft);
    border-bottom: 1px solid var(--color-border);
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}
.card-body { padding: 1.15rem; }
.card-title { font-weight: 700; }
.card:hover { box-shadow: var(--shadow-md); }

/* ===== 排行榜 ===== */
/* Tab 容器 - 独立浮层,与排名卡片分离 */
.lb-tabbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 0.5rem 0.5rem;
    margin-bottom: 0.25rem;
}

.lb-footer {
    padding: 1.5rem 1rem 0.25rem;
    text-align: center;
    background: transparent;
}

.lb-toolbar {
    padding: 1.15rem 1.25rem;
    background: var(--color-bg-soft);
    border-bottom: 1px solid var(--color-border);
}
.lb-toolbar .form-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.lb-toolbar .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-strong);
    padding: 0.5rem 0.8rem;
    font-size: 0.88rem;
    background-color: #fff;
    background-position: right 0.7rem center;
    transition: all 0.2s ease;
}
.lb-toolbar .form-select:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.lb-table {
    margin: 0;
}
.lb-table thead th {
    background: transparent;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 0.85rem 0.9rem;
}
.lb-table tbody tr {
    transition: background 0.2s ease;
}
.lb-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}
.lb-table td {
    padding: 0.9rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.lb-table tbody tr:last-child td { border-bottom: none; }

.lb-table .rank-cell { width: 70px; }
.lb-table .name-cell {
    font-weight: 600;
    color: var(--color-text);
}
.lb-table .name-cell a {
    color: var(--color-text);
}
.lb-table .name-cell a:hover { color: var(--color-primary); }
.lb-table .meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
}
.lb-table .num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--color-text);
}
.lb-table .num-primary {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* 排名徽章 */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
}
.rank-1 {
    background: var(--grad-gold);
    color: #fff !important;
    border: none;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}
.rank-2 {
    background: var(--grad-silver);
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.4);
}
.rank-3 {
    background: var(--grad-bronze);
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 12px rgba(194, 65, 12, 0.35);
}

.rank-row-1 { background: linear-gradient(90deg, rgba(245, 158, 11, 0.07), transparent 60%) !important; }
.rank-row-2 { background: linear-gradient(90deg, rgba(148, 163, 184, 0.07), transparent 60%) !important; }
.rank-row-3 { background: linear-gradient(90deg, rgba(194, 65, 12, 0.06), transparent 60%) !important; }

/* 职业 / 家族 标签 */
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    font-weight: 500;
}
.tag-pill.tag-profession {
    background: rgba(99, 102, 241, 0.08);
    color: var(--color-primary-dark);
    border-color: rgba(99, 102, 241, 0.15);
}
.tag-pill.tag-family {
    background: rgba(236, 72, 153, 0.08);
    color: var(--color-accent);
    border-color: rgba(236, 72, 153, 0.15);
}

/* 分页 */
.pagination {
    gap: 0.35rem;
}
.pagination .page-item .page-link {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    background: var(--color-surface);
    transition: all 0.2s ease;
}
.pagination .page-item:not(.disabled) .page-link:hover {
    background: var(--grad-primary-soft);
    border-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}
.pagination .page-item.active .page-link {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.pagination .page-item.disabled .page-link {
    background: var(--color-bg);
    color: var(--color-text-muted);
}

/* ===== 首页：最新公告与上方快捷入口的间距收紧 ===== */
.home-news-block {
    margin-top: 0;
    margin-bottom: 0;
    --bs-gutter-x: 0;            /* 去掉 .row 的左右负边距，避免视觉溢出 */
}
.home-news-block .col-12 {
    padding-top: 0;
    padding-bottom: 0;
}

/* ===== 公告 / 指令 / 手册 Hero ===== */
.news-hero {
    background: var(--grad-news);
    border-radius: var(--radius-2xl);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #fff;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}
.news-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 20% 50%, rgba(102, 126, 234, 0.3), transparent),
        radial-gradient(ellipse 50% 60% at 80% 50%, rgba(236, 72, 153, 0.2), transparent);
}
.news-hero-content {
    position: relative;
    z-index: 1;
}
.news-hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.4rem;
}
.news-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 0.4rem;
    letter-spacing: 1px;
}
.news-hero-subtitle {
    font-size: 0.88rem;
    opacity: 0.8;
    margin: 0;
}

/* ===== 公告 ===== */
.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.news-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--grad-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}
.news-card:hover::before { transform: scaleY(1); }

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}
.news-type {
    padding: 0.12rem 0.55rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
}

/* 新闻类型颜色 */
.nt-purple { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.nt-cyan { background: rgba(6, 182, 212, 0.1); color: #0891b2; }
.nt-pink { background: rgba(236, 72, 153, 0.1); color: #db2777; }
.nt-gold { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.nt-warning { background: rgba(245, 158, 11, 0.1); color: #b45309; }
.nt-green { background: rgba(16, 185, 129, 0.1); color: #059669; }
.nt-orange { background: rgba(249, 115, 22, 0.1); color: #c2410c; }

.news-title {
    margin: 0.3rem 0 0.6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}
.news-content {
    color: var(--color-text-secondary);
    line-height: 1.75;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

/* ===== 指令 ===== */
.cmd-search-wrap {
    position: relative;
    margin-top: 0.5rem;
    margin-bottom: 0.7rem;
}
.cmd-search-wrap .form-control {
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    padding: 0.55rem 1rem 0.55rem 2.4rem;
    font-size: 0.88rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
    transition: all 0.25s ease;
}
.cmd-search-wrap .form-control:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-sm);
}
.cmd-search-wrap .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    font-size: 1rem;
}
.search-clear {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-border);
    border: none;
    border-radius: 50%;
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.search-clear:hover {
    background: var(--color-text-muted);
    color: #fff;
}
.badge-clear {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    padding: 0;
    margin-left: 0.2rem;
    vertical-align: middle;
    opacity: 0.7;
}
.badge-clear:hover {
    opacity: 1;
}

/* 指令分区 */
.cmd-section {
    margin-bottom: 0.7rem;
}
.cmd-section-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;          /* 标题明显大于卡片内指令 */
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #fff;
    width: 100%;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.cmd-section-title:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
.cmd-section-title:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}
.cmd-section:not(.is-open) .cmd-section-title {
    margin-bottom: 0;
}
.cs-icon { font-size: 1.1rem; }
.cs-count {
    margin-left: auto;
    font-size: 0.72rem;
    opacity: 0.8;
    font-weight: 500;
}
.cs-toggle {
    font-size: 0.95rem;
    margin-left: 0.4rem;
    opacity: 0.85;
    transition: transform 0.2s ease;
}
.cs-blue { background: var(--grad-cyan); }
.cs-green { background: var(--grad-green); }
.cs-pink { background: var(--grad-pink); }
.cs-cyan { background: linear-gradient(135deg, #22d3ee 0%, #06b6d4 100%); }
.cs-gold { background: var(--grad-gold); }
.cs-purple { background: var(--grad-primary); }
.cs-teal { background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 100%); }
.cs-orange { background: var(--grad-orange); }
.cs-rose { background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%); }
.cs-red { background: linear-gradient(135deg, #f87171 0%, #dc2626 100%); }
.cs-violet { background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%); }
.cs-indigo { background: linear-gradient(135deg, #818cf8 0%, #4f46e5 100%); }
.cs-black { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); }
.cs-yellow { background: linear-gradient(135deg, #fde047 0%, #facc15 100%); }
.cs-amber  { background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%); }
.cs-lime   { background: linear-gradient(135deg, #bef264 0%, #84cc16 100%); }
.cs-fuchsia { background: linear-gradient(135deg, #f0abfc 0%, #c026d3 100%); }
.cs-sky    { background: linear-gradient(135deg, #7dd3fc 0%, #0284c7 100%); }

.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.35rem;
}
.cmd-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.45rem 0.65rem;
    box-shadow: var(--shadow-xs);
    transition: all 0.25s ease;
}
.cmd-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}
.cmd-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.3rem;
    gap: 0.5rem;
}
.cmd-code {
    background: var(--grad-primary-soft);
    color: var(--color-primary-dark);
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius-sm);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;          /* 比标题小，与 desc 同档 */
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.12);
    word-break: break-all;
    line-height: 1.3;
}
.cmd-desc {
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    line-height: 1.45;
}
.cmd-category {
    padding: 0.12rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--color-bg);
    color: var(--color-text-muted);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* ===== 玩家战斗属性网格 ===== */
.combat-grid { gap: 0.75rem; }
.combat-cell {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}
.combat-cell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: var(--color-primary-light);
}
.combat-cell-score {
    background: var(--grad-primary);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-glow);
}
.combat-cell-score:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 14px 38px rgba(99, 102, 241, 0.5);
}
.combat-icon {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    opacity: 0.7;
}
.combat-cell-score .combat-icon { opacity: 0.95; }
.combat-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
    letter-spacing: 0.3px;
}
.combat-cell-score .combat-label { color: rgba(255, 255, 255, 0.92); }
.combat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}
.combat-cell-score .combat-value { color: #fff; font-size: 1.2rem; }

/* ===== 玩家详情 ===== */
.player-hero {
    background: var(--grad-primary);
    border-radius: var(--radius-2xl);
    padding: 1.75rem 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    isolation: isolate;
}
.player-hero::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -140px;
    right: -100px;
    z-index: -1;
}
.player-name {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.player-sub {
    opacity: 0.92;
    margin-top: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.player-sub .pill {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    backdrop-filter: blur(8px);
}

/* ===== 搜索页 ===== */
.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
}
.search-bar .form-control {
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    padding: 0.85rem 1.2rem 0.85rem 2.8rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-xs);
    transition: all 0.25s ease;
}
.search-bar .form-control:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-sm);
}
.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    font-size: 1rem;
}
.search-bar .btn-search {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: var(--radius-full);
    background: var(--grad-primary);
    color: #fff;
    border: none;
    padding: 0.4rem 1.1rem;
    font-weight: 500;
    box-shadow: var(--shadow-glow);
    transition: all 0.25s ease;
}
.search-bar .btn-search:hover {
    filter: brightness(1.08);
    transform: translateY(-50%) scale(1.03);
}
.search-bar .btn-search:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.search-results {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.2s ease;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover {
    background: var(--grad-primary-soft);
}

/* ===== 加载 / 空状态 ===== */
.loading-state, .empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--color-text-muted);
}
.spinner-grow-soft {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--grad-primary);
    margin: 0 auto 0.85rem;
    animation: pulse-soft 1.4s ease-in-out infinite;
    opacity: 0.85;
}
@keyframes pulse-soft {
    0%, 100% { transform: scale(0.85); opacity: 0.55; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ===== 提示徽章（通用） ===== */
.badge-soft {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}
.badge-soft.badge-level {
    background: var(--grad-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.badge-soft.badge-vip {
    background: var(--grad-gold);
    color: #fff;
    border: none;
}
.badge-soft.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border-color: rgba(16, 185, 129, 0.2);
}

/* ===== 职业页面 ===== */
.career-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}
.career-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.career-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.career-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.cc-1::before { background: var(--grad-primary); }
.cc-2::before { background: var(--grad-green); }
.cc-3::before { background: var(--grad-cyan); }
.cc-4::before { background: var(--grad-pink); }
.cc-5::before { background: var(--grad-gold); }
.cc-6::before { background: var(--grad-orange); }
.cc-7::before { background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%); }

.career-badge {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}
.career-type {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}
.career-passive-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 0.2rem;
}
.career-passive-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 0.4rem;
}
.career-passive-desc {
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.career-extra {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.career-tip {
    background: var(--grad-primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    color: var(--color-primary-dark);
    font-size: 0.9rem;
    text-align: center;
}
.career-tip code {
    background: rgba(99, 102, 241, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85em;
}

/* ===== 数据手册页面 ===== */
.hb-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 0.3rem;
    box-shadow: var(--shadow-sm);
}
.hb-tab {
    flex: 1;
    padding: 0.45rem 0.4rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
}
.hb-tab:hover {
    background: var(--grad-primary-soft);
    color: var(--color-primary-dark);
}
.hb-tab.active {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

.hb-section {}
.hb-tip {
    background: var(--grad-primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.hb-sub-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 1.5rem 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
    position: relative;
}
.hb-sub-title::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
}

.hb-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.6rem;
}
.hb-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: all 0.2s ease;
    font-size: 0.88rem;
}
.hb-item:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.hi-name {
    font-weight: 700;
    color: var(--color-text);
}
.hb-item > span:last-child {
    color: var(--color-text-muted);
    font-size: 0.82rem;
}
.hi-god .hi-name { color: var(--color-primary-dark); }
.hi-god {
    border-color: rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.02);
}

.hi-creature .hi-name { font-size: 0.95rem; }
.hi-lore {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-top: 0.2rem;
}
.hi-type-badge {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-full);
    background: var(--grad-primary-soft);
    color: var(--color-primary-dark);
    font-size: 0.68rem;
    font-weight: 600;
}

/* 宝石表格 */
.gem-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.gem-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.gem-table th {
    background: var(--grad-primary);
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
}
.gem-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}
.gem-table tr:last-child td { border-bottom: none; }
.gem-table tbody tr:hover { background: rgba(99, 102, 241, 0.03); }

.gem-note {
    margin-top: 0.6rem;
    padding: 0.45rem 0.75rem;
    background: var(--grad-primary-soft, rgba(99, 102, 241, 0.08));
    border-radius: var(--radius-md);
    color: var(--color-primary-dark, #4f46e5);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* 皮肤网格 */
.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.skin-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}
.skin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.skin-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
}
.sc-4s { border-color: rgba(139, 92, 246, 0.2); }
.sc-3s { border-color: rgba(6, 182, 212, 0.2); }
.sc-2s { border-color: rgba(16, 185, 129, 0.2); }
.sc-1s { border-color: rgba(148, 163, 184, 0.3); }

/* ===== 联系我页面 ===== */
.contact-page {
    max-width: 680px;
    margin: 0 auto;
}
.contact-hero {
    text-align: center;
    margin-bottom: 2rem;
}
.contact-emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.contact-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}
.contact-hero p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
.contact-cards {
    display: grid;
    gap: 1rem;
}
.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}
.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}
.cc-main {
    background: var(--grad-primary);
    border: none;
    color: #fff;
    text-align: center;
}
.cc-main .cc-title,
.cc-main .cc-desc { color: rgba(255, 255, 255, 0.95); }
.cc-main .cc-hint { opacity: 0.7; margin-top: 0.5rem; }
.cc-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.cc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}
.cc-desc {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}
.cc-desc a {
    color: var(--color-primary);
    font-weight: 600;
}

/* ===== 小程序页面 ===== */
.mp-page {
    max-width: 680px;
    margin: 0 auto;
}
.mp-hero {
    text-align: center;
    margin-bottom: 2rem;
    background: var(--grad-primary);
    border-radius: var(--radius-2xl);
    padding: 2.5rem 1.5rem;
    color: #fff;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}
.mp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(255, 255, 255, 0.1), transparent);
}
.mp-icon {
    font-size: 4rem;
    margin-bottom: 0.75rem;
    position: relative;
}
.mp-hero h1 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    position: relative;
}
.mp-hero p {
    opacity: 0.9;
    font-size: 0.95rem;
    margin: 0;
    position: relative;
}

.mp-guide {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.mp-guide-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    text-align: center;
}
.mp-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mp-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.mp-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-glow);
}
.mp-step-content { flex: 1; }
.mp-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}
.mp-step-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}
.mp-step-desc strong { color: var(--color-primary-dark); }

.mp-qr-placeholder {
    text-align: center;
    margin-bottom: 1.5rem;
}
.qr-box {
    display: inline-block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}
.qr-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.qr-placeholder-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}
.qr-image {
    display: block;
    width: 240px;
    height: 240px;
    max-width: 100%;
    margin: 0 auto 1rem;
    border-radius: var(--radius-md);
    -webkit-touch-callout: default;
    -webkit-user-select: auto;
    user-select: auto;
    pointer-events: auto;
}
.qr-tip {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.mp-features {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.mp-feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    text-align: center;
}
.mp-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.mp-feature-item {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    transition: all 0.2s ease;
}
.mp-feature-item:hover {
    background: var(--grad-primary-soft);
    transform: translateY(-2px);
}
.mfi-icon {
    font-size: 1.75rem;
    margin-bottom: 0.4rem;
}
.mfi-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.15rem;
}
.mfi-desc {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* ===== 响应式 ===== */

/* 大平板 */
@media (max-width: 1024px) {
    .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .mp-feature-grid { grid-template-columns: repeat(3, 1fr); }

    .brand-text { font-size: 1.2rem; }
}

/* 平板 */
@media (max-width: 768px) {
    :root { --topbar-height: 56px; }

    .hero { padding: 2rem 1.25rem 1.5rem; }
    .hero-title { font-size: 2.15rem; }
    .hero-eyebrow { font-size: 0.82rem; }
    .hero-subtitle { font-size: 0.88rem; }
    .hero-actions { gap: 0.65rem; }
    .btn-lg { padding: 0.7rem 1.5rem; font-size: 0.9rem; }

    /* 导航 */
    .mobile-toggle {
        display: flex;
        top: 8px;
        right: 12px;
    }
    .main-nav {
        display: none;
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        gap: 0.25rem;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        padding: 0.7rem 1rem;
        border-radius: var(--radius-md);
        font-size: 0.95rem;
    }
    .mobile-backdrop { display: block; }
    /* 移动端也保留品牌名（缩小字号），使用基础渐变色样式 */
    .brand-text {
        display: inline-block;
        font-size: 0.82rem;
        letter-spacing: 1px;
        white-space: nowrap;
    }

    .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .qc-icon { width: 40px; height: 40px; font-size: 1.3rem; }
    .qc-title { font-size: 0.85rem; }
    .qc-desc { font-size: 0.7rem; }

    .stat-value { font-size: 1.5rem; }
    .stat-card { padding: 1.1rem; }
    .stat-card-icon { font-size: 1.4rem; }

    .lb-table thead { display: none; }
    .lb-table, .lb-table tbody, .lb-table tr, .lb-table td {
        display: block;
        width: 100%;
    }
    .lb-table tr {
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        margin-bottom: 0.6rem;
        padding: 0.75rem 0.9rem;
        background: var(--color-surface);
    }
    .lb-table td {
        padding: 0.3rem 0;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .lb-table td::before {
        content: attr(data-label);
        color: var(--color-text-muted);
        font-size: 0.78rem;
        margin-right: 0.5rem;
    }

    .cmd-grid { grid-template-columns: 1fr; gap: 0.25rem; }
    .cmd-card { padding: 0.35rem 0.55rem; }
    .cmd-section { margin-bottom: 0.4rem; }
    .cmd-section-title { font-size: 0.86rem; padding: 0.35rem 0.55rem; margin-bottom: 0.25rem; }
    .cmd-code { font-size: 0.74rem; padding: 0.14rem 0.45rem; }
    .cmd-desc { font-size: 0.74rem; }
    .cmd-search-wrap { margin-top: 0.25rem; margin-bottom: 0.5rem; }
    .cmd-search-wrap .form-control { padding: 0.45rem 0.9rem 0.45rem 2.1rem; font-size: 0.85rem; }

    .career-grid { grid-template-columns: 1fr; }
    .career-card { padding: 1.25rem; }

    .hb-tabs { flex-wrap: wrap; }
    .hb-tab { flex: 1 1 calc(50% - 0.25rem); text-align: center; font-size: 0.82rem; }
    .hb-grid-2 { grid-template-columns: 1fr; }
    .skin-grid { grid-template-columns: repeat(2, 1fr); }
    .gem-table-wrap { font-size: 0.82rem; }

    .mp-feature-grid { grid-template-columns: repeat(2, 1fr); }
    .mp-step { gap: 0.75rem; }
    .mp-step-num { width: 32px; height: 32px; font-size: 0.9rem; }

    .player-name { font-size: 1.4rem; }
}

/* 手机 */
@media (max-width: 480px) {
    .hero { padding: 1.5rem 1rem 1.25rem; border-radius: var(--radius-xl); }
    .hero-title { font-size: 1.85rem; }
    .hero-subtitle { font-size: 0.82rem; }
    .hero-eyebrow { display: none; }
    .hero-actions { flex-direction: column; align-items: center; }
    .btn-lg { width: 100%; max-width: 240px; }

    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .col-lg-6 { margin-bottom: 0.75rem; }

    .brand-text { font-size: 1.05rem; letter-spacing: 0.5px; }

    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.35rem; }
    .stat-label { font-size: 0.75rem; }

    .news-hero { padding: 1.75rem 1rem; border-radius: var(--radius-xl); margin-bottom: 0.85rem; }
    .news-hero-title { font-size: 1.4rem; }
    .news-card { padding: 1rem 1.1rem; }

    .news-hero-eyebrow { display: none; }
    .news-hero-title { font-size: 1.4rem; }

    .career-grid { grid-template-columns: 1fr; gap: 0.45rem; }
    .career-card { padding: 0.7rem 0.85rem; }

    .hb-tabs { flex-direction: column; gap: 0.3rem; padding: 0.25rem; }
    .hb-tab { flex: none; width: 100%; padding: 0.35rem 0.4rem; font-size: 0.82rem; }

    .skin-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .skin-card { padding: 0.75rem 0.5rem; }
    .skin-name { font-size: 0.75rem; }

    .gem-table-wrap { font-size: 0.78rem; }
    .gem-table th, .gem-table td { padding: 0.55rem 0.75rem; }

    .mp-feature-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .mp-feature-item { padding: 0.75rem 0.4rem; }
    .mfi-icon { font-size: 1.5rem; }
    .mfi-name { font-size: 0.78rem; }
    .mfi-desc { display: none; }

    .contact-card { padding: 1.1rem; }
    .cc-icon { font-size: 2rem; }
    .cc-title { font-size: 1rem; }
    .cc-desc { font-size: 0.85rem; }

    .mp-hero { padding: 2rem 1rem; }
    .mp-icon { font-size: 3.5rem; }
    .mp-hero h1 { font-size: 1.4rem; }
    .mp-guide { padding: 1.1rem; }
    .mp-features { padding: 1.1rem; }

    .contact-emoji { font-size: 3.5rem; }
    .contact-hero h1 { font-size: 1.5rem; }
}

/* ===== 全局滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.2);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
    background-clip: padding-box;
    border: 2px solid transparent;
}

/* ===== 选中文本 ===== */
::selection {
    background: rgba(99, 102, 241, 0.25);
    color: var(--color-text);
}

/* ===== Bootstrap 覆盖 ===== */
.bg-light, .table-light {
    background-color: var(--color-bg-soft) !important;
}
.text-muted { color: var(--color-text-muted) !important; }
.form-control:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.alert-info {
    background: var(--grad-primary-soft);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--color-primary-dark);
    border-radius: var(--radius-md);
}
.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #b45309;
    border-radius: var(--radius-md);
}

/* 新闻列表项悬停 */
.news-list-item {
    transition: background 0.2s ease;
}
.news-list-item:hover {
    background: var(--grad-primary-soft);
    cursor: pointer;
}

/* ===== 通用分页 ===== */
.page-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 1rem 0 0.25rem;
    flex-wrap: wrap;
}
.page-btn,
.page-num {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    line-height: 1.1;
}
.page-numbers {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.page-num {
    min-width: 2.1rem;
    padding: 0.4rem 0.6rem;
    text-align: center;
}
.page-btn:hover:not(:disabled),
.page-num:hover:not(.active) {
    background: var(--grad-primary-soft);
    border-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}
.page-num.active {
    background: var(--grad-primary);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}
.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.page-summary {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
}

/* ===== 通用工具类 ===== */
.text-nowrap { white-space: nowrap; }
.flex-wrap { flex-wrap: wrap; }
.gap-3 { gap: 1rem; }

/* =============================================================
   排行榜 V2 - Tab 切换 + 卡片列表(小程序风格)
   ============================================================= */

/* hero 区域,稍加点层次 */
.lb-hero {
    text-align: center;
    padding: 0.25rem 0 1.5rem;
}
.lb-hero .page-title {
    margin-bottom: 0.35rem;
}
/* 排行榜页:把左下角 60px 标签改成全宽淡渐变细线,更克制 */
.lb-hero .page-title::before {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
}

/* 8 个 tab 容器 - 胶囊样式,顶部独立浮层 */
.lb-tabs {
    display: flex;
    flex-wrap: nowrap;             /* 桌面端不换行,真正平铺 */
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0;
    background: transparent;
    border-bottom: none;
}
@media (max-width: 768px) {
    .lb-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: thin;
        padding: 0 0.25rem;
    }
    .lb-tabs::-webkit-scrollbar { height: 4px; }
    .lb-tabs::-webkit-scrollbar-thumb {
        background: var(--color-border-strong);
        border-radius: 2px;
    }
}

.lb-tab {
    flex: 1 1 0;                   /* 桌面端平铺,自动均分宽度 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
@media (max-width: 768px) {
    .lb-tab {
        flex: 0 0 auto;            /* 移动端取消平铺,保持自适应宽度并支持横向滚动 */
        padding: 0.65rem 1.1rem;
    }
}
@media (max-width: 575px) {
    .lb-tab {
        padding: 0.6rem 0.95rem;
        font-size: 0.82rem;
    }
}
.lb-tab:hover:not(.active) {
    background: rgba(99, 102, 241, 0.08);
    color: var(--color-primary-dark);
    border-color: rgba(99, 102, 241, 0.30);
    transform: translateY(-2px);
    /* 横向阴影收窄,改为小范围纵向阴影 */
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.14);
}
.lb-tab.active {
    background: var(--grad-primary);
    color: #fff;
    /* 仅一道很短的柔和阴影,不再横向扩散,也不再有顶部高光 */
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.28);
    border-color: transparent;
    transform: translateY(-1px);
}
.lb-tab-icon {
    font-size: 0.95rem;
    line-height: 1;
    filter: saturate(1.15);
}
.lb-tab.active .lb-tab-icon {
    filter: none;
}
.lb-tab-label {
    line-height: 1;
}

/* 列表容器 - 排名卡片直接悬浮在页面上,不再有外层大卡片 */
.lb-list {
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* 单条卡片(每条都是独立小卡片,模式对齐小程序 .rank-item)
   始终单行布局,使用 minmax(0,...) 防止任何元素溢出 */
.lb-card-row {
    display: grid;
    grid-template-columns: minmax(12px, 16px) minmax(24px, 32px) minmax(0, 1fr) minmax(44px, auto);
    align-items: center;
    gap: clamp(0.1rem, 0.4vw, 0.22rem);
    padding: clamp(0.28rem, 0.8vw, 0.38rem) clamp(0.22rem, 0.8vw, 0.32rem);
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: all 0.22s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.lb-card-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.12), 0 3px 8px rgba(15, 23, 42, 0.06);
    border-color: rgba(99, 102, 241, 0.35);
}
.lb-card-row:active {
    transform: scale(0.99);
}

/* ============== 情侣榜专属布局 ============== */
.lb-row-couple {
    /* 4 列: 排名 | 左玩家 | 徽章区 | 右玩家 */
    grid-template-columns: 14px 1fr 78px 1fr;
    gap: 0.2rem;
    padding: 0.32rem 0.4rem;
}
.lb-row-couple .lb-rank {
    width: 14px;
}

/* 单个玩家:垂直布局 */
.lb-couple-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.lb-couple-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    background: var(--color-bg-soft, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.12rem;
    /* 不再白色包边 */
    border: none;
    box-shadow: none;
}
.lb-couple-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lb-couple-name {
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--color-text, #1f2937);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.2;
}

.lb-couple-name.lb-name-vip {
    color: #f59e0b;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lb-couple-meta {
    display: flex;
    align-items: center;
    gap: 0.18rem;
    margin-top: 1px;
    font-size: 0.46rem;
    color: var(--color-text-muted, #6b7280);
    line-height: 1.2;
}
.lb-couple-meta .lb-level {
    color: var(--color-text-muted, #6b7280);
}
.lb-couple-meta .lb-job {
    padding: 0 4px;
    border-radius: 6px;
    font-size: 0.42rem;
}

/* 中间连接区:爱心丝带 + 亲密度徽章 */
.lb-couple-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 28px;
}

/* 粉色虚线爱心连线 */
.lb-couple-connector::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-image: linear-gradient(to right, #ff6b81 50%, transparent 50%);
    background-size: 8px 1px;
    background-repeat: repeat-x;
    opacity: 0.5;
    transform: translateY(-50%);
    z-index: 1;
}

.lb-couple-intimacy-badge {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b81 0%, #ff8e9e 50%, #ffb6c1 100%);
    color: #fff;
    font-size: 0.48rem;
    font-weight: 600;
    padding: 0.14rem 0.38rem;
    border-radius: 999px;
    box-shadow: 0 3px 10px rgba(255, 107, 129, 0.40), 0 1px 2px rgba(255, 107, 129, 0.30);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* 徽章两侧的小爱心装饰(对齐小程序) */
.lb-couple-intimacy-badge::before,
.lb-couple-intimacy-badge::after {
    content: '♥';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: #ff6b81;
    text-shadow: 0 0 4px rgba(255, 107, 129, 0.4);
}
.lb-couple-intimacy-badge::before {
    left: -0.7rem;
}
.lb-couple-intimacy-badge::after {
    right: -0.7rem;
}

/* 情侣榜前三的特殊边框 — 改用粉色系,和金银铜区分 */
.lb-row-couple.lb-row-1 {
    border: 2px solid #ff6b81;
    background: linear-gradient(135deg, rgba(255, 107, 129, 0.10) 0%, rgba(255, 182, 193, 0.06) 60%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 14px rgba(255, 107, 129, 0.28), inset 0 0 20px rgba(255, 107, 129, 0.04);
}
.lb-row-couple.lb-row-2 {
    border: 2px solid #fb7185;
    background: linear-gradient(135deg, rgba(251, 113, 133, 0.08) 0%, rgba(253, 164, 175, 0.04) 60%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 14px rgba(251, 113, 133, 0.22);
}
.lb-row-couple.lb-row-3 {
    border: 2px solid #fda4af;
    background: linear-gradient(135deg, rgba(253, 164, 175, 0.08) 0%, rgba(254, 205, 211, 0.04) 60%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 14px rgba(253, 164, 175, 0.20);
}

/* 前三名特殊边框(对齐小程序 .rank-item.top-1/2/3) */
.lb-card-row.lb-row-1 {
    border: 2px solid #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 236, 139, 0.06) 60%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.30), inset 0 0 30px rgba(255, 215, 0, 0.05);
}
.lb-card-row.lb-row-2 {
    border: 2px solid #b8b8b8;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(220, 220, 220, 0.06) 60%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 20px rgba(184, 184, 184, 0.30), inset 0 0 30px rgba(192, 192, 192, 0.08);
}
.lb-card-row.lb-row-3 {
    border: 2px solid #cd7f32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(218, 160, 109, 0.06) 60%, rgba(255, 255, 255, 1) 100%);
    box-shadow: 0 4px 20px rgba(205, 127, 50, 0.30), inset 0 0 30px rgba(205, 127, 50, 0.05);
}

/* ========== 排行榜单行自适应布局 ==========
   核心原则: 任何屏宽都单行显示,使用 minmax(0,...) + clamp() 让元素按比例缩
   排名圆环 / 头像 始终是正方形,不会被压成椭圆 */
.lb-card-row {
    display: grid;
    /* 列: 排名(始终正方形)| 头像(始终正方形)| 信息(弹性)| 战力(弹性) */
    grid-template-columns:
        minmax(28px, 44px)
        minmax(32px, 48px)
        minmax(0, 1fr)
        minmax(56px, auto);
    align-items: center;
    gap: clamp(0.35rem, 1.5vw, 0.7rem);
    padding: clamp(0.55rem, 1.5vw, 0.85rem) clamp(0.6rem, 2vw, 1rem);
    min-width: 0;
    /* 单行不换行: 强制 grid-template-rows */
    grid-template-rows: auto;
}

/* 排名徽章:固定宽高,圆环始终是正圆 */
.lb-card-row .rank-badge {
    width: clamp(30px, 9vw, 40px);
    height: clamp(26px, 7.5vw, 34px);
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    border-radius: 50%;
    aspect-ratio: 1 / 1; /* 兜底:无论 grid 怎么压都保持正方形 */
    flex-shrink: 0;
}
.lb-card-row .rank-badge.rank-other {
    width: 100%;
    height: clamp(26px, 7.5vw, 34px);
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: clamp(0.86rem, 2vw, 0.92rem);
    color: var(--color-text-muted, #6b7280);
    font-weight: 700;
    justify-content: center;     /* 数字居中,容器宽度统一 → 容器右边界统一 */
}

/* 前三名:直接显示 emoji,保留浏览器原生彩色 */
.lb-card-row .rank-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;     /* emoji 居中,与数字中心对齐 */
    width: 100%;
    height: clamp(24px, 7vw, 30px);
    font-size: clamp(0.95rem, 2.3vw, 1.15rem);
    line-height: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    flex-shrink: 0;
    /* 强制使用彩色 emoji 字形,避免部分浏览器变成黑白 */
    color: initial;
    font-variant-emoji: emoji;
    text-shadow: none;
}

/* 头像:固定正方形 */
.lb-avatar {
    width: clamp(20px, 5vw, 24px);
    height: clamp(20px, 5vw, 24px);
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}
.lb-avatar-default {
    font-size: clamp(0.5rem, 1.2vw, 0.6rem);
}

/* 中间信息:永远不溢出 */
.lb-info {
    min-width: 0;
    overflow: hidden;
}
.lb-name {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: clamp(0.5rem, 1vw, 0.56rem);
}
.lb-info-bottom {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(0.4rem, 0.85vw, 0.46rem);
    gap: clamp(0.1rem, 0.3vw, 0.22rem);
}
.lb-level { font-size: clamp(0.38rem, 0.85vw, 0.46rem); }
.lb-job { font-size: clamp(0.34rem, 0.75vw, 0.4rem); padding: 0 3px; }

/* 战力:永远不溢出 */
.lb-value {
    min-width: 0;
    text-align: right;
}
.lb-value-num {
    font-size: clamp(0.5rem, 1.1vw, 0.58rem);
    white-space: nowrap;
}
.lb-value-sub {
    font-size: clamp(0.6rem, 1.6vw, 0.7rem);
    white-space: nowrap;
}

/* ========== 情侣榜 — 永远单行 ========== */
.lb-row-couple {
    grid-template-columns:
        minmax(28px, 44px)     /* 排名 */
        minmax(60px, 1fr)      /* 左玩家 */
        minmax(70px, auto)     /* 中间徽章 */
        minmax(60px, 1fr);     /* 右伴侣 */
    grid-template-rows: auto;
    gap: clamp(0.3rem, 1.2vw, 0.6rem);
    padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(0.5rem, 1.8vw, 1rem);
    align-items: center;
    min-width: 0;
}

.lb-row-couple .lb-rank {
    width: clamp(28px, 9vw, 44px);
}

/* 玩家头像 — 永远正圆 */
.lb-couple-avatar {
    width: clamp(32px, 9vw, 48px) !important;
    height: clamp(32px, 9vw, 48px) !important;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

.lb-couple-name {
    max-width: 100%;
    font-size: clamp(0.72rem, 2.2vw, 0.85rem) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-couple-meta {
    font-size: clamp(0.62rem, 1.8vw, 0.72rem) !important;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 徽章区:固定占位 */
.lb-couple-connector {
    min-height: clamp(40px, 11vw, 56px);
}
.lb-couple-intimacy-badge {
    font-size: clamp(0.6rem, 1.8vw, 0.72rem) !important;
    padding: clamp(0.2rem, 0.6vw, 0.3rem) clamp(0.4rem, 1.2vw, 0.7rem) !important;
    white-space: nowrap;
}
.lb-couple-intimacy-badge::before,
.lb-couple-intimacy-badge::after {
    font-size: clamp(0.55rem, 1.6vw, 0.7rem);
}

/* 排名徽章:用固定宽度容器,序号居中显示,容器终点统一 → 头像列起点统一 */
.lb-rank {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 100%;
    min-width: 0;
}
/* emoji 和数字都水平居中显示,容器宽度由 grid 列宽决定,
   所有行容器宽度相同 → 容器右边界一致 → 头像列起点一致 */
.lb-rank .rank-emoji {
    margin-left: 0;
    margin-right: 0;
}
/* 前三名现在直接显示 emoji,见 .rank-emoji;这里保留旧规则兜底 */
.lb-card-row .rank-badge.rank-1,
.lb-card-row .rank-badge.rank-2,
.lb-card-row .rank-badge.rank-3 {
    background: transparent;
    border: none;
    box-shadow: none;
    color: inherit;
}

/* 第四名及之后 - 不再有底圆盘,纯文字序号(贴近小程序原生的无装饰排名号) */
.rank-badge.rank-other {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--color-text-muted, #6b7280);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;     /* 数字在容器内水平居中,与 emoji 中心对齐 */
    line-height: 1;
    height: clamp(26px, 7.5vw, 34px);
    min-width: clamp(20px, 5.5vw, 28px);
}
/* 让普通序号数字也紧贴容器右边界,与 emoji 右边缘对齐 */
.lb-rank .rank-badge.rank-other {
    margin-left: 0;
    margin-right: 0;
}

/* 头像 */
.lb-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--grad-primary-soft);
    flex-shrink: 0;
    /* 不要白色包边,贴近小程序头像原生观感 */
    border: none;
    box-shadow: none;
}
.lb-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lb-avatar-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    background: var(--grad-primary-soft);
}

/* 中间玩家信息 */
.lb-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.lb-info-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    line-height: 1.25;
}
.lb-info-bottom {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.25;
}
.lb-name {
    font-family: "PingFang SC", "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", "Heiti SC", sans-serif;
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
/* VIP 昵称 - 橙色(用户要求);高于 10 级则升级为传奇渐变 */
.lb-name.lb-name-vip {
    color: #f59e0b;
    background: linear-gradient(90deg, #f59e0b 0%, #fb923c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 第二行:等级 + 职业 */
.lb-level {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}
.lb-job {
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
}
/* 职业颜色 - 对齐小程序 job-* class */
.job-warrior { color: #dc2626; }   /* 战士 红 */
.job-ranger  { color: #16a34a; }   /* 游侠 绿 */
.job-mage    { color: #2563eb; }   /* 法师 蓝 */
.job-warlock { color: #9333ea; }   /* 术士 紫 */
.job-priest  { color: #d97706; }   /* 牧师 琥珀 */
.job-monk    { color: #ea580c; }   /* 武僧 橙 */
.job-bard    { color: #db2777; }   /* 吟游诗人 粉 */

/* 情侣伴侣 */
.lb-partner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.55rem;
    background: linear-gradient(90deg, rgba(236, 72, 153, 0.06), transparent);
    border-radius: var(--radius-md);
    margin-top: 0.15rem;
    width: fit-content;
}
.lb-partner-heart {
    color: var(--color-accent);
    font-size: 0.85rem;
}
.lb-partner-name {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.82rem;
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-partner-lv {
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

/* 主指标 */
.lb-value {
    text-align: right;
    flex-shrink: 0;
}
.lb-value-num {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    /* 第四名及以外:蓝紫主题色(不再纯黑) */
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lb-value-num.lb-value-1 {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lb-value-num.lb-value-2 {
    background: var(--grad-silver);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lb-value-num.lb-value-3 {
    background: var(--grad-bronze);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lb-value-sub {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 0.15rem;
    font-weight: 500;
}

/* ==========================================================
   小程序节奏覆盖:卡片整体贴近微信小程序原生观感。
   行高 ~52-58px、头像 ~36-40px、名字 0.86-0.9rem、
   信息行 0.7rem 左右、战力 0.86rem。卡片不再极窄极小。
   选择器重复 + !important 确保覆盖文件中部绝对值。
   ========================================================== */
.lb-card-row.lb-card-row {
    grid-template-columns:
        minmax(30px, 38px)
        minmax(34px, 42px)
        minmax(0, 1fr)
        minmax(60px, 80px) !important;
    gap: clamp(0.32rem, 1vw, 0.48rem) !important;
    padding: clamp(0.5rem, 1.3vw, 0.7rem) clamp(0.42rem, 1.3vw, 0.62rem) !important;
    border-radius: 10px !important;
}
.lb-row-couple.lb-row-couple {
    grid-template-columns:
        minmax(30px, 38px)
        minmax(72px, 1fr)
        minmax(82px, auto)
        minmax(72px, 1fr) !important;
    gap: clamp(0.32rem, 1vw, 0.48rem) !important;
    padding: clamp(0.55rem, 1.3vw, 0.75rem) clamp(0.42rem, 1.3vw, 0.62rem) !important;
}

.lb-avatar.lb-avatar {
    width: clamp(36px, 9vw, 44px) !important;
    height: clamp(36px, 9vw, 44px) !important;
    border: none !important;
    box-shadow: none !important;
}
.lb-info.lb-info {
    padding-left: clamp(0.18rem, 0.6vw, 0.32rem);
}
.lb-avatar-default.lb-avatar-default {
    font-size: clamp(0.8rem, 1.9vw, 0.95rem) !important;
}

.lb-name.lb-name {
    font-size: clamp(0.8rem, 1.85vw, 0.86rem) !important;
    max-width: 14rem !important;
}
.lb-info-bottom.lb-info-bottom {
    font-size: clamp(0.64rem, 1.45vw, 0.72rem) !important;
    gap: clamp(0.3rem, 0.8vw, 0.5rem) !important;
}
.lb-level.lb-level {
    font-size: clamp(0.64rem, 1.45vw, 0.72rem) !important;
}
.lb-job.lb-job {
    font-size: clamp(0.64rem, 1.45vw, 0.72rem) !important;
    padding: 0 5px !important;
}

.lb-value-num.lb-value-num {
    font-size: clamp(0.8rem, 1.85vw, 0.88rem) !important;
}
.lb-value-sub.lb-value-sub {
    font-size: clamp(0.55rem, 1.3vw, 0.64rem) !important;
}

.lb-couple-avatar.lb-couple-avatar {
    width: clamp(36px, 9vw, 44px) !important;
    height: clamp(36px, 9vw, 44px) !important;
    margin-bottom: 0.22rem !important;
    border: none !important;
    box-shadow: none !important;
}
.lb-couple-name.lb-couple-name {
    font-size: clamp(0.72rem, 1.75vw, 0.82rem) !important;
}
.lb-couple-meta.lb-couple-meta {
    font-size: clamp(0.6rem, 1.4vw, 0.68rem) !important;
}
.lb-couple-intimacy-badge.lb-couple-intimacy-badge {
    font-size: clamp(0.66rem, 1.55vw, 0.76rem) !important;
    padding: 0.2rem 0.5rem !important;
}
.lb-couple-connector.lb-couple-connector {
    min-height: clamp(40px, 10vw, 52px) !important;
}
.lb-couple-intimacy-badge.lb-couple-intimacy-badge::before,
.lb-couple-intimacy-badge.lb-couple-intimacy-badge::after {
    font-size: clamp(0.6rem, 1.5vw, 0.72rem) !important;
}

.lb-partner.lb-partner {
    padding: 0.3rem 0.55rem !important;
    gap: 0.4rem !important;
}
.lb-partner-name.lb-partner-name {
    font-size: 0.82rem !important;
    max-width: 8rem !important;
}
.lb-partner-lv.lb-partner-lv {
    font-size: 0.7rem !important;
}
.lb-partner-heart.lb-partner-heart {
    font-size: 0.85rem !important;
}
