.category-rank-container {
    width: 100%;
    padding: 15px;
}

.category-rank-container ul,
.category-rank-container div {
    margin: 0;
    padding: 0;
}

/* Style 1: 经典列表样式 */
.category-rank-list.style-1 {
    list-style: none;
}

.category-rank-list.style-1 .category-rank-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.category-rank-list.style-1 .category-rank-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.category-rank-list.style-1 .category-rank-item.top-rank {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.category-rank-list.style-1 .category-rank-item.top-rank .category-link {
    color: #fff;
}

.category-rank-list.style-1 .category-rank-item.top-rank .category-count {
    color: rgba(255, 255, 255, 0.9);
}

.category-rank-list.style-1 .category-rank-item.top-rank .category-views {
    color: rgba(255, 255, 255, 0.8);
}

.category-rank-list.style-1 .rank-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    margin-right: 12px;
    background: #e9ecef;
    color: #495057;
    flex-shrink: 0;
}

.category-rank-list.style-1 .category-rank-item.rank-1 .rank-number {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.category-rank-list.style-1 .category-rank-item.rank-2 .rank-number {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.category-rank-list.style-1 .category-rank-item.rank-3 .rank-number {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.category-rank-list.style-1 .category-icon {
    font-size: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.category-rank-list.style-1 .category-link {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-rank-list.style-1 .category-link:hover {
    color: #667eea;
}

.category-rank-list.style-1 .category-count {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
    flex-shrink: 0;
}

.category-rank-list.style-1 .category-views {
    font-size: 12px;
    color: #999;
    margin-left: auto;
    padding-left: 10px;
    flex-shrink: 0;
}

/* Style 2: 卡片网格样式 */
.category-rank-grid.style-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-rank-grid.style-2 .category-rank-card {
    position: relative;
    padding: 20px 15px;
    background: linear-gradient(145deg, #ffffff 0%, #f5f7fa 100%);
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e8ecf1;
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-rank-grid.style-2 .category-rank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.category-rank-grid.style-2 .category-rank-card.rank-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.category-rank-grid.style-2 .category-rank-card.rank-2 {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: #fff;
    border: none;
}

.category-rank-grid.style-2 .category-rank-card.rank-3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
}

.category-rank-grid.style-2 .rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.category-rank-grid.style-2 .category-rank-card.rank-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #fff;
}

.category-rank-grid.style-2 .category-icon-wrap {
    font-size: 32px;
    margin-bottom: 10px;
}

.category-rank-grid.style-2 .category-rank-card .category-link {
    display: block;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-rank-grid.style-2 .category-stats {
    font-size: 11px;
    opacity: 0.9;
}

.category-rank-grid.style-2 .post-count,
.category-rank-grid.style-2 .view-count {
    display: block;
    margin: 2px 0;
}

/* Style 3: 横向条状样式 */
.category-rank-horizontal.style-3 {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-rank-horizontal.style-3 .category-rank-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border-radius: 50px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.category-rank-horizontal.style-3 .category-rank-item:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
}

.category-rank-horizontal.style-3 .rank-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    margin-right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    flex-shrink: 0;
}

.category-rank-horizontal.style-3 .category-rank-item.rank-1 .rank-num {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
}

.category-rank-horizontal.style-3 .category-rank-item.rank-2 .rank-num {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
}

.category-rank-horizontal.style-3 .category-rank-item.rank-3 .rank-num {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
}

.category-rank-horizontal.style-3 .category-icon {
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

.category-rank-horizontal.style-3 .category-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-rank-horizontal.style-3 .category-link:hover {
    color: #667eea;
}

.category-rank-horizontal.style-3 .category-meta {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Style 4: 圆形徽章样式 */
.category-rank-circle.style-4 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.category-rank-circle.style-4 .category-rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    width: calc(33.333% - 10px);
    min-width: 80px;
    transition: all 0.3s ease;
}

.category-rank-circle.style-4 .category-rank-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.category-rank-circle.style-4 .rank-circle {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.category-rank-circle.style-4 .category-rank-item.rank-1 .rank-circle {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    width: 60px;
    height: 60px;
    font-size: 22px;
}

.category-rank-circle.style-4 .category-rank-item.rank-2 .rank-circle {
    background: linear-gradient(135deg, #c0c0c0 0%, #a8a8a8 100%);
    box-shadow: 0 4px 15px rgba(192, 192, 192, 0.4);
    width: 55px;
    height: 55px;
    font-size: 20px;
}

.category-rank-circle.style-4 .category-rank-item.rank-3 .rank-circle {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.4);
}

.category-rank-circle.style-4 .category-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.category-rank-circle.style-4 .category-link {
    display: block;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.category-rank-circle.style-4 .category-link:hover {
    color: #667eea;
}

.category-rank-circle.style-4 .category-info {
    font-size: 11px;
    color: #999;
    text-align: center;
}

.category-rank-circle.style-4 .post-count,
.category-rank-circle.style-4 .view-count {
    display: block;
}

/* 空状态 */
.category-rank-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-rank-grid.style-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-rank-circle.style-4 .category-rank-item {
        width: calc(50% - 8px);
        min-width: 70px;
        padding: 12px;
    }

    .category-rank-circle.style-4 .category-rank-item.rank-1 .rank-circle {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .category-rank-circle.style-4 .category-rank-item.rank-2 .rank-circle {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .category-rank-grid.style-2 {
        grid-template-columns: 1fr;
    }

    .category-rank-circle.style-4 {
        gap: 10px;
    }

    .category-rank-circle.style-4 .category-rank-item {
        width: calc(50% - 5px);
        padding: 10px;
    }

    .category-rank-list.style-1 .category-rank-item {
        padding: 10px 8px;
    }

    .category-rank-list.style-1 .rank-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-right: 8px;
    }

    .category-rank-list.style-1 .category-icon {
        font-size: 16px;
        margin-right: 6px;
    }

    .category-rank-list.style-1 .category-rank-item .category-views {
        display: none;
    }

    .category-rank-horizontal.style-3 .category-rank-item {
        padding: 12px 14px;
    }

    .category-rank-horizontal.style-3 .rank-num {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 8px;
    }

    .category-rank-horizontal.style-3 .category-meta {
        display: none;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-rank-container .category-rank-item {
    animation: fadeInUp 0.5s ease forwards;
}

.category-rank-container .category-rank-item:nth-child(1) { animation-delay: 0.05s; }
.category-rank-container .category-rank-item:nth-child(2) { animation-delay: 0.1s; }
.category-rank-container .category-rank-item:nth-child(3) { animation-delay: 0.15s; }
.category-rank-container .category-rank-item:nth-child(4) { animation-delay: 0.2s; }
.category-rank-container .category-rank-item:nth-child(5) { animation-delay: 0.25s; }
.category-rank-container .category-rank-item:nth-child(6) { animation-delay: 0.3s; }
.category-rank-container .category-rank-item:nth-child(7) { animation-delay: 0.35s; }
.category-rank-container .category-rank-item:nth-child(8) { animation-delay: 0.4s; }
.category-rank-container .category-rank-item:nth-child(9) { animation-delay: 0.45s; }
.category-rank-container .category-rank-item:nth-child(10) { animation-delay: 0.5s; }

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .category-rank-list.style-1 .category-rank-item {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
        border-color: #404040;
    }

    .category-rank-list.style-1 .category-rank-item .category-link {
        color: #e0e0e0;
    }

    .category-rank-list.style-1 .category-rank-item .category-link:hover {
        color: #667eea;
    }

    .category-rank-grid.style-2 .category-rank-card {
        background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 100%);
        border-color: #404040;
    }

    .category-rank-grid.style-2 .category-rank-card .category-link {
        color: #e0e0e0;
    }

    .category-rank-horizontal.style-3 .category-rank-item {
        background: #1a1a1a;
        border-color: #404040;
    }

    .category-rank-horizontal.style-3 .category-link {
        color: #e0e0e0;
    }

    .category-rank-horizontal.style-3 .category-rank-item:hover {
        background: linear-gradient(135deg, #2d2d2d 0%, #333333 100%);
    }

    .category-rank-circle.style-4 .category-rank-item {
        background: #1a1a1a;
        border-color: #404040;
    }

    .category-rank-circle.style-4 .category-link {
        color: #e0e0e0;
    }
}
