.leaderboard-section {
    padding: 80px 0;
    background-color: var(--background-alt);
    background-image: 
        radial-gradient(circle at 10% 90%, rgba(93, 95, 239, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(255, 78, 92, 0.05) 0%, transparent 40%);
    display: block;
    width: 100%;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.leaderboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0.2;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--text-dark);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 10px auto 0;
    border-radius: 2px;
}

.leaderboard-container {
    max-width: 1100px;
    margin: 0 auto;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    background: white;
    margin-bottom: 16px;
    padding: 18px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

.leaderboard-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(var(--primary-color), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leaderboard-row:hover::before {
    opacity: 1;
}

.leaderboard-row:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.rank {
    font-size: 1.6rem;
    font-weight: 700;
    min-width: 65px;
    text-align: center;
    position: relative;
    color: var(--text-light);
    padding-right: 15px;
}

.leaderboard-row:nth-child(1) .rank {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    font-size: 1.9rem;
}

.leaderboard-row:nth-child(2) .rank {
    color: #C0C0C0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
    font-size: 1.8rem;
}

.leaderboard-row:nth-child(3) .rank {
    color: #CD7F32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
    font-size: 1.7rem;
}

.leaderboard-row:nth-child(1) {
    background: linear-gradient(to right, #fff, #fffdf5);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.leaderboard-row:nth-child(2) {
    background: linear-gradient(to right, #fff, #fafafa);
    border: 1px solid rgba(192, 192, 192, 0.2);
}

.leaderboard-row:nth-child(3) {
    background: linear-gradient(to right, #fff, #fff9f5);
    border: 1px solid rgba(205, 127, 50, 0.2);
}

.leaderboard-row:nth-child(1):hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.15);
}

.leaderboard-row:nth-child(2):hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(192, 192, 192, 0.15);
}

.leaderboard-row:nth-child(3):hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(205, 127, 50, 0.15);
}

.leaderboard-video {
    display: flex;
    flex: 1;
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.video-thumb {
    width: 140px;
    height: 85px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) - 4px);
    margin-right: 20px;
    transition: transform 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.leaderboard-row:hover .video-thumb {
    transform: scale(1.05);
}

.video-details {
    flex: 1;
}

.video-title {
    font-size: 1.15rem;
    margin: 0 0 10px 0;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.video-stats span {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.video-stats i {
    margin-right: 6px;
    color: var(--primary-color);
}

.leaderboard-row:nth-child(1) .video-stats i {
    color: #FFD700;
}

.leaderboard-row:nth-child(2) .video-stats i {
    color: #C0C0C0;
}

.leaderboard-row:nth-child(3) .video-stats i {
    color: #CD7F32;
}

/* Loading state styles */
.leaderboard-loading .leaderboard-row {
    background: white;
    margin-bottom: 16px;
    padding: 18px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.video-thumb-placeholder {
    width: 140px;
    height: 85px;
    background: var(--placeholder-background);
    border-radius: calc(var(--border-radius) - 4px);
    animation: shimmer 1.5s infinite;
    overflow: hidden;
    position: relative;
}

.video-thumb-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--placeholder-highlight) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
}

.loading-placeholder {
    background: var(--placeholder-background);
    border-radius: 4px;
    animation: shimmer 1.5s infinite;
    overflow: hidden;
    position: relative;
}

.loading-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--placeholder-highlight) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
    background-size: 200% 100%;
}

.title-placeholder {
    height: 20px;
    width: 80%;
    margin-bottom: 12px;
}

.meta-placeholder {
    height: 16px;
    width: 60%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.leaderboard-loading .rank {
    min-width: 65px;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
}

.leaderboard-loading .video-details {
    flex: 1;
    padding: 8px 0;
}

.leaderboard-error {
    text-align: center;
    padding: 50px 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.leaderboard-error p {
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.retry-button {
    margin-top: 15px;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: calc(var(--border-radius) - 4px);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-sm);
}

.retry-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

/* Responsive styles */
@media (max-width: 768px) {
    .leaderboard-section {
        padding: 60px 0;
    }
    
    .section-title, .section-header h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .leaderboard-row {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rank {
        font-size: 1.4rem;
        min-width: 100%;
        text-align: left;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
    }
    
    .rank::after {
        content: '';
        display: block;
        flex: 1;
        height: 1px;
        background: var(--border-color);
        margin-left: 10px;
    }
    
    .leaderboard-video {
        width: 100%;
    }
    
    .video-thumb {
        width: 120px;
        height: 70px;
        margin-right: 15px;
    }
    
    .video-title {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .video-stats {
        font-size: 0.85rem;
        gap: 12px;
    }
    
    .leaderboard-loading .rank {
        min-width: 100%;
        font-size: 1.4rem;
        text-align: left;
        margin-bottom: 10px;
    }
    
    .video-thumb-placeholder {
        width: 120px;
        height: 70px;
    }
    
    .title-placeholder {
        height: 18px;
    }
    
    .meta-placeholder {
        height: 14px;
    }
}

@media (max-width: 480px) {
    .video-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .video-thumb {
        width: 90px;
        height: 55px;
    }
    
    .video-thumb-placeholder {
        width: 90px;
        height: 55px;
    }
    
    .leaderboard-error p {
        font-size: 1rem;
    }
}

.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 20px 0;
    min-height: 120px;
}

.error-message::before {
    content: '⚠️';
    font-size: 1.5rem;
    margin-right: 10px;
} 