/**
 * Product Ranking 组件样式
 * 文件名：product-ranking.css
 * 功能：纯定义样式 - 产品排行榜视觉样式
 */

/* 主容器样式 */
.product-ranking {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    min-height: 600px;
}

.product-ranking__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 标题区域 */
.product-ranking__header {
    text-align: center;
    margin-bottom: 3rem;
}

.product-ranking__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-ranking__subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 标签页样式 */
.product-ranking__tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.product-ranking__tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid #334155;
    border-radius: 2rem;
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.product-ranking__tab:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: #60a5fa;
    transform: translateY(-2px);
}

.product-ranking__tab--active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.product-ranking__tab-icon {
    font-size: 1.25rem;
}

.product-ranking__tab-label {
    white-space: nowrap;
}

/* 排行榜内容 */
.product-ranking__content {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 1.5rem;
    border: 1px solid rgba(100, 116, 139, 0.2);
    padding: 2rem;
    margin-bottom: 2rem;
}

.product-ranking__list {
    min-height: 400px;
    position: relative;
}

/* 加载状态 */
.product-ranking__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #cbd5e1;
}

.product-ranking__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #334155;
    border-top: 3px solid #60a5fa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 排行榜项 */
.product-ranking__item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #334155;
    transition: all 0.3s ease;
    position: relative;
}

.product-ranking__item:hover {
    background: linear-gradient(145deg, #334155, #1e293b);
    border-color: #60a5fa;
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.product-ranking__item:last-child {
    margin-bottom: 0;
}

/* 排名徽章 */
.product-ranking__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.product-ranking__rank--1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.product-ranking__rank--2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.4);
}

.product-ranking__rank--3 {
    background: linear-gradient(135deg, #92400e, #78350f);
    color: white;
    box-shadow: 0 4px 15px rgba(146, 64, 14, 0.4);
}

.product-ranking__rank--other {
    background: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
    border: 2px solid #475569;
}

/* 产品信息 */
.product-ranking__info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.product-ranking__image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #475569;
    flex-shrink: 0;
}

.product-ranking__details {
    flex: 1;
}

.product-ranking__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-ranking__brand {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.product-ranking__metrics {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.product-ranking__metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cbd5e1;
    font-size: 0.875rem;
}

.product-ranking__metric-value {
    font-weight: 700;
    color: #60a5fa;
}

/* 评分星星 */
.product-ranking__stars {
    display: flex;
    gap: 2px;
    margin-top: 0.5rem;
}

.product-ranking__star {
    color: #f59e0b;
    font-size: 1rem;
}

/* 底部说明 */
.product-ranking__footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
}

.product-ranking__disclaimer {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-ranking {
        padding: 2rem 0;
    }
    
    .product-ranking__container {
        padding: 0 1rem;
    }
    
    .product-ranking__title {
        font-size: 2rem;
    }
    
    .product-ranking__subtitle {
        font-size: 1.125rem;
    }
    
    .product-ranking__tabs {
        gap: 0.5rem;
    }
    
    .product-ranking__tab {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .product-ranking__content {
        padding: 1.5rem;
    }
    
    .product-ranking__item {
        padding: 1rem;
    }
    
    .product-ranking__info {
        gap: 1rem;
    }
    
    .product-ranking__image {
        width: 60px;
        height: 60px;
    }
    
    .product-ranking__name {
        font-size: 1.1rem;
    }
    
    .product-ranking__metrics {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .product-ranking__tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-ranking__tab {
        justify-content: center;
    }
    
    .product-ranking__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .product-ranking__metrics {
        width: 100%;
        justify-content: space-between;
    }
}