/* 算法大厅 - 移动端优先 */
.hall-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px calc(24px + env(safe-area-inset-bottom, 0));
}

/* 开奖区：在检索区上方展示，不被吸顶条遮挡 */
.hall-draw-panel {
    position: relative;
    z-index: 2;
}

/* 检索区占位槽：收起时高度归零，算法列表紧跟开奖区 */
.hall-filter-anchor {
    position: relative;
    margin: 0 -12px 8px;
    overflow: hidden;
    transition: height 0.25s ease, margin 0.25s ease;
}

.hall-filter-anchor.is-pinned.is-collapsed {
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 -12px 0 !important;
}

.hall-sticky-head {
    position: relative;
    z-index: 120;
    margin: 0;
    padding: 0 12px 6px;
    box-sizing: border-box;
    background: #f4f6f9;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transform: translateY(0);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hall-sticky-head.is-pinned {
    position: fixed;
    top: var(--site-header-h, 106px);
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: 1400px;
    width: 100%;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.hall-sticky-head.is-pinned.is-hidden {
    transform: translateY(calc(-100% - 2px));
    box-shadow: none;
    pointer-events: none;
}

.hall-columns.hall-unified {
    margin-top: 0;
}

.hall-toolbar {
    position: relative;
    top: auto;
    z-index: auto;
    background: transparent;
    padding: 8px 0 6px;
    margin: 0;
    border-bottom: none;
    box-shadow: none;
}

.hall-search {
    position: relative;
    margin-bottom: 10px;
}

.hall-search input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.hall-search::before {
    content: '🔍';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.45;
    pointer-events: none;
}

.hall-pills-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -12px;
    padding: 0 12px 4px;
}

.hall-pills-scroll::-webkit-scrollbar {
    display: none;
}

.hall-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
}

.hall-pills-wrap .hall-pills {
    flex-wrap: wrap;
}

.hall-pills button {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 22px;
    padding: 10px 16px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
    transition: all 0.2s ease;
}

.hall-pills button:active {
    transform: scale(0.96);
}

.hall-pills button.active,
.hall-sort-btn.active,
.hall-cat-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.hall-free-filter-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

/* 会员算法筛选：黑金高端 */
.hall-vip-filter-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: linear-gradient(135deg, #0f172a 0%, #292419 50%, #0f172a 100%);
    color: #fde68a;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    isolation: isolate;
}

.hall-vip-filter-btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(120deg, #fde047, #f59e0b, #78350f, #fde047);
    -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;
    opacity: 0.55;
    pointer-events: none;
}

.hall-vip-filter-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 60%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: skewX(-20deg);
    animation: hallVipTagShine 2.8s ease-in-out infinite;
    pointer-events: none;
}

.hall-vip-filter-crown {
    font-size: 11px;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.8));
}

.hall-vip-filter-btn span:last-child {
    position: relative;
    z-index: 1;
}

.hall-vip-filter-btn.active {
    color: #1c1917;
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fde047 0%, #f59e0b 38%, #d97706 72%, #b45309 100%);
    box-shadow:
        0 4px 18px rgba(245, 158, 11, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.hall-vip-filter-btn.active::before {
    opacity: 1;
}

@keyframes hallVipTagShine {
    0%, 100% { left: -80%; }
    50% { left: 120%; }
}

.hall-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.hall-window-btn {
    flex: 1;
    min-width: 0;
    max-width: none;
    border-radius: 22px;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 10px 12px;
    font-size: 13px;
    cursor: pointer;
    min-height: 42px;
}

.hall-window-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.hall-view-toggle {
    display: inline-flex;
    border: 1px solid #cbd5e1;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}

.hall-view-btn {
    border: none;
    background: transparent;
    color: #64748b;
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    min-height: 42px;
    line-height: 1;
}

.hall-view-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.hall-btn-refresh,
.hall-btn-publish {
    border-radius: 22px;
    min-height: 42px;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.hall-btn-refresh {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
}

.hall-btn-refresh.spinning {
    opacity: 0.7;
    pointer-events: none;
}

.hall-btn-publish {
    margin-left: auto;
    background: #fff;
    border: 1px solid #667eea;
    color: #667eea;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#vipBanner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.4;
}

#vipBanner a {
    background: #f59e0b;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
}

/* 手机端：免费/会员 Tab */
.hall-mobile-tabs {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    padding: 4px;
    background: #e2e8f0;
    border-radius: 14px;
}

.hall-mobile-tabs button {
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    min-height: 44px;
}

.hall-mobile-tabs button.active {
    background: #fff;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hall-mobile-tabs button .count {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 2px;
}

.hall-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.hall-columns.hall-unified {
    grid-template-columns: 1fr;
}

/* 统一双列大厅：整页滚动，禁止卡片区内部滚动（否则检索区无法吸顶） */
.hall-columns.hall-unified .hall-grid,
.page-algorithm-hall .hall-unified .hall-grid {
    max-height: none !important;
    overflow: visible !important;
}

.hall-unified .hall-mobile-tabs {
    display: none !important;
}

.hall-col-all .hall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 769px) {
    .hall-unified .hall-col-all .hall-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.hall-col-all .hall-col-head {
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
}

.hall-grid.hall-view-table {
    display: block;
    grid-template-columns: none;
}

.hall-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 0 0 14px 14px;
}

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

.hall-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.hall-table tbody td,
.hall-table tbody th {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.hall-table tbody th {
    font-weight: 600;
    color: #0f172a;
    text-align: left;
}

.hall-tb-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.hall-tb-row:hover {
    background: #f8fafc;
}

.hall-tb-acc {
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
}

.hall-tb-vip {
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
}

.hall-tb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.hall-tb-streak-win {
    color: #15803d;
    background: #dcfce7;
}

.hall-tb-streak-lose {
    color: #b91c1c;
    background: #fee2e2;
}

.hall-tb-win {
    color: #15803d;
    background: #ecfdf5;
}

.hall-tb-lose {
    color: #b91c1c;
    background: #fef2f2;
}

.hall-tb-view {
    border: 1px solid #93c5fd;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
}

.hall-tb-view:hover {
    background: #dbeafe;
}

.hall-skeleton-row {
    height: 18px;
    border-radius: 4px;
}

.card-vip-badge {
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.hall-col {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.hall-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.hall-col-head .badge-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.hall-col-free .hall-col-head {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.hall-col-vip .hall-col-head {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    padding: 10px;
    background: #f4f6f9;
    min-height: 100px;
    max-height: 72vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hall-view-card .hall-grid {
    display: grid;
}

.hall-view-card .algo-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 200px;
    contain: layout style paint;
}

.card-acc-lite {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 6px;
    padding: 6px 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.acc-lite-cell {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.acc-lite-cell b {
    display: block;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.acc-lite-cell small {
    display: block;
    font-size: 9px;
    color: #64748b;
    margin-top: 2px;
}

.acc-lite-cell.acc-high b { color: #15803d; }
.acc-lite-cell.acc-mid b { color: #2563eb; }
.acc-lite-cell.acc-warn b { color: #d97706; }
.acc-lite-cell.acc-low b { color: #64748b; }

.acc-lite-mid {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 9px;
    color: #94a3b8;
    text-align: center;
    padding: 0 4px;
}

.algo-card {
    background: #fff;
    border-radius: 12px;
    border: 1.5px solid #fde68a;
    padding: 12px 12px 10px;
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* 卡片左上角：免费 / 会员 */
.card-corner {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: calc(100% - 12px);
}

.card-corner .card-tier-badge {
    position: static;
    top: auto;
    left: auto;
}

.card-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fcd34d;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.card-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    object-fit: unset;
}

.card-tier-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 4;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.card-tier-badge.tier-free {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.card-tier-badge.tier-vip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: linear-gradient(135deg, #1c1917 0%, #b45309 35%, #fde047 55%, #d97706 100%);
    color: #1c1917;
    border: 1px solid rgba(251, 191, 36, 0.75);
    box-shadow:
        0 0 10px rgba(245, 158, 11, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.card-tier-badge.tier-vip .tier-vip-crown {
    font-size: 9px;
    line-height: 1;
}

.algo-card .card-top {
    padding-left: 42px;
}

.algo-card[data-vip="1"] .card-top {
    padding-left: 0;
    padding-top: 38px;
}

.algo-card:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    border-color: #fcd34d;
}

.algo-card:active {
    transform: scale(0.99);
}

.algo-card.card-hot {
    border-color: #f87171;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35), 0 4px 14px rgba(248, 113, 113, 0.12);
}

.algo-card.card-locked > *:not(.card-lock-overlay) {
    filter: blur(3px);
}

.algo-card.card-locked .card-lock-overlay {
    pointer-events: auto;
    cursor: pointer;
}

.card-lock-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 14px;
    font-weight: 600;
    color: #b45309;
    font-size: 14px;
    filter: none;
    padding: 12px;
    text-align: center;
}

.card-lock-overlay .lock-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    min-height: 44px;
}

.card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-bottom: 6px;
}

.card-id {
    color: #64748b;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-id .id-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
}

.card-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.card-tag.tag-kill { background: #ffedd5; color: #c2410c; }
.card-tag.tag-combo { background: #dcfce7; color: #15803d; }
.card-tag.tag-size { background: #dbeafe; color: #1d4ed8; }
.card-tag.tag-odd { background: #f3e8ff; color: #7c3aed; }
.card-tag.tag-double { background: #e0f2fe; color: #0369a1; }
.card-tag.tag-default { background: #f1f5f9; color: #475569; }

.card-streak {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.streak-win {
    background: #fee2e2;
    color: #dc2626;
}

.streak-lose {
    background: #dbeafe;
    color: #2563eb;
}

.card-fav {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    min-width: 36px;
    min-height: 36px;
    line-height: 1;
}

.card-fav.on {
    color: #f59e0b;
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.card-date {
    color: #94a3b8;
    font-size: 11px;
    flex-shrink: 0;
    padding-top: 2px;
}

.card-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    line-height: 1.35;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title .lv {
    display: inline-block;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.card-title .lv.lv-1, .card-title .lv.lv-2 { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.card-title .lv.lv-3, .card-title .lv.lv-4 { background: linear-gradient(135deg, #93c5fd, #3b82f6); }
.card-title .lv.lv-5, .card-title .lv.lv-6 { background: linear-gradient(135deg, #6ee7b7, #10b981); }
.card-title .lv.lv-7, .card-title .lv.lv-8 { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.card-title .lv.lv-9, .card-title .lv.lv-10 { background: linear-gradient(135deg, #f9a8d4, #ec4899); }

.card-rings-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 4px;
    background: #fafbfc;
    border-radius: 10px;
}

.ring-col {
    text-align: center;
    flex: 0 0 auto;
}

.ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 4px;
}

.ring span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
}

.ring-cap {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

.ring-mid {
    flex: 1;
    min-width: 0;
    padding: 0 4px;
}

.ring-mid .mid-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 3px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.ring-mid .mid-line:last-child {
    border-bottom: none;
}

.ring-mid em {
    font-style: normal;
    color: #94a3b8;
}

.ring-mid strong {
    color: #334155;
    font-weight: 700;
}

.card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.stat-cell {
    background: #f8fafc;
    border-radius: 8px;
    padding: 6px 4px;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.stat-cell b {
    display: block;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.stat-cell.stat-up b { color: #16a34a; }
.stat-cell.stat-down b { color: #dc2626; }

.stat-cell small {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1.25;
}

.card-history {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10px;
    color: #64748b;
    margin-bottom: 10px;
    padding: 0 2px;
}

.card-history b.up { color: #16a34a; font-weight: 800; }
.card-history b.down { color: #dc2626; font-weight: 800; }

.card-foot {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.foot-author,
.foot-views {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 38%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ico-user,
.ico-group,
.ico-chart {
    display: inline-block;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.ico-user {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.ico-group {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 24 24'%3E%3Cpath d='M16 11c1.66 0 3-1.34 3-3S17.66 5 16 5s-3 1.34-3 3 1.34 3 3 3zm-8 0c1.66 0 3-1.34 3-3S9.66 5 8 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5C15 14.17 10.33 13 8 13zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.btn-view {
    margin-left: auto;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    min-height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.btn-view .ico-chart {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M3 13h2v8H3v-8zm4-6h2v14H7V7zm4 4h2v10h-2V11zm4-8h2v18h-2V3z'/%3E%3C/svg%3E") center/contain no-repeat;
    opacity: 1;
}

.hall-load-more-wrap {
    padding: 12px 0 4px;
    text-align: center;
}

.hall-load-more {
    min-width: 200px;
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
}

.hall-load-more:disabled {
    opacity: 0.65;
    cursor: wait;
}

.hall-empty,
.hall-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 16px;
    color: #94a3b8;
}

.hall-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: hallShimmer 1.2s infinite;
    border-radius: 14px;
    height: 200px;
}

@keyframes hallShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.hall-toast {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0));
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 2000;
    transition: transform 0.3s ease;
    max-width: 90vw;
    text-align: center;
}

.hall-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 平板 */
@media (max-width: 900px) {
    .hall-columns {
        grid-template-columns: 1fr;
    }

    .hall-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        max-height: none;
    }
}

/* 手机：工具栏紧凑 + 单列表 */
@media (max-width: 768px) {
    .hall-mobile-tabs {
        display: grid !important;
    }

    .hall-columns .hall-col-vip {
        display: none;
    }

    .hall-columns.show-vip .hall-col-free {
        display: none;
    }

    .hall-columns.show-vip .hall-col-vip {
        display: block;
    }
}

@media (max-width: 768px) {
    body.page-algorithm-hall {
        padding-top: 92px;
    }

    .hall-wrap {
        padding: 0 8px calc(12px + env(safe-area-inset-bottom, 0));
    }

    .hall-filter-anchor {
        margin: 0 -6px 4px;
    }

    .hall-sticky-head {
        padding: 0 6px 2px;
    }

    .hall-sticky-head.is-pinned {
        top: 92px;
        padding: 0 8px 2px;
    }

    .hall-sticky-head .hall-toolbar {
        padding: 2px 0 2px;
    }

    .hall-sticky-head #vipBanner {
        margin: 0 0 2px;
        padding: 4px 6px;
        font-size: 10px;
        line-height: 1.3;
    }

    .hall-sticky-head #vipBanner a {
        min-height: 24px;
        padding: 3px 8px;
        font-size: 10px;
    }

    .hall-search {
        margin-bottom: 3px;
    }

    .hall-search input {
        padding: 6px 8px 6px 30px;
        font-size: 12px;
        min-height: 32px;
    }

    .hall-search::before {
        left: 8px;
        font-size: 12px;
    }

    .hall-pills-scroll {
        margin: 0 -6px;
        padding: 0 6px 1px;
    }

    .hall-pills {
        margin-bottom: 1px;
        gap: 3px;
    }

    .hall-pills button,
    .hall-window-btn,
    .hall-btn-refresh,
    .hall-btn-publish {
        padding: 3px 7px;
        min-height: 24px;
        font-size: 10px;
        border-radius: 12px;
    }

    .hall-view-toggle {
        display: none !important;
    }

    .hall-actions {
        margin-bottom: 2px;
        gap: 4px;
        display: flex;
        flex-wrap: wrap;
    }

    .hall-window-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: calc(50% - 4px);
        max-width: none;
    }

    .hall-btn-refresh,
    .hall-btn-publish,
    .hall-btn-reward {
        flex: 1 1 calc(33.33% - 4px);
        min-width: 0;
        margin-left: 0;
    }

    .hall-columns {
        scroll-margin-top: calc(92px + var(--hall-sticky-h, 120px));
        padding-top: 0;
    }

    .hall-grid {
        gap: 5px;
        padding: 2px 0 8px;
    }

    .hall-pills button.active,
    .hall-sort-btn.active,
    .hall-cat-btn.active,
    .hall-window-btn.active {
        box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    }

    /* Tab 已显示「免费/会员算法」，列头重复且易与上方留白叠在一起 */
    .hall-col .hall-col-head {
        display: none;
    }

    .hall-col {
        border-radius: 12px;
        box-shadow: none;
        background: transparent;
        overflow: visible;
    }

    .hall-columns {
        scroll-margin-top: calc(var(--site-header-h, 112px) + var(--hall-sticky-h, 180px));
    }

    .hall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        max-height: none;
        overflow: visible;
        padding: 4px 0 12px;
        background: transparent;
    }

    .hall-unified .hall-col-all .hall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hall-grid .algo-card:first-child,
    .hall-grid .hall-empty {
        scroll-margin-top: calc(var(--site-header-h, 112px) + var(--hall-sticky-h, 180px) + 12px);
    }

    .algo-card {
        padding: 8px 6px 6px;
        border-width: 1px;
        border-color: #fde68a;
        transition: none;
        box-shadow: none;
    }

    .algo-card:hover,
    .algo-card:active {
        transform: none;
        box-shadow: none;
    }

    .hall-view-card .algo-card {
        contain-intrinsic-size: auto 168px;
    }

    .hall-cards-lite .card-stats {
        margin-bottom: 4px;
    }

    .hall-cards-lite .card-foot {
        padding-top: 4px;
    }

    .card-tier-badge {
        font-size: 9px;
        padding: 1px 4px;
    }

    .card-avatar {
        width: 24px;
        height: 24px;
        border-width: 1.5px;
    }

    .algo-card[data-vip="1"] .card-top {
        padding-top: 32px;
    }

    .card-id {
        font-size: 10px;
    }

    .card-cat,
    .card-streak {
        font-size: 9px;
        padding: 2px 5px;
    }

    .card-top {
        margin-bottom: 4px;
    }

    .card-title-row {
        margin-bottom: 6px;
    }

    .card-title {
        font-size: 11px;
        -webkit-line-clamp: 1;
    }

    .card-title-row .card-date {
        font-size: 9px;
    }

    .card-rings-panel {
        padding: 4px 4px;
        margin-bottom: 4px;
        gap: 4px;
    }

    .ring-mid {
        display: none;
    }

    .ring-col {
        flex: 1;
    }

    .ring {
        width: 36px;
        height: 36px;
    }

    .ring span {
        width: 28px;
        height: 28px;
        font-size: 9px;
    }

    .ring-cap {
        font-size: 8px;
    }

    .card-stats {
        gap: 3px;
        margin-bottom: 4px;
    }

    .stat-cell {
        padding: 3px 2px;
    }

    .stat-cell b {
        font-size: 11px;
    }

    .stat-cell small {
        font-size: 8px;
    }

    .card-history {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .card-foot {
        padding-top: 4px;
        gap: 4px;
    }

    .card-history {
        display: none;
    }

    .foot-author {
        max-width: 42%;
        font-size: 9px;
    }

    .foot-views {
        display: inline-flex;
        max-width: 26%;
        font-size: 9px;
    }

    .btn-view {
        padding: 4px 8px;
        font-size: 10px;
        min-height: 28px;
        border-radius: 8px;
    }

    .card-fav {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .hall-sticky-head #vipBanner {
        display: none;
    }

    .hall-pills-scroll .hall-pills {
        flex-wrap: nowrap;
    }

    #vipBanner {
        flex-direction: row;
        align-items: center;
        gap: 6px;
        text-align: left;
        padding: 5px 8px;
        font-size: 10px;
        margin-bottom: 3px;
    }

    #vipBanner a {
        justify-content: center;
        min-height: 24px;
        padding: 3px 8px;
        font-size: 10px;
    }

}

/* 超小屏再收紧顶栏 */
@media (max-width: 380px) {
    .card-streak {
        font-size: 8px;
        padding: 1px 4px;
    }

    .ring {
        width: 32px;
        height: 32px;
    }

    .ring span {
        width: 24px;
        height: 24px;
        font-size: 8px;
    }

    .hall-pills button,
    .hall-window-btn,
    .hall-btn-refresh,
    .hall-btn-publish {
        padding: 2px 6px;
        font-size: 9px;
        min-height: 22px;
    }
}
