/**
 * 佣金排行榜样式 - 小红书风格
 * 清新粉色设计
 */

/* ========== 排行榜容器 ========== */
.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, #FFF5F7 0%, #FFFFFF 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(255, 102, 153, 0.15);
    position: relative;
}

/* 背景装饰 */
.zib-cl-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 102, 153, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 153, 170, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ========== 排行榜标题 ========== */
.zib-cl-header {
    background: linear-gradient(135deg, #FF6B9D 0%, #FF8FB1 50%, #FFB3C6 100%);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-bottom: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 15px rgba(255, 102, 153, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.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.3) 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: 2;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.1),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
}

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

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

/* ========== 按钮区域（标题下方） ========== */
.zib-cl-button-area {
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, #FFF5F7 0%, #FFFFFF 100%);
}

/* 紫色边框按钮 */
.zib-cl-header-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    background: rgba(30, 30, 30, 0.9);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: 3px solid #9B30FF;
    border-radius: 20px;
    z-index: 10;
    transition: all 0.3s ease;
    white-space: nowrap;
    animation: zib-cl-btn-shake 2s ease-in-out infinite;
    box-shadow:
        0 0 20px rgba(155, 48, 255, 0.6),
        0 0 40px rgba(155, 48, 255, 0.4),
        inset 0 0 10px rgba(155, 48, 255, 0.1);
}

/* 外层光晕 */
.zib-cl-header-btn::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 1.5px solid rgba(155, 48, 255, 0.4);
    border-radius: 25px;
    box-shadow: 0 0 20px rgba(155, 48, 255, 0.5);
}

/* 流光效果 */
.zib-cl-header-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 18px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: zib-cl-btn-glow 2s linear infinite;
    pointer-events: none;
}

/* 左右晃动动画 */
@keyframes zib-cl-btn-shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-5px); }
    20% { transform: translateX(5px); }
    30% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    50% { transform: translateX(0); }
}

@keyframes zib-cl-btn-glow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.zib-cl-header-btn:hover {
    animation: none;
    transform: scale(1.05);
    background: rgba(40, 40, 40, 0.95);
    border-color: #BA55D3;
    box-shadow: 
        0 0 20px rgba(186, 85, 211, 0.6),
        0 0 40px rgba(155, 48, 255, 0.4),
        inset 0 0 15px rgba(186, 85, 211, 0.2);
}

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

/* ========== 列表主体区域 ========== */
.zib-cl-body {
    padding: 20px 16px;
    position: relative;
    z-index: 1;
}

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

.zib-cl-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #FFE4EC;
    border-top: 3px solid #FF6B9D;
    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: #999;
}

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

.zib-cl-empty-text {
    font-size: 15px;
    color: #999;
    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%;
    position: relative;
}

/* 头衔标签 */
.zib-cl-podium-title {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    margin-top: 8px;
    text-align: center;
    letter-spacing: 1px;
}

/* 冠军头衔 */
.zib-cl-podium-item.rank-1 .zib-cl-podium-title {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    font-size: 13px;
}

/* 亚军头衔 */
.zib-cl-podium-item.rank-2 .zib-cl-podium-title {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    color: #666;
    box-shadow: 0 4px 12px rgba(192, 192, 192, 0.3);
}

/* 季军头衔 */
.zib-cl-podium-item.rank-3 .zib-cl-podium-title {
    background: linear-gradient(135deg, #FFB347 0%, #CD7F32 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.3);
}

/* 头像区域 */
.zib-cl-podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE4EC 0%, #FFF0F5 100%);
    padding: 3px;
    margin-bottom: 0;
    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 25px rgba(255, 215, 0, 0.4);
    animation: zib-cl-glow-gold-pink 2s ease-in-out infinite;
    width: 76px;
    height: 76px;
}

@keyframes zib-cl-glow-gold-pink {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 0 35px rgba(255, 215, 0, 0.7); }
}

.zib-cl-podium-item.rank-2 .zib-cl-podium-avatar {
    background: linear-gradient(135deg, #E8E8E8 0%, #B0B0B0 100%);
    box-shadow: 0 0 15px 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 15px 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, #F5F5F5 0%, #EBEBEB 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, #FFF8E1 0%, #FFF3CD 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, #FFF3E0 0%, #FFE0B2 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: #333;
    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: #FF9500;
    font-size: 15px;
}

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

.zib-cl-podium-amount {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6B9D 0%, #FF8FB1 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;
}

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

/* 第一名皇冠装饰 */
.zib-cl-podium-item.rank-1::before {
    content: '👑';
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    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(-5px); }
}

/* ========== 列表区域（第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, #FFFFFF 0%, #FFF5F7 100%);
    border-radius: 14px;
    margin-bottom: 10px;
    border: 1px solid #FFE4EC;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* 列表项悬停效果 */
.zib-cl-list-item:hover {
    transform: translateX(5px);
    border-color: #FF6B9D;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.15);
}

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

/* 排名数字 */
.zib-cl-list-rank {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFF0F5 0%, #FFE4EC 100%);
    color: #FF6B9D;
    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, #FF6B9D 0%, #FF8FB1 100%);
    padding: 2px;
}

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

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

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

.zib-cl-list-orders {
    font-size: 12px;
    color: #999;
    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, #FF6B9D 0%, #FF8FB1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

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

/* ========== 底部提示 ========== */
.zib-cl-footer {
    padding: 14px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 245, 247, 0.8) 100%);
    border-top: 1px solid #FFE4EC;
}

.zib-cl-refresh-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #999;
    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.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    color: #FFA500;
    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: #888;
    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);
}

/* ========== 响应式设计 ========== */
@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-body {
        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;
    }
    
    .zib-cl-header-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}
