/**
 * 下载排行榜页面样式
 * 参考多多软件站排行榜设计风格 - 多榜单并列布局
 */

/* ==================== Hero区域 - 精致设计 ==================== */
.rank-hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 50px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 背景装饰效果 */
.rank-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.rank-hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.rank-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    position: relative;
    z-index: 1;
}

.rank-hero-left {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

/* 金色奖杯容器 - 3D效果 */
.rank-hero-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(145deg, #ffd700 0%, #ffb800 30%, #ff8c00 70%, #ff6b35 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 
        0 8px 32px rgba(255, 140, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    transform: perspective(500px) rotateY(-5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-hero-icon::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 30%;
    height: 20%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
    border-radius: 50%;
    filter: blur(8px);
}

.rank-hero-icon:hover {
    transform: perspective(500px) rotateY(0deg) translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(255, 140, 0, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* 奖杯SVG金色效果 */
.rank-hero-icon svg {
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transform: translateZ(20px);
}

/* 文字区域 - 精致排版 */
.rank-hero-text h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rank-hero-text p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 20px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* 统计数据 - 精致卡片 */
.rank-hero-stats {
    display: flex;
    gap: 20px;
}

.rank-hero-stats span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.rank-hero-stats span:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
}

.rank-hero-stats strong {
    color: #ffd700;
    font-size: 16px;
    font-weight: 700;
    margin-right: 4px;
}

/* 分类快捷入口 - 精致卡片 */
.rank-hero-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    flex-shrink: 0;
}

.hero-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 120px;
    height: 110px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hero-cat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 0 20px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hero-cat-item svg {
    color: #ffd700;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.hero-cat-item:hover svg {
    transform: scale(1.1);
}

.hero-cat-item span {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== 排行榜区块 ==================== */
.rank-section {
    padding: 30px 0;
}

.rank-section:nth-child(even) {
    background: #f8f9fa;
}

.section-title-bar {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.section-title svg {
    color: #FF6B35;
}

/* ==================== 三列/六列网格布局 ==================== */
.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rank-grid-6 {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .rank-grid,
    .rank-grid-6 {
        grid-template-columns: 1fr;
    }
}

/* ==================== 排行榜卡片 ==================== */
.rank-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rank-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* 卡片头部 - 精致设计 */
.rank-card-header {
    padding: 20px 30px 0px 30px;
    /* text-align: center; */
    position: relative;
    overflow: hidden;
}

.rank-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
}

.rank-card-header h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* 不同颜色主题的卡片 - 高级柔和配色（提亮版） */
.rank-card-orange {
    background: linear-gradient(180deg, #f9e4a8 0%, #fcf3d8 20%, #ffffff 35%);
}

.rank-card-orange .rank-card-header {
    background: transparent;
}

.rank-card-orange .rank-card-header h3 {
    color: #5c4a1e;
    font-weight: 600;
}

.rank-card-green {
    background: linear-gradient(180deg, #c4e8d4 0%, #e0f2e9 20%, #ffffff 35%);
}

.rank-card-green .rank-card-header {
    background: transparent;
}

.rank-card-green .rank-card-header h3 {
    color: #2d5a3f;
    font-weight: 600;
}

.rank-card-blue {
    background: linear-gradient(180deg, #c2ddf2 0%, #e0effa 20%, #ffffff 35%);
}

.rank-card-blue .rank-card-header {
    background: transparent;
}

.rank-card-blue .rank-card-header h3 {
    color: #1e4a6e;
    font-weight: 600;
}

/* 紫色卡片 - 办公软件 */
.rank-card-purple {
    background: linear-gradient(180deg, #e4d4f0 0%, #f0e8f8 20%, #ffffff 35%);
}

.rank-card-purple .rank-card-header {
    background: transparent;
}

.rank-card-purple .rank-card-header h3 {
    color: #4a2d5c;
    font-weight: 600;
}

/* 红色卡片 - 多媒体 */
.rank-card-red {
    background: linear-gradient(180deg, #f8d4d4 0%, #fce8e8 20%, #ffffff 35%);
}

.rank-card-red .rank-card-header {
    background: transparent;
}

.rank-card-red .rank-card-header h3 {
    color: #6e2d2d;
    font-weight: 600;
}

/* 青色卡片 - 开发工具 */
.rank-card-cyan {
    background: linear-gradient(180deg, #d4f0f0 0%, #e8f8f8 20%, #ffffff 35%);
}

.rank-card-cyan .rank-card-header {
    background: transparent;
}

.rank-card-cyan .rank-card-header h3 {
    color: #2d5a5a;
    font-weight: 600;
}

/* 卡片内容区 */
.rank-card-body {
    padding: 15px 30px;
}

/* ==================== 迷你排行榜列表 ==================== */
.rank-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rank-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0 -12px;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.rank-mini-item:last-child {
    border-bottom: none;
}

.rank-mini-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rank-mini-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #FF6B35 0%, #ff8c5a 100%);
    border-radius: 0 2px 2px 0;
    transition: height 0.25s ease;
}

.rank-mini-item:hover::before {
    height: 60%;
}

/* 排名数字 */
.mini-rank-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    background: #f0f0f0;
    border-radius: 4px;
    flex-shrink: 0;
}

/* 前三名特殊样式 */
.rank-mini-item.top1 .mini-rank-number {
    background: #ff4d4f;
    color: #fff;
}

.rank-mini-item.top2 .mini-rank-number {
    background: #ff7a45;
    color: #fff;
}

.rank-mini-item.top3 .mini-rank-number {
    background: #ffa940;
    color: #fff;
}

/* 软件图标 */
.mini-rank-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rank-mini-item:hover .mini-rank-icon {
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* 软件信息 */
.mini-rank-info {
    flex: 1;
    min-width: 0;
}

.mini-rank-name {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.rank-mini-item:hover .mini-rank-name {
    color: #FF6B35;
    font-weight: 500;
}

.mini-rank-meta {
    font-size: 12px;
    color: #999;
}

/* 日期/版本标签 */
.mini-rank-date {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
    .rank-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rank-hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .rank-hero-left {
        flex-direction: column;
    }
    
    .rank-hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .rank-hero-section {
        padding: 30px 0;
    }
    
    .rank-hero-text h1 {
        font-size: 24px;
    }
    
    .rank-hero-icon {
        width: 80px;
        height: 80px;
    }
    
    .rank-hero-categories {
        grid-template-columns: repeat(4, 1fr);
        width: 100%;
    }
    
    .hero-cat-item {
        width: auto;
        height: 80px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .rank-grid {
        grid-template-columns: 1fr;
    }
    
    .rank-card {
        margin-bottom: 15px;
    }
    
    .rank-mini-item {
        padding: 12px 0;
    }
}

@media (max-width: 480px) {
    .rank-hero-section {
        padding: 20px 0;
    }
    
    .rank-hero-text h1 {
        font-size: 20px;
    }
    
    .rank-hero-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .rank-hero-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rank-section {
        padding: 20px 0;
    }
    
    .rank-card-header {
        padding: 12px 15px;
    }
    
    .rank-card-header h3 {
        font-size: 15px;
    }
}
