/**
 * 子比主题佣金排行榜样式 - 抖音风格
 * 动感炫酷设计，丰富的动态效果
 */

/* ========== 排行榜容器 ========== */
.zib-cl-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========== 排行榜卡片 ========== */
.zib-cl-card {
    background: linear-gradient(180deg, #0D0D0D 0%, #1A1A1A 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(252, 47, 94, 0.2);
    position: relative;
}

/* 动态背景粒子效果 */
.zib-cl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(252, 47, 94, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(247, 147, 30, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ========== 排行榜标题 - 抖音渐变 ========== */
.zib-cl-header {
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 50%, #F7931E 100%);
    padding: 22px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 标题流光动画 */
.zib-cl-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    animation: zib-cl-shine 3s ease-in-out infinite;
}

@keyframes zib-cl-shine {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

.zib-cl-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.zib-cl-title-icon {
    font-size: 28px;
    animation: zib-cl-bounce 1s ease-in-out infinite;
}

@keyframes zib-cl-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ========== 排行榜内容 ========== */
.zib-cl-content {
    padding: 20px 16px;
    min-height: auto;
    position: relative;
    z-index: 1;
}

/* ========== 加载状态 ========== */
.zib-cl-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #666;
}

.zib-cl-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #222;
    border-top: 4px solid #FC2F5E;
    border-radius: 50%;
    animation: zib-cl-spin 0.8s linear infinite;
    margin-bottom: 15px;
}

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

/* ========== 空数据提示 ========== */
.zib-cl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #666;
}

.zib-cl-empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.zib-cl-empty-icon svg {
    width: 100%;
    height: 100%;
}

.zib-cl-empty-text {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* ========== 领奖台区域（前三名） ========== */
.zib-cl-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 50px 5px 20px;
    gap: 10px;
    margin-bottom: 20px;
}

/* 单个领奖台 */
.zib-cl-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 32%;
}

/* 头像区域 - 放在领奖台外面，不会重叠 */
.zib-cl-podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
    padding: 3px;
    margin-bottom: 12px;
    position: relative;
    z-index: 10;
}

.zib-cl-podium-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* 第一名头像发光 */
.zib-cl-podium-item.rank-1 .zib-cl-podium-avatar {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: zib-cl-glow-gold 2s ease-in-out infinite;
    width: 76px;
    height: 76px;
}

@keyframes zib-cl-glow-gold {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); }
}

.zib-cl-podium-item.rank-2 .zib-cl-podium-avatar {
    background: linear-gradient(135deg, #E8E8E8 0%, #B0B0B0 100%);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

.zib-cl-podium-item.rank-3 .zib-cl-podium-avatar {
    background: linear-gradient(135deg, #FFB347 0%, #CD7F32 100%);
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}

/* 领奖台柱子 */
.zib-cl-podium-stand {
    width: 100%;
    border-radius: 12px 12px 8px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 8px;
    position: relative;
    transition: transform 0.3s ease;
}

.zib-cl-podium-stand:hover {
    transform: translateY(-5px);
}

/* 第二名 - 左边 */
.zib-cl-podium-item.rank-2 {
    order: 1;
}

.zib-cl-podium-item.rank-2 .zib-cl-podium-stand {
    background: linear-gradient(180deg, #3A3545 0%, #2A2535 100%);
    min-height: 90px;
}

/* 第一名 - 中间 */
.zib-cl-podium-item.rank-1 {
    order: 2;
}

.zib-cl-podium-item.rank-1 .zib-cl-podium-stand {
    background: linear-gradient(180deg, #3D3520 0%, #2A2515 100%);
    min-height: 120px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

/* 第三名 - 右边 */
.zib-cl-podium-item.rank-3 {
    order: 3;
}

.zib-cl-podium-item.rank-3 .zib-cl-podium-stand {
    background: linear-gradient(180deg, #3A3025 0%, #2A2015 100%);
    min-height: 70px;
}

/* 排名数字 */
.zib-cl-podium-rank {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.zib-cl-podium-item.rank-1 .zib-cl-podium-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    width: 36px;
    height: 36px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: zib-cl-pulse 2s ease-in-out infinite;
}

@keyframes zib-cl-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.zib-cl-podium-item.rank-2 .zib-cl-podium-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
}

.zib-cl-podium-item.rank-3 .zib-cl-podium-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #B8860B 100%);
}

/* 用户信息 */
.zib-cl-podium-info {
    text-align: center;
    width: 100%;
}

.zib-cl-podium-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.zib-cl-podium-item.rank-1 .zib-cl-podium-name {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-size: 15px;
}

.zib-cl-podium-orders {
    font-size: 11px;
    color: #888;
    margin: 0 0 8px 0;
}

.zib-cl-podium-amount {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 2px 0;
}

.zib-cl-podium-item.rank-1 .zib-cl-podium-amount {
    font-size: 22px;
    filter: drop-shadow(0 0 10px rgba(252, 47, 94, 0.5));
}

.zib-cl-podium-label {
    font-size: 10px;
    color: #666;
    margin: 0;
}

/* 第一名皇冠装饰 */
.zib-cl-podium-item.rank-1::before {
    content: '👑';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    animation: zib-cl-float 2s ease-in-out infinite;
    z-index: 20;
}

@keyframes zib-cl-float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ========== 列表区域（第4名及以后） ========== */
.zib-cl-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zib-cl-list-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1F1F1F 0%, #171717 100%);
    border-radius: 14px;
    margin-bottom: 10px;
    border: 1px solid #2A2A2A;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 列表项流光效果 */
.zib-cl-list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s ease;
}

.zib-cl-list-item:hover::before {
    left: 100%;
}

.zib-cl-list-item:hover {
    transform: translateX(5px);
    border-color: #FC2F5E;
    box-shadow: 0 5px 20px rgba(252, 47, 94, 0.2);
}

.zib-cl-list-item:last-child {
    margin-bottom: 0;
}

/* 排名数字 */
.zib-cl-list-rank {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-right: 14px;
    flex-shrink: 0;
}

/* 头像 */
.zib-cl-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 100%);
    padding: 2px;
}

.zib-cl-list-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #1A1A1A;
}

/* 用户信息 */
.zib-cl-list-info {
    flex: 1;
    min-width: 0;
}

.zib-cl-list-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zib-cl-list-orders {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* 佣金金额 */
.zib-cl-list-amount {
    text-align: right;
    flex-shrink: 0;
    margin-left: 12px;
}

.zib-cl-list-amount .amount {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.zib-cl-list-amount .label {
    font-size: 10px;
    color: #555;
    margin: 2px 0 0 0;
}

/* ========== 底部提示 ========== */
.zib-cl-footer {
    padding: 14px 20px;
    background: linear-gradient(180deg, #1A1A1A 0%, #0D0D0D 100%);
    border-top: 1px solid #2A2A2A;
}

.zib-cl-refresh-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    margin: 0;
}

.zib-cl-refresh-icon {
    font-size: 14px;
    animation: zib-cl-rotate 2s linear infinite;
}

@keyframes zib-cl-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== 徽章样式 ========== */
.zib-cl-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 500;
    margin-right: 4px;
}

.zib-cl-badge.gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 165, 0, 0.3) 100%);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.zib-cl-badge.silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(160, 160, 160, 0.2) 100%);
    color: #C0C0C0;
    border: 1px solid rgba(192, 192, 192, 0.3);
}

.zib-cl-badge.bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(184, 134, 11, 0.2) 100%);
    color: #CD7F32;
    border: 1px solid rgba(205, 127, 50, 0.3);
}

/* ========== 火焰动画装饰 ========== */
.zib-cl-fire {
    position: absolute;
    font-size: 16px;
    animation: zib-cl-fire-anim 0.5s ease-in-out infinite alternate;
}

@keyframes zib-cl-fire-anim {
    from { transform: translateY(0) scale(1); opacity: 0.8; }
    to { transform: translateY(-3px) scale(1.1); opacity: 1; }
}

/* ========== 响应式设计 ========== */
@media (max-width: 420px) {
    .zib-cl-wrapper {
        padding: 10px;
    }
    
    .zib-cl-header {
        padding: 18px 20px;
    }
    
    .zib-cl-title {
        font-size: 18px;
    }
    
    .zib-cl-content {
        padding: 15px 12px;
    }
    
    .zib-cl-podium {
        gap: 6px;
        padding: 40px 0 15px;
    }
    
    .zib-cl-podium-avatar {
        width: 52px;
        height: 52px;
        margin-bottom: 8px;
    }
    
    .zib-cl-podium-item.rank-1 .zib-cl-podium-avatar {
        width: 60px;
        height: 60px;
    }
    
    .zib-cl-podium-stand {
        padding: 12px 6px;
    }
    
    .zib-cl-podium-item.rank-1 .zib-cl-podium-stand {
        min-height: 100px;
    }
    
    .zib-cl-podium-item.rank-2 .zib-cl-podium-stand {
        min-height: 75px;
    }
    
    .zib-cl-podium-item.rank-3 .zib-cl-podium-stand {
        min-height: 60px;
    }
    
    .zib-cl-podium-name {
        font-size: 12px;
    }
    
    .zib-cl-podium-amount {
        font-size: 15px;
    }
    
    .zib-cl-podium-item.rank-1 .zib-cl-podium-amount {
        font-size: 18px;
    }
    
    .zib-cl-list-item {
        padding: 12px 12px;
    }
    
    .zib-cl-list-avatar {
        width: 42px;
        height: 42px;
    }
    
    .zib-cl-list-name {
        font-size: 14px;
    }
    
    .zib-cl-list-amount .amount {
        font-size: 16px;
    }
}
