.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}

.star-input input {
    display: none;
}

.star-input label {
    color: #d1d5db;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: color .15s;
}

.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
    color: #facc15;
}

.rank-tab.active {
    background: #1677ff;
    color: #fff;
    border-color: #1677ff;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data-table th {
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

table.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

table.data-table tr:hover td {
    background: #f9fafb;
}

/* ============ 手机端底部菜单栏 ============ */
.tabbar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    animation: tabbar-rise .7s cubic-bezier(.34, 1.56, .64, 1) both;
}

.tabbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .16), 0 2px 8px rgba(15, 23, 42, .06), inset 0 1px 0 #fff;
}

.tab-indicator {
    position: absolute;
    top: 7px;
    bottom: 7px;
    left: 0;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(22, 119, 255, .14), rgba(56, 189, 248, .2));
    box-shadow: inset 0 0 0 1px rgba(22, 119, 255, .18);
    pointer-events: none;
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1), width .55s cubic-bezier(.34, 1.56, .64, 1), opacity .3s;
}

.tab-indicator.is-hidden {
    opacity: 0;
}

.tab-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 0;
    color: #94a3b8;
    border-radius: 999px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    transition: color .3s;
    animation: tab-item-in .55s cubic-bezier(.34, 1.56, .64, 1) both;
}

.tab-ico {
    display: block;
    line-height: 1;
}

.tab-ico i {
    font-size: 20px;
    display: inline-block;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

.tab-label {
    font-size: 10px;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
    transition: transform .3s;
}

.tab-item:hover {
    color: #334155;
}

.tab-item:active .tab-ico i {
    transform: scale(.8);
}

.tab-item.is-active {
    color: #1677ff;
}

.tab-item.is-active .tab-ico i {
    animation: tab-pop .6s cubic-bezier(.34, 1.56, .64, 1);
}

.tab-item.is-active .tab-label {
    font-weight: 700;
    transform: translateY(-1px);
}

.tab-ripple {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 119, 255, .35), rgba(22, 119, 255, .1));
    transform: scale(0);
    animation: ripple-out .7s ease-out forwards;
    pointer-events: none;
}

.tab-center {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: -34px;
    color: #94a3b8;
    -webkit-tap-highlight-color: transparent;
    transition: color .3s;
    animation: tab-item-in .55s cubic-bezier(.34, 1.56, .64, 1) both;
}

.tab-center-float {
    display: block;
    animation: center-float 3s ease-in-out infinite;
}

.tab-center-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(145deg, #1677ff, #38bdf8 55%, #22d3ee);
    border: 3px solid #fff;
    box-shadow: 0 10px 24px rgba(22, 119, 255, .45), 0 2px 6px rgba(22, 119, 255, .25);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s;
}

.tab-center-btn::after {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    border: 2px solid rgba(22, 119, 255, .45);
    animation: ring-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

.tab-center-btn i {
    display: inline-block;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}

.tab-center:hover .tab-center-btn {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 16px 30px rgba(22, 119, 255, .5), 0 3px 8px rgba(22, 119, 255, .3);
}

.tab-center:active .tab-center-btn {
    transform: scale(.92);
}

.tab-center.is-active {
    color: #1677ff;
}

.tab-center.is-active .tab-label {
    font-weight: 700;
}

.tab-center.is-active .tab-center-btn i {
    animation: tab-pop .6s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes tabbar-rise {
    from { transform: translateY(130%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes tab-item-in {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes tab-pop {
    0% { transform: scale(1); }
    30% { transform: scale(1.4) rotate(-10deg); }
    60% { transform: scale(.9); }
    100% { transform: scale(1); }
}

@keyframes ring-pulse {
    0% { transform: scale(.92); opacity: .9; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

@keyframes center-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes ripple-out {
    to { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tabbar, .tab-item, .tab-center, .tab-center-float, .tab-center-btn::after,
    .tab-item.is-active .tab-ico i, .tab-center.is-active .tab-center-btn i {
        animation: none !important;
    }
}
/* 移动端底部 tabbar：桌面隐藏，移动显示 */
.tabbar { display: none; }
@media (max-width: 767px) {
    .tabbar { display: block; }
    body { padding-bottom: 96px; } /* 给 tabbar 留位置，避免内容被遮 */
}
/* ===== 微信悬浮二维码 ===== */
.wx-trigger {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.wx-trigger .wx-qr {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -100px;
    margin-top: 8px;
    width: 200px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    text-align: center;
    color: #374151;
    z-index: 99999;
}
.wx-trigger:hover .wx-qr {
    display: block;
}
.wx-trigger .wx-qr::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    margin-left: -5px;
    width: 10px;
    height: 10px;
    background: #fff;
    transform: rotate(45deg);
}
.wx-trigger .wx-qr img {
    display: block;
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}
.wx-trigger .wx-qr em {
    display: block;
    margin-top: 6px;
    font-style: normal;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* #a01 提升层级，避免弹窗被下面的板块遮挡 */
#a01 {
    z-index: 100;
    overflow: visible;
}
#a01 .a01-meta {
    position: relative;
    z-index: 20;
}

@media (max-width: 768px) {
    .wx-trigger .wx-qr {
        left: auto;
        right: 0;
        margin-left: 0;
    }
    .wx-trigger .wx-qr::before {
        left: auto;
        right: 24px;
        margin-left: 0;
    }
}
/* ===== 登录 / 注册 ===== */
.auth-wrap {
    max-width: 440px;
    margin: 24px auto 40px;
    padding: 0 16px;
    box-sizing: border-box;
}
.auth-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    padding: 36px 32px 28px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .06);
}
.auth-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    line-height: 1.4;
}
.auth-sub {
    margin: 0 0 24px;
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
}
.auth-alert {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}
.auth-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.auth-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}
.auth-field {
    margin-bottom: 16px;
}
.auth-label {
    display: block;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 6px;
}
.auth-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    color: #1f2937;
    outline: none;
    background: #fff;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder {
    color: #c1c7d0;
}
.auth-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, .15);
}
.auth-btn {
    display: block;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #7c3aed;
    cursor: pointer;
    font-family: inherit;
    margin-top: 6px;
    transition: background .15s;
}
.auth-btn:hover {
    background: #6d28d9;
}
.auth-btn:active {
    background: #5b21b6;
}
.auth-footer {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}
.auth-footer a {
    color: #7c3aed;
    font-weight: 700;
    text-decoration: none;
}
.auth-footer a:hover {
    text-decoration: underline;
}
@media (max-width: 480px) {
    .auth-wrap { margin: 16px auto 28px; }
    .auth-card { padding: 26px 20px 20px; border-radius: 12px; }
    .auth-title { font-size: 19px; }
}
/* ===== 主题变量 ===== */
html[data-theme="purple"],
body[data-theme="purple"] {
    --brand: #7c3aed;
    --brand-dark: #6d28d9;
    --brand-light: #ede9fe;
    --brand-bg: #f5f3ff;
    --page-bg: #f3f4f6;
}
html[data-theme="blue"],
body[data-theme="blue"] {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #dbeafe;
    --brand-bg: #eff6ff;
    --page-bg: #f0f9ff;
}
html[data-theme="ocean"],
body[data-theme="ocean"] {
    --brand: #0891b2;
    --brand-dark: #0e7490;
    --brand-light: #cffafe;
    --brand-bg: #ecfeff;
    --page-bg: #f0fdfa;
}
html[data-theme="green"],
body[data-theme="green"] {
    --brand: #16a34a;
    --brand-dark: #15803d;
    --brand-light: #dcfce7;
    --brand-bg: #f0fdf4;
    --page-bg: #f7fee7;
}
html[data-theme="mint"],
body[data-theme="mint"] {
    --brand: #10b981;
    --brand-dark: #059669;
    --brand-light: #d1fae5;
    --brand-bg: #ecfdf5;
    --page-bg: #f0fdfa;
}
html[data-theme="pink"],
body[data-theme="pink"] {
    --brand: #ec4899;
    --brand-dark: #db2777;
    --brand-light: #fce7f3;
    --brand-bg: #fdf2f8;
    --page-bg: #fff1f2;
}
html[data-theme="red"],
body[data-theme="red"] {
    --brand: #ef4444;
    --brand-dark: #dc2626;
    --brand-light: #fee2e2;
    --brand-bg: #fef2f2;
    --page-bg: #fff7ed;
}
html[data-theme="redflame"],
body[data-theme="redflame"] {
    --brand: #f97316;
    --brand-dark: #ea580c;
    --brand-light: #ffedd5;
    --brand-bg: #fff7ed;
    --page-bg: #fffbeb;
}
html[data-theme="graphite"],
body[data-theme="graphite"] {
    --brand: #4b5563;
    --brand-dark: #374151;
    --brand-light: #e5e7eb;
    --brand-bg: #f9fafb;
    --page-bg: #f3f4f6;
}
html[data-theme="black"],
body[data-theme="black"] {
    --brand: #111827;
    --brand-dark: #030712;
    --brand-light: #e5e7eb;
    --brand-bg: #f9fafb;
    --page-bg: #f3f4f6;
}

/* 默认变量兜底，万一 data-theme 没设置 */
:root {
    --brand: #7c3aed;
    --brand-dark: #6d28d9;
    --brand-light: #ede9fe;
    --brand-bg: #f5f3ff;
    --page-bg: #f3f4f6;
}
/* ===== 应用卡片跟随主题 ===== */
.container .app-card {
    background: #fff;
    border: 1px solid var(--brand-light, #eef2f7);
    transition: border-color .15s, box-shadow .15s;
}
.container .app-card:hover {
    border-color: var(--brand, #7c3aed);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}
.container .app-card .title {
    color: #1f2937;
    transition: color .15s;
}
.container .app-card .title:hover {
    color: var(--brand, #7c3aed);
}
.container .app-card a {
    color: var(--brand, #7c3aed);
}
.container .app-card .hidden {
    display: none;
}
html[data-theme="purple"] { --brand:#7c3aed; --brand-light:#ede9fe; --brand-bg:#f5f3ff; }
html[data-theme="blue"]   { --brand:#2563eb; --brand-light:#dbeafe; --brand-bg:#eff6ff; }
html[data-theme="ocean"]  { --brand:#0891b2; --brand-light:#cffafe; --brand-bg:#ecfeff; }
html[data-theme="green"]  { --brand:#16a34a; --brand-light:#dcfce7; --brand-bg:#f0fdf4; }
html[data-theme="mint"]   { --brand:#10b981; --brand-light:#d1fae5; --brand-bg:#ecfdf5; }
html[data-theme="pink"]   { --brand:#ec4899; --brand-light:#fce7f3; --brand-bg:#fdf2f8; }
html[data-theme="red"]    { --brand:#ef4444; --brand-light:#fee2e2; --brand-bg:#fef2f2; }
html[data-theme="redflame"] { --brand:#f97316; --brand-light:#ffedd5; --brand-bg:#fff7ed; }
html[data-theme="graphite"] { --brand:#4b5563; --brand-light:#e5e7eb; --brand-bg:#f9fafb; }
html[data-theme="black"]  { --brand:#111827; --brand-light:#e5e7eb; --brand-bg:#f9fafb; }
    #a01.a01-theme {
        background: linear-gradient(135deg, var(--brand, #7c3aed), var(--brand-light, #a78bfa));
    }