/* 三栏榜单样式 */
.zrb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.zrb-ranking-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    animation: zrb-fade-in-up 0.8s ease-out;
}

@keyframes zrb-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.zrb-ranking-board {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zrb-ranking-board:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.zrb-board-header {
    padding: 20px;
    color: white;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    position: relative;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 居中色块样式 */
.zrb-header-text {
    display: inline-block;
    padding: 12px 40px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 悬停效果 */
.zrb-ranking-board:hover .zrb-header-text {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 为每个榜单设置渐变色 */
.zrb-ranking-board[data-board="1"] .zrb-header-text {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

.zrb-ranking-board[data-board="2"] .zrb-header-text {
    background: linear-gradient(135deg, #5eead4 0%, #14b8a6 100%);
}

.zrb-ranking-board[data-board="3"] .zrb-header-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.zrb-board-content {
    padding: 0;
}

.zrb-ranking-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease, padding-left 0.2s ease;
    text-decoration: none;
    color: inherit;
    animation: zrb-slide-in 0.5s ease-out backwards;
}

.zrb-ranking-board[data-board="1"] .zrb-ranking-item:nth-child(1) { animation-delay: 0.1s; }
.zrb-ranking-board[data-board="1"] .zrb-ranking-item:nth-child(2) { animation-delay: 0.15s; }
.zrb-ranking-board[data-board="1"] .zrb-ranking-item:nth-child(3) { animation-delay: 0.2s; }
.zrb-ranking-board[data-board="1"] .zrb-ranking-item:nth-child(4) { animation-delay: 0.25s; }
.zrb-ranking-board[data-board="1"] .zrb-ranking-item:nth-child(5) { animation-delay: 0.3s; }

.zrb-ranking-board[data-board="2"] .zrb-ranking-item:nth-child(1) { animation-delay: 0.15s; }
.zrb-ranking-board[data-board="2"] .zrb-ranking-item:nth-child(2) { animation-delay: 0.2s; }
.zrb-ranking-board[data-board="2"] .zrb-ranking-item:nth-child(3) { animation-delay: 0.25s; }
.zrb-ranking-board[data-board="2"] .zrb-ranking-item:nth-child(4) { animation-delay: 0.3s; }
.zrb-ranking-board[data-board="2"] .zrb-ranking-item:nth-child(5) { animation-delay: 0.35s; }

.zrb-ranking-board[data-board="3"] .zrb-ranking-item:nth-child(1) { animation-delay: 0.2s; }
.zrb-ranking-board[data-board="3"] .zrb-ranking-item:nth-child(2) { animation-delay: 0.25s; }
.zrb-ranking-board[data-board="3"] .zrb-ranking-item:nth-child(3) { animation-delay: 0.3s; }
.zrb-ranking-board[data-board="3"] .zrb-ranking-item:nth-child(4) { animation-delay: 0.35s; }
.zrb-ranking-board[data-board="3"] .zrb-ranking-item:nth-child(5) { animation-delay: 0.4s; }

@keyframes zrb-slide-in {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.zrb-ranking-item:hover {
    background: #f9fafb;
    padding-left: 24px;
}

.zrb-ranking-item:last-child {
    border-bottom: none;
}

.zrb-rank-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    margin-right: 14px;
    margin-top: 4px;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.zrb-item-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 14px;
    margin-top: 4px;
    flex-shrink: 0;
    border: 2px solid #f3f4f6;
    transition: transform 0.2s ease, border-color 0.2s ease;
    background: #f9fafb;
}

/* 图片加载失败时的样式 */
.zrb-item-thumbnail[src*="data:image/svg"] {
    object-fit: contain;
    padding: 5px;
}

.zrb-ranking-item:hover .zrb-item-thumbnail {
    transform: scale(1.05);
    border-color: #e5e7eb;
}

.zrb-item-info {
    flex: 1;
    min-width: 0;
}

.zrb-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.zrb-item-excerpt {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 36px;
}

.zrb-item-stats {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}

/* 方案1：使用眼睛图标（推荐）*/
.zrb-item-stats::before {
    content: "👁";
    margin-right: 4px;
    font-size: 14px;
}

/* 方案2：使用火焰图标（热度）
.zrb-item-stats::before {
    content: "🔥";
    margin-right: 4px;
    font-size: 14px;
}
*/

/* 方案3：使用评论气泡（评论数）
.zrb-item-stats::before {
    content: "💬";
    margin-right: 4px;
    font-size: 14px;
}
*/

/* 方案4：使用点赞图标
.zrb-item-stats::before {
    content: "👍";
    margin-right: 4px;
    font-size: 14px;
}
*/

/* 方案5：使用星星图标
.zrb-item-stats::before {
    content: "⭐";
    margin-right: 4px;
    font-size: 14px;
}
*/

/* 方案6：使用圆形数字标签（现代风格）
.zrb-item-stats {
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.zrb-item-stats::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    margin-right: 6px;
}
*/

/* 方案7：使用SVG图标（最专业）
.zrb-item-stats::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%239ca3af"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>') no-repeat center;
    background-size: contain;
}
*/

.zrb-board-footer {
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
}

.zrb-update-link {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.zrb-no-posts {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .zrb-ranking-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .zrb-ranking-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .zrb-ranking-board {
        border-radius: 16px;
    }

    .zrb-item-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .zrb-rank-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .zrb-item-title {
        font-size: 13px;
    }
    
    .zrb-item-excerpt {
        font-size: 11px;
        -webkit-line-clamp: 2;
        max-height: 33px;
    }
    
    .zrb-board-header {
        font-size: 15px;
        padding: 15px 20px;
    }
    
    .zrb-header-text {
        padding: 10px 30px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .zrb-container {
        padding: 10px;
    }
    
    .zrb-ranking-item {
        padding: 12px 15px;
    }
    
    .zrb-item-thumbnail {
        width: 45px;
        height: 45px;
    }
    
    .zrb-rank-number {
        width: 26px;
        height: 26px;
        font-size: 11px;
        margin-right: 10px;
    }
    
    .zrb-item-title {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .zrb-item-excerpt {
        font-size: 10px;
        -webkit-line-clamp: 2;
        max-height: 30px;
        margin-bottom: 4px;
    }
    
    .zrb-item-stats {
        font-size: 10px;
    }
}
