/* ==========================================================================
   珍兽排行榜页面样式 (pet-ranking.css)
   珍兽排行榜完整框架 - 页面特定样式
   ========================================================================== */

/* ==========================================================================
   排行榜单元格样式
   ========================================================================== */

.cell-rank {
    width: 8%;
    text-align: center;
}

.cell-pet {
    width: 22%;
    text-align: left;
}

.pet-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pet-name {
    flex: 1;
}

.rank-change-icon {
    font-size: 16px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    transition: all var(--transition-base);
    animation: pulse 2s infinite;
}

.rank-change-up {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.rank-change-down {
    background: linear-gradient(135deg, #F44336 0%, #E57373 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.rank-change-same {
    background: linear-gradient(135deg, #9E9E9E 0%, #BDBDBD 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
}

.rank-change-new {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    animation: bounce 1s infinite;
}

/*动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.cell-aptitude {
    width: 18%;
    text-align: center;
}

.cell-owner {
    width: 18%;
    text-align: center;
}

.cell-server {
    width: 16%;
    text-align: center;
}

.cell-type {
    width: 18%;
    text-align: center;
}

.server-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(74, 144, 217, 0.1);
    color: var(--color-primary);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
    border: var(--border-width) solid var(--border-color);
    transition: all var(--transition-base);
}

.rank-top .rank-badge {
    font-size: var(--font-size-xl);
    width: 50px;
    height: 50px;
    box-shadow: 0 0 20px currentColor;
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, var(--color-top1) 0%, #FFA000 100%);
    color: var(--color-black);
    border-color: rgba(255, 215, 0, 0.5);
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, var(--color-top2) 0%, #90A4AE 100%);
    color: var(--color-black);
    border-color: rgba(192, 192, 192, 0.5);
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, var(--color-top3) 0%, #8D6E63 100%);
    color: var(--color-white);
    border-color: rgba(205, 127, 50, 0.5);
}

/* ==========================================================================
   珍兽名称样式
   ========================================================================== */

.pet-name {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: 1.4;
}

.rank-top .pet-name {
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
}

/* ==========================================================================
   资质样式
   ========================================================================== */

.aptitude-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: #2d7dd2;
    font-family: var(--font-mono);
    text-shadow: none;
}

.rank-top .aptitude-value {
    font-size: var(--font-size-2xl);
    color: var(--color-top1);
}

.rank-2 .aptitude-value {
    color: var(--color-top2);
}

.rank-3 .aptitude-value {
    color: var(--color-top3);
}

/* ==========================================================================
   主人样式
   ========================================================================== */

.owner-name {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
}

.rank-top .owner-name {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
}

/* ==========================================================================
   类型标签样式
   ========================================================================== */

.type-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--border-radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: var(--border-width) solid;
    backdrop-filter: blur(5px);
    transition: all var(--transition-base);
}

.type-baby {
    background: rgba(100, 181, 246, 0.1);
    color: var(--color-baby);
    border-color: rgba(100, 181, 246, 0.3);
}

.type-baby:hover {
    background: rgba(100, 181, 246, 0.2);
}

.type-normal {
    background: rgba(189, 189, 189, 0.1);
    color: var(--color-adult);
    border-color: rgba(189, 189, 189, 0.3);
}

.type-normal:hover {
    background: rgba(189, 189, 189, 0.2);
}

.type-variant {
    background: rgba(244, 143, 177, 0.1);
    color: var(--color-variant);
    border-color: rgba(244, 143, 177, 0.3);
}

.type-variant:hover {
    background: rgba(244, 143, 177, 0.2);
}

.type-special {
    background: rgba(156, 39, 176, 0.1);
    color: #9c27b0;
    border-color: rgba(156, 39, 176, 0.3);
}

.type-special:hover {
    background: rgba(156, 39, 176, 0.2);
}

/* ==========================================================================
   响应式调整
   ========================================================================== */

@media (max-width: 991.98px) {
    .cell-owner {
        min-width: 120px;
    }
    
    .cell-pet {
        min-width: 150px;
    }
}

@media (max-width: 767.98px) {
    .ranking-table {
        font-size: var(--font-size-sm);
    }
    
    .rank-badge {
        width: 35px;
        height: 35px;
        font-size: var(--font-size-base);
    }
    
    .rank-top .rank-badge {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-lg);
    }
    
    .aptitude-value {
        font-size: var(--font-size-lg);
    }
    
    .rank-top .aptitude-value {
        font-size: var(--font-size-xl);
    }
    
    .pet-name {
        font-size: var(--font-size-sm);
    }
    
    .rank-top .pet-name {
        font-size: var(--font-size-base);
    }
    
    .type-tag {
        padding: calc(var(--space-xs) / 2) var(--space-sm);
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 575.98px) {
    .cell-owner {
        display: none;
    }
    
    .ranking-table th:nth-child(4),
    .ranking-table td:nth-child(4) {
        display: none;
    }
    
    .cell-pet {
        min-width: 100px;
    }
}

/*排变化标记样式 */
.pet-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pet-name {
    flex: 1;
}

.rank-change-icon {
    font-size: 16px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    transition: all var(--transition-base);
    animation: pulse 2s infinite;
}

.rank-change-up {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.rank-change-down {
    background: linear-gradient(135deg, #F44336 0%, #E57373 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.rank-change-same {
    background: linear-gradient(135deg, #9E9E9E 0%, #BDBDBD 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
}

.rank-change-new {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    animation: bounce 1s infinite;
}

/*动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/*排名变化提示信息 */
.rank-change-tooltip {
    position: relative;
    display: inline-block;
}

.rank-change-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.rank-change-tooltip:hover::after {
    opacity: 1;
}
    .cell-aptitude {
        min-width: 80px;
    }
    
    .cell-type {
        min-width: 70px;
    }
}
