/**
 * 排行榜页面样式 - 参考起点/晋江排行榜设计
 * 更新时间: 2026-06-20 - 添加日期筛选、榜单说明、改进标签设计
 */

/* ========== 排行榜 Hero ========== */
.ranking-hero {
    padding: 100px 20px 50px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ranking-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,74,0.1) 0%, transparent 50%);
    animation: rankingFloat 8s ease-in-out infinite;
}

@keyframes rankingFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display, 'Noto Sans SC', sans-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 16px;
}

.ranking-date-info {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 12px;
}

/* ========== 排行榜内容区 ========== */
.ranking-section {
    padding: 0 20px 60px;
    min-height: 60vh;
    background: #f8fafc;
}

.ranking-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== 标签切换 ========== */
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.ranking-tab {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 28px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
    background: white;
    color: #334155;
    border: 1.5px solid #e2e8f0;
    min-width: 100px;
}

.tab-icon {
    font-size: 1.3rem;
}

.tab-label {
    font-weight: 700;
}

.tab-desc {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 400;
}

.ranking-tab:hover {
    border-color: #ff6b4a;
    color: #ff6b4a;
    background: rgba(255,107,74,0.06);
    transform: translateY(-2px);
}

.ranking-tab.active {
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    color: white;
    box-shadow: 0 4px 20px rgba(255,107,74,0.4);
    border-color: transparent;
}

/* ========== 日期筛选 ========== */
.ranking-date-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.filter-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.date-select {
    padding: 10px 20px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #334155;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
}

.date-select:focus {
    border-color: #ff6b4a;
    box-shadow: 0 2px 8px rgba(255,107,74,0.15);
}

/* ========== 榜单说明 ========== */
.ranking-rules {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    border-radius: 12px;
    margin-bottom: 32px;
    border-left: 4px solid #ff6b4a;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.rules-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.rules-content {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

.rules-content strong {
    color: #334155;
}

/* ========== 统计概览 ========== */
.ranking-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #ff6b4a;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
}

/* ========== 分类筛选 ========== */
.ranking-category-filter {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.category-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    border-radius: 20px;
    background: white;
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
}

.category-filter-tag:hover {
    background: #14b8a6;
    color: white;
    border-color: #14b8a6;
}

.category-filter-tag.active {
    background: #14b8a6;
    color: white;
    border-color: #14b8a6;
    box-shadow: 0 2px 8px rgba(20,184,166,0.3);
}

/* ========== 排行榜列表 ========== */
.ranking-list {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 40px;
}

.ranking-header {
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px 100px 100px;
    gap: 16px;
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.ranking-row {
    display: grid;
    grid-template-columns: 80px 1fr 150px 100px 100px 100px;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
    align-items: center;
}

.ranking-row:hover {
    background: #f8fafc;
}

.rank-cell {
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1rem;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: white;
    box-shadow: 0 2px 12px rgba(255,215,0,0.4);
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: white;
    box-shadow: 0 2px 12px rgba(192,192,192,0.4);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: white;
    box-shadow: 0 2px 12px rgba(205,127,50,0.4);
}

.rank-badge.normal {
    background: #f1f5f9;
    color: #64748b;
}

/* 故事信息列 */
.story-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.story-cover {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.story-info {
    min-width: 0;
}

.story-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-title:hover {
    color: #ff6b4a;
}

.story-summary {
    font-size: 0.85rem;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.story-category-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* 作者列 */
.author-cell {
    text-align: center;
}

.author-link {
    color: #475569;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.author-link:hover {
    color: #ff6b4a;
}

/* 数据列 */
.data-cell {
    text-align: center;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.data-cell.views {
    color: #2563eb;
}

.data-cell.likes {
    color: #e11d48;
}

.data-cell.comments {
    color: #7c3aed;
}

/* ========== 分页 ========== */
.ranking-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    background: white;
    color: #334155;
    border: 1.5px solid #e2e8f0;
}

.pagination-item:hover {
    border-color: #ff6b4a;
    color: #ff6b4a;
    background: rgba(255,107,74,0.06);
}

.pagination-item.active {
    background: linear-gradient(135deg, #ff6b4a, #ff8c42);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(255,107,74,0.4);
    font-weight: 600;
}

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

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.ranking-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .ranking-header,
    .ranking-row {
        grid-template-columns: 60px 1fr 120px 80px 80px 80px;
        gap: 12px;
        padding: 12px 16px;
    }
}

@media (max-width: 768px) {
    .ranking-tabs {
        gap: 8px;
    }
    
    .ranking-tab {
        padding: 10px 20px;
        min-width: 80px;
    }
    
    .tab-desc {
        display: none;
    }
    
    .ranking-header,
    .ranking-row {
        grid-template-columns: 50px 1fr 100px;
        gap: 8px;
    }
    
    .data-cell.views,
    .data-cell.likes,
    .data-cell.comments {
        display: none;
    }
    
    .ranking-header div:nth-child(4),
    .ranking-header div:nth-child(5),
    .ranking-header div:nth-child(6) {
        display: none;
    }
    
    .story-cover {
        width: 48px;
        height: 48px;
    }
}
