/**
 * 子比主题佣金排行榜样式 - 抖音风格
 * 动感炫酷设计
 */

/* ========== 排行榜容器 ========== */
.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;
    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(252, 47, 94, 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.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: 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: 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-button-area {
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, #0D0D0D 0%, #1A1A1A 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 15px rgba(155, 48, 255, 0.2);
}

/* 外层光晕 */
.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: #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%;
    position: relative;
}

/* 冠军皇冠 */
.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); }
}

/* 头衔标签 */
.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: #1a1a1a;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    font-size: 13px;
}

/* 亚军头衔 */
.zib-cl-podium-item.rank-2 .zib-cl-podium-title {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    color: #333;
    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: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 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 30px rgba(255, 215, 0, 0.5);
    animation: zib-cl-glow-gold 2s ease-in-out infinite;
    width: 68px;
    height: 68px;
}

@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-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin: 8px 0 4px;
    text-align: center;
}

/* 领奖台柱子 */
.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;
    background: linear-gradient(180deg, #2A2A2A 0%, #1A1A1A 100%);
    min-height: 70px;
}

.zib-cl-podium-item.rank-1 .zib-cl-podium-stand {
    min-height: 110px;
}

.zib-cl-podium-item.rank-2 .zib-cl-podium-stand {
    min-height: 85px;
}

.zib-cl-podium-item.rank-3 .zib-cl-podium-stand {
    min-height: 70px;
}

/* 佣金金额 */
.zib-cl-podium-amount {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 列表样式 ========== */
.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;
}

.zib-cl-list-item:hover {
    transform: translateX(5px);
    border-color: #FC2F5E;
}

/* 排名 */
.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;
    background: linear-gradient(135deg, #FC2F5E 0%, #FF6B35 100%);
    padding: 2px;
    flex-shrink: 0;
}

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

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

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

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

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

.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;
}

.zib-cl-list-amount .label {
    font-size: 10px;
    color: #555;
    display: block;
}

/* ========== 底部提示 ========== */
.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); }
}

/* ========== 响应式设计 ========== */
@media (max-width: 480px) {
    .zib-cl-wrapper {
        padding: 15px 10px;
    }
    
    .zib-cl-header {
        padding: 18px 16px;
    }
    
    .zib-cl-title {
        font-size: 18px;
    }
    
    .zib-cl-title-icon {
        font-size: 22px;
    }
    
    .zib-cl-button-area {
        padding: 6px 12px;
    }
    
    .zib-cl-header-btn {
        padding: 6px 18px;
        font-size: 12px;
    }
    
    .zib-cl-podium {
        padding: 40px 5px 15px;
    }
    
    .zib-cl-podium-item.rank-1 .zib-cl-podium-avatar {
        width: 60px;
        height: 60px;
    }
    
    .zib-cl-podium-avatar {
        width: 50px;
        height: 50px;
    }
    
    .zib-cl-podium-name {
        font-size: 12px;
    }
    
    .zib-cl-podium-amount {
        font-size: 14px;
    }
    
    .zib-cl-list-item {
        padding: 12px 14px;
    }
    
    .zib-cl-list-avatar {
        width: 42px;
        height: 42px;
    }
    
    .zib-cl-list-name {
        font-size: 14px;
    }
    
    .zib-cl-list-amount .amount {
        font-size: 16px;
    }
}

/* ========== 深色模式适配 ========== */
@media (prefers-color-scheme: dark) {
    .zib-cl-card {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }
}
