/* ===========================================
   Top Stats Section - Alle Plattformen Rankings
   =========================================== */

/* Main Container */
.top-stats-section {
    margin: 40px 0;
    padding: 0;
}

.top-stats-main-header {
    text-align: center;
    margin-bottom: 35px;
}

.top-stats-main-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 10px 0;
}

.top-stats-main-header h2 i {
    color: #FFD700;
    font-size: 1.6rem;
}

.top-stats-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 15px 0;
}

/* View All Rankings Button */
.view-all-rankings-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.view-all-rankings-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #818cf8, #6366f1);
}

.view-all-rankings-btn i:first-child {
    color: #FFD700;
}

.view-all-rankings-btn i:last-child {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.view-all-rankings-btn:hover i:last-child {
    transform: translateX(4px);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 0 10px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.category-tab i {
    font-size: 0.85rem;
}

.category-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Growth Platform Selector */
.growth-platform-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.growth-platform-selector .selector-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.platform-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.platform-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

.platform-tab i {
    font-size: 0.9rem;
}

.platform-tab:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.platform-tab.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary, #8b5cf6));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.3);
}

/* Growth Section Styling */
.growth-section .platform-ranking-header {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.05));
}

.growth-section .platform-ranking-header i {
    color: #22c55e;
}

/* Platforms Grid - Alle nebeneinander */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Platform Section */
.platform-ranking-section {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.platform-ranking-section:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Platform Header */
.platform-ranking-header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.platform-ranking-header i {
    font-size: 1.2rem;
}

/* Platform-specific colors */
.platform-ranking-section:has(.fa-tiktok) .platform-ranking-header i { color: #fff; }
.platform-ranking-section:has(.fa-instagram) .platform-ranking-header i { color: #E1306C; }
.platform-ranking-section:has(.fa-youtube) .platform-ranking-header i { color: #FF0000; }
.platform-ranking-section:has(.fa-twitch) .platform-ranking-header i { color: #9146FF; }
.platform-ranking-section:has(.fa-x-twitter) .platform-ranking-header i { color: #fff; }
.platform-ranking-section:has(.fa-spotify) .platform-ranking-header i { color: #1DB954; }

/* Ranking List */
.ranking-list {
    padding: 8px 0;
}

/* Ranking Item */
.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Position Badge */
.ranking-position {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    flex-shrink: 0;
}

.ranking-position.top-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.ranking-position.top-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #000;
}

.ranking-position.top-3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    color: #fff;
}

/* Avatar */
.ranking-item-avatar {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    position: relative;
}

.ranking-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 1rem;
}

/* Info */
.ranking-item-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.ranking-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-item-username {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Stat */
.ranking-item-stat {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
    text-align: right;
}

/* Skeleton Loading */
.ranking-item.skeleton {
    pointer-events: none;
}

.skeleton-pulse {
    background: linear-gradient(90deg, 
        var(--bg-tertiary) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s infinite;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty State */
.top-stats-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.top-stats-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

.top-stats-empty p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 1400px) {
    .platforms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .platforms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .top-stats-main-header h2 {
        font-size: 1.4rem;
    }
    
    .category-tabs {
        gap: 8px;
    }
    
    .category-tab {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .category-tab span {
        display: none;
    }
    
    .category-tab i {
        font-size: 1rem;
    }
}

/* No Data Message */
.no-data-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ============================================
   Video Sections (TikTok Videos, Instagram Posts)
   ============================================ */

.video-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.video-section-header {
    margin-bottom: 25px;
}

.video-section-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.video-section-header h3 i {
    font-size: 1.2rem;
}

.video-section-header h3 .fa-tiktok { color: #fff; }
.video-section-header h3 .fa-instagram { color: #E1306C; }

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

/* Video Card */
.video-card {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 9 / 16;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.video-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    z-index: 2;
}

.video-rank.top-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.video-rank.top-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    color: #000;
}

.video-rank.top-3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    color: #fff;
}

.video-stats-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 8px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    display: flex;
    justify-content: center;
    gap: 12px;
}

.video-stats-overlay span {
    font-size: 0.7rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    color: #fff;
}

.video-meta {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-creator-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.video-creator-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Video Grid */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animation for items */
.platform-ranking-section {
    animation: fadeInUp 0.4s ease both;
}

.platform-ranking-section:nth-child(1) { animation-delay: 0ms; }
.platform-ranking-section:nth-child(2) { animation-delay: 50ms; }
.platform-ranking-section:nth-child(3) { animation-delay: 100ms; }
.platform-ranking-section:nth-child(4) { animation-delay: 150ms; }
.platform-ranking-section:nth-child(5) { animation-delay: 200ms; }
.platform-ranking-section:nth-child(6) { animation-delay: 250ms; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
