    :root {
      --bg: #f8fafc;
      --panel: #ffffff;
      --text: #1e293b;
      --muted: #64748b;
      --primary: #1e293b;
      --line: #e2e8f0;
      --gold: #f59e0b;
      --silver: #94a3b8;
      --bronze: #b45309;
    }
    body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
    
    .rank-container { width: min(1000px, calc(100% - 32px)); margin: 24px auto; }
    
    .rank-header { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
    .rank-header-text { text-align: left; }
    .rank-header h1 { font-size: 24px; font-weight: 900; margin: 0 0 4px 0; background: linear-gradient(135deg, #1e293b, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
    .rank-header p { color: var(--muted); font-size: 13px; margin: 0; }

    /* Tab 导航优化：合并到 Header 同行或紧凑排列 */
    .rank-nav-group { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
    .rank-tabs { display: flex; gap: 8px; flex-wrap: wrap; background: rgba(148, 163, 184, 0.05); padding: 6px; border-radius: 16px; width: fit-content; }
    .rank-tab { padding: 8px 20px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 800; font-size: 13px; transition: all 0.2s; border: none; }
    .rank-tab:hover { color: var(--primary); background: rgba(148, 163, 184, 0.1); }
    .rank-tab.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px var(--primary-a2); }
    /* 取消了图片的强制反色滤镜，以支持带底色的彩色 SVG 原样显示 */

    /* 子 Tab 优化：更精致小巧 */
    .rank-subtabs { display: flex; gap: 6px; }
    .rank-subtab { padding: 4px 14px; border-radius: 8px; background: transparent; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; transition: all 0.2s; border: 1px solid var(--line); }
    .rank-subtab:hover { border-color: var(--primary); color: var(--primary); }
    .rank-subtab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

    /* 列表卡片 */
    .rank-card { background: var(--panel); border-radius: 24px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); }
    .rank-table { width: 100%; border-collapse: collapse; }
    .rank-table th { text-align: left; padding: 20px 24px; font-size: 13px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); background: rgba(148, 163, 184, 0.02); }
    .rank-table td { padding: 16px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; }
    .rank-table tr:last-child td { border-bottom: none; }

    /* 悬浮按钮组样式 */
    .floating-actions {
        position: fixed;
        bottom: max(24px, env(safe-area-inset-bottom));
        right: max(24px, calc(50% - 620px)); /* 继续向右移，留出足够的呼吸感 */
        display: flex;
        flex-direction: column;
        background: var(--panel);
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--line);
        overflow: hidden;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(8px);
    }
    .floating-actions.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .float-btn {
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        color: var(--muted);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .float-btn:hover {
        color: var(--primary);
        background: rgba(148, 163, 184, 0.1);
    }
    .float-btn:first-child {
        border-bottom: 1px solid var(--line);
    }
    html[data-theme="dark"] .floating-actions {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    @media (max-width: 768px) {
        .floating-actions {
            bottom: max(20px, env(safe-area-inset-bottom));
            right: max(20px, env(safe-area-inset-right));
        }
    }
    .rank-table tr:hover { background: rgba(30, 41, 59, 0.02); }

    /* 名次样式 */
    .num-box { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px; color: var(--muted); background: #f1f5f9; }
    tr:nth-child(1) .num-box { background: var(--gold); color: #fff; box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3); }
    tr:nth-child(2) .num-box { background: var(--silver); color: #fff; box-shadow: 0 4px 10px rgba(148, 163, 184, 0.3); }
    tr:nth-child(3) .num-box { background: var(--bronze); color: #fff; box-shadow: 0 4px 10px rgba(180, 83, 9, 0.3); }

    /* 用户信息 */
    .user-info { display: flex; align-items: center; gap: 12px; }
    .user-avatar { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
    .user-name { font-weight: 700; color: var(--text); text-decoration: none; transition: color 0.2s; }
    .user-name:hover { color: var(--primary); }
    
    /* 数值样式 */
    .rank-val { font-weight: 900; color: var(--primary); font-size: 16px; }
    .rank-val-small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }

    /* 手机端适配 */
    @media (max-width: 600px) {
        .rank-container { margin: 20px auto; }
        .rank-header h1 { font-size: 24px; }
        .rank-tab { padding: 8px 16px; font-size: 13px; }
        .rank-table th:nth-child(3), .rank-table td:nth-child(3) { display: none; }
        .rank-table td { padding: 12px 16px; }
    }

    body[data-theme="dark"] { --bg: #0f172a; --panel: #1e293b; --text: #f1f5f9; --muted: #94a3b8; --line: #334155; }
    body[data-theme="dark"] .num-box { background: #0f172a; }
    body[data-theme="dark"] .rank-subtab.active { background: #334155; }
    body[data-theme="dark"] .rank-table tr:hover { background: rgba(255,255,255,0.02); }
