.tb-like { pointer-events: auto !important; }
/* 点赞的子元素也允许点击且保持最高层级 */
.tb-like, .tb-like * {
    z-index: 100010 !important;
    position: relative;
    pointer-events: auto !important;
}
.hover-category-float { pointer-events: auto !important; }
.hover-category-float .hover-category-content { pointer-events: auto !important; }
.hover-category-content {
    pointer-events: auto !important;
}
/* 高端卡片悬浮特效 CSS */

/* 基础卡片样式 */
.home .tb-s-card, .home .card, .home .site-card, .home .post-card,
.home li.-rds, .home li.post-site, .home li.post-news, .home li.post-flash, .home li.post-quick,
.home .tb-b-card, .home .post-list li {
    position: relative;
    overflow: hidden;
    transition: none;
}

/* 悬浮时的整体效果 - 只保留边框特效，通过::before伪元素实现 */

/* 渐变边框特效 */
.home .tb-s-card::before, .home .card::before, .home .site-card::before, .home .post-card::before,
.home li.-rds::before, .home li.post-site::before, .home li.post-news::before, .home li.post-flash::before, .home li.post-quick::before,
.home .tb-b-card::before, .home .post-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #4facfe 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -100 !important;
    pointer-events: none !important;
}

.home .tb-s-card:hover::before, .home .card:hover::before, .home .site-card:hover::before, .home .post-card:hover::before,
.home li.-rds:hover::before, .home li.post-site:hover::before, .home li.post-news:hover::before, .home li.post-flash:hover::before, .home li.post-quick:hover::before,
.home .tb-b-card:hover::before, .home .post-list li:hover::before {
    opacity: 1;
    animation: borderRotate 3s linear infinite;
}

/* 当卡片被标记为 no-card-hover（例如鼠标在点赞上）时，关闭所有悬浮边框特效 */
.home li.no-card-hover:hover::before,
.home .tb-s-card.no-card-hover:hover::before,
.home .card.no-card-hover:hover::before,
.home .site-card.no-card-hover:hover::before,
.home .post-card.no-card-hover:hover::before,
.home .tb-b-card.no-card-hover:hover::before {
    opacity: 0 !important;
    animation: none !important;
}

/* 边框旋转动画 */
@keyframes borderRotate {
    0% {
        background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe);
    }
    25% {
        background: linear-gradient(135deg, #764ba2, #f093fb, #f5576c, #4facfe, #667eea);
    }
    50% {
        background: linear-gradient(225deg, #f093fb, #f5576c, #4facfe, #667eea, #764ba2);
    }
    75% {
        background: linear-gradient(315deg, #f5576c, #4facfe, #667eea, #764ba2, #f093fb);
    }
    100% {
        background: linear-gradient(45deg, #4facfe, #667eea, #764ba2, #f093fb, #f5576c);
    }
}

/* 确保卡片内的链接和按钮可以正常点击 */
.home .tb-s-card a, .home .tb-s-card button, .home .card a, .home .card button, .home .site-card a, .home .site-card button, .home .post-card a, .home .post-card button,
.home li.-rds a, .home li.-rds button, .home li.post-site a, .home li.post-site button, .home li.post-news a, .home li.post-news button, 
.home li.post-flash a, .home li.post-flash button, .home li.post-quick a, .home li.post-quick button,
.home .tb-b-card a, .home .tb-b-card button, .home .post-list li a, .home .post-list li button {
    position: relative !important;
    z-index: 999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* 特别针对二维码和直达链接 */
.home .tb-s-card .qrcode, .home .tb-s-card .site-link, .home .card .qrcode, .home .card .site-link, 
.home .site-card .qrcode, .home .site-card .site-link, .home .post-card .qrcode, .home .post-card .site-link,
.home li.-rds .qrcode, .home li.-rds .site-link, .home li.post-site .qrcode, .home li.post-site .site-link, 
.home li.post-news .qrcode, .home li.post-news .site-link, .home li.post-flash .qrcode, .home li.post-flash .site-link, 
.home li.post-quick .qrcode, .home li.post-quick .site-link,
.home .tb-b-card .qrcode, .home .tb-b-card .site-link, .home .post-list li .qrcode, .home .post-list li .site-link {
    z-index: 1000 !important;
    display: inline-block !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* 确保收藏按钮等高优先级元素正常工作 - 最小化干预 */
.home .tb-collect-wraper {
    z-index: 1001 !important;
}

.home .tb-collect {
    z-index: 1001 !important;
}

.home .post-ticky {
    z-index: 1001 !important;
}

/* 悬浮分类显示样式 */
.hover-category-display {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    z-index: 99999 !important;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    pointer-events: auto !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Body 层浮动分类容器，确保不被卡片内层覆盖 */

.hover-category-float {
    position: fixed;
    z-index: 1000 !important; /* below like/collect; above卡片内容 */
    /* 浮层容器本身不拦截点击，点击可穿透到点赞；内部内容再开启点击 */
    pointer-events: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0 0 2px; /* 右侧宽度由JS裁切，避免覆盖点赞 */
    opacity: 0;
    transform: none;
    transition: opacity .18s ease;
}

.hover-category-float.show {
    opacity: 1;
    transform: none;
}

.hover-category-float .hover-category-content {
    pointer-events: none !important; /* 容器不接收事件，避免遮挡点赞 */
}

.hover-category-float .hover-category-link {
    pointer-events: auto !important; /* 仅链接可点 */
    color: #ff9900;
    padding: 1px 6px;
    margin-right: 4px;
    display: inline-block;
    line-height: 18px;
    font-size: 12px;
    border-radius: 10px;
    background: rgba(255,153,0,0.08);
    cursor: pointer;
    transition: all .2s ease;
}

.hover-category-float .hover-category-link:hover {
    color: #ff7a00;
    background: rgba(255,153,0,0.18);
}

/* 移除分类之间的"/" 分隔符 */
.hover-category-float .category-separator,
.hover-category-display .category-separator {
    display: none !important;
}

/* 悬浮期间隐藏卡片内 metas */
.hover-metas-hidden {
    opacity: 1 !important;
}

/* 仅隐藏 metas 内除点赞外的元素，点赞保持可见 */
.hover-metas-hidden .-meta.-lk,
.hover-metas-hidden .-meta.-views {
    opacity: 0 !important;
    visibility: hidden !important;
}

.hover-category-display * {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.hover-category-display .hover-category-link {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    padding: 2px 4px;
    display: inline-block !important;
    margin: 0 1px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer !important;
    position: relative !important;
    z-index: 99999 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.hover-category-display .hover-category-link:hover {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
    transform: translateY(-1px);
}

.hover-category-display .category-separator {
    color: #999;
    margin: 0 4px;
    font-weight: 300;
    opacity: 0.7;
}

/* 悬浮时显示分类 */
.home .tb-s-card:hover .hover-category-display, 
.home .card:hover .hover-category-display, 
.home .site-card:hover .hover-category-display, 
.home .post-card:hover .hover-category-display,
.home li.-rds:hover .hover-category-display, 
.home li.post-site:hover .hover-category-display, 
.home li.post-news:hover .hover-category-display, 
.home li.post-flash:hover .hover-category-display, 
.home li.post-quick:hover .hover-category-display,
.home .tb-b-card:hover .hover-category-display, 
.home .post-list li:hover .hover-category-display {
    opacity: 1;
    transform: translateY(0);
}

/* 悬浮时只隐藏底部的直达和点赞按钮，不影响右上角功能 */
.home .tb-s-card:hover .-metas .-meta.-lk,
.home .card:hover .-metas .-meta.-lk,
.home .site-card:hover .-metas .-meta.-lk,
.home .post-card:hover .-metas .-meta.-lk,
.home li.-rds:hover .-metas .-meta.-lk,
.home li.post-site:hover .-metas .-meta.-lk,
.home li.post-news:hover .-metas .-meta.-lk,
.home li.post-flash:hover .-metas .-meta.-lk,
.home li.post-quick:hover .-metas .-meta.-lk,
.home .tb-b-card:hover .-metas .-meta.-lk,
.home .post-list li:hover .-metas .-meta.-lk {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.home .tb-s-card:hover .-metas .-meta.-views,
.home .card:hover .-metas .-meta.-views,
.home .site-card:hover .-metas .-meta.-views,
.home .post-card:hover .-metas .-meta.-views,
.home li.-rds:hover .-metas .-meta.-views,
.home li.post-site:hover .-metas .-meta.-views,
.home li.post-news:hover .-metas .-meta.-views,
.home li.post-flash:hover .-metas .-meta.-views,
.home li.post-quick:hover .-metas .-meta.-views,
.home .tb-b-card:hover .-metas .-meta.-views,
.home .post-list li:hover .-metas .-meta.-views {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.home .tb-s-card:hover .-metas .tb-like,
.home .card:hover .-metas .tb-like,
.home .site-card:hover .-metas .tb-like,
.home .post-card:hover .-metas .tb-like,
.home li.-rds:hover .-metas .tb-like,
.home li.post-site:hover .-metas .tb-like,
.home li.post-news:hover .-metas .tb-like,
.home li.post-flash:hover .-metas .tb-like,
.home li.post-quick:hover .-metas .tb-like,
.home .tb-b-card:hover .-metas .tb-like,
.home .post-list li:hover .-metas .tb-like {
    opacity: 1 !important;
    transform: none !important;
}

/* 点赞区域悬浮时，工具详情/浏览数也保持可见（避免任何隐藏动画） */
li.no-card-hover:hover .-metas .-meta.-lk,
li.no-card-hover:hover .-metas .-meta.-views {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* 点赞按钮层级与收藏一致，确保在所有效果上方可点 */
.tb-like {
    z-index: 100005 !important;
    position: relative !important;
}

.tb-collect,
.tb-collect-wraper {
    z-index: 1001 !important;
}

/* 分类显示期间，工具详情必须隐藏（直到分类消失）*/
.showing-cats .-metas .-meta.-lk,
.showing-cats .-metas .-meta.-views {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 确保收藏按钮不受悬浮隐藏影响 */
.tb-s-card:hover .tb-collect-wraper,
.card:hover .tb-collect-wraper,
.site-card:hover .tb-collect-wraper,
.post-card:hover .tb-collect-wraper,
li.-rds:hover .tb-collect-wraper,
li.post-site:hover .tb-collect-wraper,
li.post-news:hover .tb-collect-wraper,
li.post-flash:hover .tb-collect-wraper,
li.post-quick:hover .tb-collect-wraper,
.tb-b-card:hover .tb-collect-wraper,
.post-list li:hover .tb-collect-wraper {
    opacity: 1 !important;
    transform: none !important;
}

/* 性能优化 */
.home .tb-s-card, .home .card, .home .site-card, .home .post-card,
.home li.-rds, .home li.post-site, .home li.post-news, .home li.post-flash, .home li.post-quick,
.home .tb-b-card, .home .post-list li {
    will-change: transform;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hover-category-display {
        font-size: 11px;
        bottom: 8px;
        left: 8px;
        right: 8px;
    }
    
    .hover-category-display .hover-category-link {
        padding: 1px 3px;
        margin: 0 0.5px;
    }
    /* 移动端：评分区改为文内排版，避免覆盖内容 */
    .site-rate-wraper { position: static; margin: 8px 0 6px; display: block; }
    .tb-rate { width: 100%; box-shadow: none; padding: 8px 6px; background: #f7f9fc; }
    .tb-rate .-left { min-width: 40px; }
    .tb-rate .-avg { font-size: 18px; }
    .tb-rate .-stars .star { transform: scale(0.95); }
    .tb-rate .-action { margin-left: auto; }
}

/* 评分模块基础样式 */
.site-rate-wraper { position: absolute; right: 0; top: -4px; }
.tb-rate { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 8px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(18,38,63,0.06); }
.tb-rate .-left { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.tb-rate .-avg { font-size: 20px; font-weight: 700; color: #0b80ea; line-height: 1; }
.tb-rate .-unit { font-size: 12px; color: #777; }
.tb-rate .-count { margin: 0; font-size: 12px; color: #999; white-space: nowrap; }
.tb-rate .-stars { display: inline-flex; gap: 6px; overflow: hidden; transition: all 0.3s ease; }

/* PC端默认折叠星星 */
@media (min-width: 769px) {
    .tb-rate .-stars { 
        width: 0; 
        opacity: 0; 
        gap: 0;
        transform: scale(0.8);
    }
    .tb-rate:hover .-stars { 
        width: auto; 
        opacity: 1; 
        gap: 6px;
        transform: scale(1);
    }
}

.tb-rate .star { width: 18px; height: 18px; background: #e6e9ef; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21 16.54 13.97 22 9.24 14.81 8.62 12 2 9.19 8.63 2 9.24 7.46 13.97 5.82 21z"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21 16.54 13.97 22 9.24 14.81 8.62 12 2 9.19 8.63 2 9.24 7.46 13.97 5.82 21z"/></svg>') center/contain no-repeat; cursor: pointer; transition: all .2s ease; }
.tb-rate .star.full { background: #00cc66; }
.tb-rate .star.half { background: linear-gradient(90deg, #00cc66 50%, #e6e9ef 50%); }
.tb-rate .star.empty { background: #e6e9ef; }
.tb-rate .star.hover { background: #00b85a; }
.tb-rate .-action { font-size: 12px; color: #666; white-space: nowrap; background: #eef4ff; border: 1px solid #cfe0ff; color: #0b80ea; padding: 4px 8px; border-radius: 6px; cursor: pointer; }

/* 评分弹窗 */
.tb-rate-modal{ display:none; position:fixed; inset:0; z-index:100001; }
.tb-rate-modal.show{ display:block; }
.tb-rate-modal .-mask{ position:absolute; inset:0; background:rgba(0,0,0,.4); }
.tb-rate-modal .-inner{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:420px; background:#fff; border-radius:12px; box-shadow:0 10px 40px rgba(0,0,0,0.12); padding:24px 24px 24px; text-align:center; }
.tb-rate-modal .-title{ margin:0 0 6px; font-size:20px; font-weight:700; color:#333; }
.tb-rate-modal .-sub{ margin:0 0 16px; color:#666; }
.tb-rate-modal .-stars{ display:inline-flex; gap:12px; margin:12px 12px 18px 0; justify-content:center; vertical-align: middle; }
.tb-rate-modal .-stars .star{ width:28px; height:28px; background:#e6e9ef; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21 16.54 13.97 22 9.24 14.81 8.62 12 2 9.19 8.63 2 9.24 7.46 13.97 5.82 21z"/></svg>') center/contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21 16.54 13.97 22 9.24 14.81 8.62 12 2 9.19 8.63 2 9.24 7.46 13.97 5.82 21z"/></svg>') center/contain no-repeat; cursor:pointer; transition:all .2s ease; }
.tb-rate-modal .-stars .star.hover, .tb-rate-modal .-stars .star.active{ background:#00cc66; }
.tb-rate-modal .-ok{ display:inline-flex; align-items:center; border:none; background:#0b80ea; color:#fff; border-radius:6px; height:28px; padding:0 16px; cursor:pointer; line-height:1; vertical-align: middle; }

/* 移动端最终覆盖（保证在文件末尾，权重最高） */
@media (max-width: 768px) {
    .site-rate-wraper { position: static !important; margin: 8px 0 6px !important; display: block !important; }
    .tb-rate { width: 100% !important; box-shadow: none !important; padding: 8px 6px !important; background: #f7f9fc !important; }
    .tb-rate .-left { min-width: 40px !important; }
    .tb-rate .-avg { font-size: 18px !important; }
    .tb-rate .-count { font-size: 11px !important; letter-spacing: 0 !important; white-space: nowrap !important; }
    .tb-rate .-stars .star { transform: scale(0.95) !important; }
    .tb-rate .-action { margin-left: auto !important; font-size: 12px !important; white-space: normal !important; word-break: break-all !important; width: 2.2em !important; line-height: 1.1 !important; text-align: center !important; }
    
    /* 移动端深色模式背景修正 */
    html.darking .tb-rate { background: #1e1f25 !important; }
}

/* 首页列表评分简要样式 */
.list-rate{ display:inline-flex; align-items: baseline; margin-right: 8px; color:#666; }
.list-rate .-num{ color:#0b80ea; font-size:16px; font-weight:700; margin-right:2px; }
.list-rate .-sep{ color:#9aa4b2; font-size:12px; margin-right:6px; }
.list-rate .-cnt{ color:#9aa4b2; font-size:12px; }
/* 编辑推荐按钮样式 */
.list-rate .-num.recommend-badge{ 
    font-size:12px; 
    padding:3px 8px; 
    background:linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
    background-size:400% 400%;
    animation:rainbow-text 3s ease-in-out infinite;
    color:#fff; 
    border-radius:12px; 
    font-weight:600; 
    margin-right:4px;
    display:inline-block;
    line-height:1.3;
    text-shadow:0 1px 2px rgba(0,0,0,0.3);
    box-shadow:0 2px 4px rgba(0,0,0,0.1);
}

@keyframes rainbow-text {
    0%, 100% { background-position:0% 50%; }
    50% { background-position:100% 50%; }
}

/* 评分排行榜专用样式 */
.rating-rank-list .rating-rank-item {
    position: relative;
}

.rating-rank-list .rating-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.rating-rank-list .rating-score {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b35;
    margin-bottom: 4px;
}

.rating-rank-list .rating-stars {
    margin-bottom: 2px;
}

.rating-rank-list .star-rating {
    display: flex;
    gap: 1px;
}

.rating-rank-list .star-rating i {
    font-size: 12px;
    color: #ffd700;
}

.rating-rank-list .star-rating .fa-star-o {
    color: #ddd;
}

.rating-rank-list .rating-count {
    font-size: 10px;
    color: #999;
    white-space: nowrap;
}

/* 暗色模式下的评分排行榜样式 */
html.darking .rating-rank-list .rating-score {
    color: #ff8a65;
}

html.darking .rating-rank-list .star-rating .fa-star-o {
    color: #555;
}

html.darking .rating-rank-list .rating-count {
    color: #aaa;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .rating-rank-list .rating-meta {
        min-width: 60px;
    }
    
    .rating-rank-list .rating-score {
        font-size: 16px;
    }
    
    .rating-rank-list .star-rating i {
        font-size: 10px;
    }
    
    .rating-rank-list .rating-count {
        font-size: 9px;
    }
}

/* 暗色模式适配 */
html.darking .tb-rate{ background:#1e1f25; box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
html.darking .tb-rate .-unit, html.darking .tb-rate .-count{ color:#a7adbb; }
html.darking .tb-rate .-action{ background:#243148; border-color:#3a4e75; color:#90b8ff; }
/* 暗色下星星配色（移动和桌面统一） */
html.darking .tb-rate .star.empty{ background:#5b6474 !important; }
html.darking .tb-rate .star.full{ background:#10d690 !important; }
html.darking .tb-rate .star.half{ background: linear-gradient(90deg, #10d690 50%, #5b6474 50%) !important; }
html.darking .tb-rate .star.hover{ background:#0ec081 !important; }
/* 兜底强化：任何位置的星标在暗色下都走同一配色 */
html.darking i.star.empty{ background:#5b6474 !important; }
html.darking i.star.full{ background:#10d690 !important; }
html.darking i.star.half{ background: linear-gradient(90deg, #10d690 50%, #5b6474 50%) !important; }
html.darking i.star.hover{ background:#0ec081 !important; }
html.darking .list-rate{ color:#a7adbb; }
html.darking .list-rate .-sep, html.darking .list-rate .-cnt{ color:#7f8794; }
/* 暗色模式下的编辑推荐按钮 */
html.darking .list-rate .-num.recommend-badge{ 
    background:linear-gradient(45deg, #ff8a80, #80cbc4, #81c784, #aed581, #ffb74d, #f8bbd9, #90caf9);
    background-size:400% 400%;
    animation:rainbow-text 3s ease-in-out infinite;
    color:#fff;
    text-shadow:0 1px 3px rgba(0,0,0,0.5);
    box-shadow:0 2px 6px rgba(0,0,0,0.2);
}
/* 详情页弹窗暗色适配 */
html.darking .tb-rate-modal .-inner{ background:#1f2230; box-shadow:0 10px 40px rgba(0,0,0,.5); }
html.darking .tb-rate-modal .-title{ color:#e6e9ef; }
html.darking .tb-rate-modal .-sub{ color:#a7adbb; }
html.darking .tb-rate-modal .-stars .star{ background:#5b6474 !important; }
html.darking .tb-rate-modal .-stars .star.active, html.darking .tb-rate-modal .-stars .star.hover{ background:#10d690 !important; }

/* 悬浮时隐藏简要评分，显示分类 */
.home li.-rds:hover .list-rate,
.home li.post-site:hover .list-rate { display:none; }
/* 当显示分类浮层（showing-cats）时，评分也隐藏 */
.showing-cats .list-rate { display:none !important; }