/* ========================================
   小蜜阅读 - 现代化排行榜样式
   全新设计 - 2025版
   ======================================== */

/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

/* ==================== 现代化导航栏 ==================== */
.modern-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ==================== 排行榜容器 ==================== */
.ranking-container {
    min-height: calc(100vh - 200px);
    padding: 30px 0 60px;
}

/* ==================== 页面标题 ==================== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.page-header h1 i {
    color: #667eea;
    font-size: 2.2rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #718096;
}

/* ==================== 频道Tab ==================== */
.channel-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.channel-tab {
    padding: 16px 40px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.channel-tab i {
    font-size: 1.2rem;
}

.channel-tab:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.channel-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* ==================== 榜单类型Tab ==================== */
.ranking-type-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.type-tab {
    padding: 10px 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.type-tab i {
    font-size: 0.9rem;
}

.type-tab:hover {
    background: #f7fafc;
    border-color: #667eea;
    color: #667eea;
}

.type-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ==================== 更新时间 ==================== */
.update-info {
    text-align: center;
    margin-bottom: 30px;
    color: #a0aec0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.update-info i {
    font-size: 0.85rem;
}

/* ==================== 排行榜列表容器 ==================== */
.ranking-list-container {
    max-width: 1000px;
    margin: 0 auto;
}

.ranking-list {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ==================== 排行榜项目 ==================== */
.ranking-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.ranking-item:hover {
    background: white;
    border-color: #667eea;
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
}

/* 前三名特殊样式 */
.ranking-item:nth-child(1) {
    background: linear-gradient(135deg, #fff5e6 0%, #ffffff 100%);
}

.ranking-item:nth-child(2) {
    background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
}

.ranking-item:nth-child(3) {
    background: linear-gradient(135deg, #fff0e6 0%, #ffffff 100%);
}

/* 排名徽章 */
.rank-badge {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    border-radius: 10px;
    flex-shrink: 0;
    margin-right: 20px;
}

.ranking-item:nth-child(1) .rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #b8860b;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.ranking-item:nth-child(2) .rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #696969;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.4);
}

.ranking-item:nth-child(3) .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: #654321;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.4);
}

.ranking-item:nth-child(n+4) .rank-badge {
    background: #e2e8f0;
    color: #718096;
}

/* 书籍封面 */
.rank-book-cover {
    width: 80px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.rank-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ranking-item:hover .rank-book-cover img {
    transform: scale(1.1);
}

/* 书籍信息 */
.rank-book-info {
    flex: 1;
    min-width: 0;
}

.rank-book-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-book-author {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rank-book-author i {
    font-size: 0.8rem;
}

.rank-book-desc {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.rank-book-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rank-tag {
    padding: 4px 10px;
    background: #edf2f7;
    color: #667eea;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 书籍统计 */
.rank-book-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
    margin-left: 20px;
    flex-shrink: 0;
}

.rank-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #718096;
}

.rank-stat-item i {
    color: #a0aec0;
    font-size: 0.85rem;
}

.rank-stat-number {
    font-weight: 600;
    color: #667eea;
}

/* ==================== 加载状态 ==================== */
.ranking-loading {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border: 5px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ranking-loading p {
    font-size: 1.1rem;
    color: #a0aec0;
}

/* 空状态 */
.ranking-empty {
    text-align: center;
    padding: 80px 20px;
}

.ranking-empty i {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.ranking-empty h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 10px;
}

.ranking-empty p {
    color: #a0aec0;
    font-size: 1rem;
}

/* ==================== Footer 样式 ==================== */
.modern-footer {
    background: linear-gradient(135deg, #2d3748, #1a202c);
    color: #e2e8f0;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.modern-footer .footer-section h4 {
    color: white;
}

.modern-footer .footer-section a {
    color: #cbd5e0;
}

.modern-footer .footer-section a:hover {
    color: #667eea;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .channel-tabs {
        gap: 15px;
    }

    .channel-tab {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .ranking-list {
        padding: 20px;
    }

    .rank-book-cover {
        width: 70px;
        height: 95px;
    }

    .rank-book-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .ranking-container {
        padding: 20px 0 40px;
    }

    .page-header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }

    .page-header p {
        font-size: 1rem;
    }

    .channel-tabs {
        flex-direction: column;
        gap: 12px;
    }

    .channel-tab {
        width: 100%;
        justify-content: center;
    }

    .ranking-type-tabs {
        gap: 8px;
    }

    .type-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .ranking-list {
        padding: 15px;
        border-radius: 12px;
    }

    .ranking-item {
        flex-wrap: wrap;
        padding: 15px;
    }

    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-right: 12px;
    }

    .rank-book-cover {
        width: 60px;
        height: 82px;
        margin-right: 12px;
    }

    .rank-book-info {
        width: calc(100% - 120px);
    }

    .rank-book-title {
        font-size: 1.05rem;
    }

    .rank-book-desc {
        -webkit-line-clamp: 1;
    }

    .rank-book-stats {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-left: 0;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid #e2e8f0;
    }

    .rank-stat-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .ranking-item {
        padding: 12px;
    }

    .rank-badge {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .rank-book-cover {
        width: 50px;
        height: 68px;
    }

    .rank-book-title {
        font-size: 0.95rem;
    }

    .rank-book-author,
    .rank-book-desc {
        font-size: 0.8rem;
    }
}


