/**
 * Rankings Page - Top 30 Rankings
 * Premium CSS mit Animationen und Platform-Backgrounds
 */

/* ===== CSS Variables ===== */
:root {
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    --accent-primary: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    
    /* Platform Colors */
    --youtube-color: #ff0000;
    --youtube-glow: rgba(255, 0, 0, 0.4);
    --youtube-bg: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 0, 0, 0.15) 0%, transparent 60%);
    
    --tiktok-color: #fe2c55;
    --tiktok-glow: rgba(254, 44, 85, 0.4);
    --tiktok-bg: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(254, 44, 85, 0.12) 0%, rgba(0, 242, 234, 0.08) 30%, transparent 60%);
    
    --instagram-color: #c13584;
    --instagram-glow: rgba(193, 53, 132, 0.4);
    --instagram-bg: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(131, 58, 180, 0.15) 0%, rgba(253, 29, 29, 0.1) 30%, rgba(252, 176, 69, 0.08) 50%, transparent 70%);
    
    --twitch-color: #9146ff;
    --twitch-glow: rgba(145, 70, 255, 0.4);
    --twitch-bg: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(145, 70, 255, 0.15) 0%, transparent 60%);
    
    --twitter-color: #000000;
    --twitter-glow: rgba(255, 255, 255, 0.2);
    --twitter-bg: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    
    --spotify-color: #1db954;
    --spotify-glow: rgba(29, 185, 84, 0.4);
    --spotify-bg: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(29, 185, 84, 0.15) 0%, transparent 60%);
    
    /* Ranking Colors */
    --gold: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.5);
    --silver: #c0c0c0;
    --silver-glow: rgba(192, 192, 192, 0.4);
    --bronze: #cd7f32;
    --bronze-glow: rgba(205, 127, 50, 0.4);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --border-radius-sm: 10px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Animated Background ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 100% 80% at 50% -20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 0% 50%, rgba(254, 44, 85, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 100% 80%, rgba(29, 185, 84, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* ===== Navigation ===== */
.rankings-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 64px;
    transition: var(--transition-normal);
}

.rankings-nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.nav-logo:hover {
    transform: scale(1.02);
}

.nav-logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.05));
    opacity: 0;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::before {
    opacity: 1;
}

/* ===== Hero Section ===== */
.rankings-hero {
    position: relative;
    padding: 160px 24px 100px;
    text-align: center;
    overflow: hidden;
    min-height: 500px;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 120% 80% at 50% 20%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 100% 60% at 80% 30%, rgba(254, 44, 85, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse 100% 60% at 20% 40%, rgba(29, 185, 84, 0.15) 0%, transparent 45%),
        radial-gradient(ellipse 80% 50% at 60% 70%, rgba(145, 70, 255, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse 80% 50% at 40% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 40%);
    animation: heroGradient 20s ease-in-out infinite alternate;
}

@keyframes heroGradient {
    0% { transform: scale(1) rotate(0deg); opacity: 0.9; }
    50% { transform: scale(1.15) rotate(1deg); opacity: 1; }
    100% { transform: scale(1.05) rotate(-1deg); opacity: 0.95; }
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    pointer-events: none;
    animation: iconFloat linear infinite;
    filter: blur(0.5px);
    text-shadow: 0 0 20px currentColor;
}

.floating-icon.youtube { color: var(--youtube-color); }
.floating-icon.tiktok { color: var(--tiktok-color); }
.floating-icon.instagram { color: var(--instagram-color); }
.floating-icon.twitch { color: var(--twitch-color); }
.floating-icon.twitter { color: rgba(255, 255, 255, 0.6); }
.floating-icon.spotify { color: var(--spotify-color); }

@keyframes iconFloat {
    0% {
        transform: translateY(100%) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    5% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.6;
        transform: translateY(-50vh) rotate(180deg) scale(1);
    }
    95% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-120%) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    animation: textShine 4s linear infinite;
}

@keyframes textShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.hero-content h1 i {
    -webkit-text-fill-color: var(--gold);
    filter: drop-shadow(0 0 30px var(--gold-glow));
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.period-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.period-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: 0;
}

.period-btn span {
    position: relative;
    z-index: 1;
}

/* Ensure button text is above ::before */
.period-btn {
    isolation: isolate;
}

.period-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.period-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 8px 30px var(--accent-glow);
    transform: translateY(-2px);
}

.period-btn.active span {
    color: #ffffff !important;
}

.period-btn.active::before {
    opacity: 0; /* Background is already set on .active, no need for pseudo-element */
}

/* ===== Platform Navigation ===== */
.platform-nav-wrapper {
    position: sticky;
    top: 64px;
    z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.platform-nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.platform-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.platform-nav-btn i {
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.platform-nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: var(--transition-normal);
}

.platform-nav-btn:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.platform-nav-btn.active {
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

/* Platform-specific styles */
.platform-nav-btn.youtube:hover i,
.platform-nav-btn.youtube.active i { color: var(--youtube-color); }
.platform-nav-btn.youtube.active {
    background: linear-gradient(135deg, var(--youtube-color), #ff4444);
    box-shadow: 0 8px 30px var(--youtube-glow);
}
.platform-nav-btn.youtube.active i { color: white; }

.platform-nav-btn.tiktok:hover i,
.platform-nav-btn.tiktok.active i { color: var(--tiktok-color); }
.platform-nav-btn.tiktok.active {
    background: linear-gradient(135deg, var(--tiktok-color), #ff6b8a);
    box-shadow: 0 8px 30px var(--tiktok-glow);
}
.platform-nav-btn.tiktok.active i { color: white; }

.platform-nav-btn.instagram:hover i { color: var(--instagram-color); }
.platform-nav-btn.instagram.active {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    box-shadow: 0 8px 30px var(--instagram-glow);
}
.platform-nav-btn.instagram.active i { color: white; }

.platform-nav-btn.twitch:hover i,
.platform-nav-btn.twitch.active i { color: var(--twitch-color); }
.platform-nav-btn.twitch.active {
    background: linear-gradient(135deg, var(--twitch-color), #b380ff);
    box-shadow: 0 8px 30px var(--twitch-glow);
}
.platform-nav-btn.twitch.active i { color: white; }

.platform-nav-btn.twitter:hover i { color: var(--text-primary); }
.platform-nav-btn.twitter.active {
    background: linear-gradient(135deg, #14171a, #657786);
    box-shadow: 0 8px 30px var(--twitter-glow);
}
.platform-nav-btn.twitter.active i { color: white; }

/* X/Twitter Icon Fix - Font Awesome 6 */
.fa-x-twitter::before {
    content: "\e61b";
    font-family: "Font Awesome 6 Brands";
}

.platform-nav-btn.spotify:hover i,
.platform-nav-btn.spotify.active i { color: var(--spotify-color); }
.platform-nav-btn.spotify.active {
    background: linear-gradient(135deg, var(--spotify-color), #4de77a);
    box-shadow: 0 8px 30px var(--spotify-glow);
}
.platform-nav-btn.spotify.active i { color: white; }

.platform-nav-btn:not(.youtube):not(.tiktok):not(.instagram):not(.twitch):not(.twitter):not(.spotify).active {
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    box-shadow: 0 8px 30px var(--accent-glow);
}

/* ===== Main Content ===== */
.rankings-main {
    padding: 60px 24px 100px;
    min-height: 60vh;
    position: relative;
}

.rankings-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px;
    gap: 24px;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== Platform Section ===== */
.platform-section {
    margin-bottom: 80px;
    animation: sectionFadeIn 0.6s ease-out forwards;
    opacity: 0;
    position: relative;
    padding: 40px 0;
}

.platform-section::before {
    content: '';
    position: absolute;
    inset: -40px -100vw;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.platform-section:hover::before {
    opacity: 1;
}

/* Platform-specific backgrounds */
.platform-section.youtube::before {
    background: var(--youtube-bg);
}

.platform-section.tiktok::before {
    background: var(--tiktok-bg);
}

.platform-section.instagram::before {
    background: var(--instagram-bg);
}

.platform-section.twitch::before {
    background: var(--twitch-bg);
}

.platform-section.twitter::before {
    background: var(--twitter-bg);
}

.platform-section.spotify::before {
    background: var(--spotify-bg);
}

.platform-section:nth-child(1) { animation-delay: 0s; }
.platform-section:nth-child(2) { animation-delay: 0.1s; }
.platform-section:nth-child(3) { animation-delay: 0.2s; }
.platform-section:nth-child(4) { animation-delay: 0.3s; }
.platform-section:nth-child(5) { animation-delay: 0.4s; }
.platform-section:nth-child(6) { animation-delay: 0.5s; }

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.platform-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 20px;
}

.platform-section-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

.platform-section-title .platform-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}

.platform-section-title .platform-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
}

.platform-section:hover .platform-icon {
    transform: scale(1.1) rotate(5deg);
}

.platform-section-title .platform-icon.youtube { 
    background: linear-gradient(135deg, var(--youtube-color), #ff4444); 
    box-shadow: 0 8px 30px var(--youtube-glow);
}
.platform-section-title .platform-icon.tiktok { 
    background: linear-gradient(135deg, var(--tiktok-color), #ff6b8a); 
    box-shadow: 0 8px 30px var(--tiktok-glow);
}
.platform-section-title .platform-icon.instagram { 
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); 
    box-shadow: 0 8px 30px var(--instagram-glow);
}
.platform-section-title .platform-icon.twitch { 
    background: linear-gradient(135deg, var(--twitch-color), #b380ff); 
    box-shadow: 0 8px 30px var(--twitch-glow);
}
.platform-section-title .platform-icon.twitter { 
    background: linear-gradient(135deg, #000000, #333333); 
    box-shadow: 0 8px 30px var(--twitter-glow);
}

/* Ensure X icon is visible */
.platform-icon.twitter i.fa-x-twitter,
.platform-nav-btn.twitter i.fa-x-twitter {
    font-family: "Font Awesome 6 Brands";
}
.platform-section-title .platform-icon.spotify { 
    background: linear-gradient(135deg, var(--spotify-color), #4de77a); 
    box-shadow: 0 8px 30px var(--spotify-glow);
}

.platform-section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.platform-section-title span {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
}

/* Category Tabs within Platform Section */
.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tab i {
    font-size: 0.85rem;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.category-tab.active {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Platform specific active tabs */
.platform-section.youtube .category-tab.active { 
    background: linear-gradient(135deg, var(--youtube-color), #ff4444);
    box-shadow: 0 4px 20px var(--youtube-glow);
}
.platform-section.tiktok .category-tab.active { 
    background: linear-gradient(135deg, var(--tiktok-color), #ff6b8a);
    box-shadow: 0 4px 20px var(--tiktok-glow);
}
.platform-section.instagram .category-tab.active { 
    background: linear-gradient(135deg, #833ab4, #fd1d1d);
    box-shadow: 0 4px 20px var(--instagram-glow);
}
.platform-section.twitch .category-tab.active { 
    background: linear-gradient(135deg, var(--twitch-color), #b380ff);
    box-shadow: 0 4px 20px var(--twitch-glow);
}
.platform-section.twitter .category-tab.active { 
    background: linear-gradient(135deg, #14171a, #657786);
    box-shadow: 0 4px 20px var(--twitter-glow);
}
.platform-section.spotify .category-tab.active { 
    background: linear-gradient(135deg, var(--spotify-color), #4de77a);
    box-shadow: 0 4px 20px var(--spotify-glow);
}

/* ===== Rankings Grid ===== */
.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 16px;
}

/* ===== Ranking Card ===== */
.ranking-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: rgba(18, 18, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ranking-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.03) 100%);
    opacity: 0;
    transition: var(--transition-fast);
}

.ranking-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.ranking-card:hover {
    background: rgba(26, 26, 37, 0.9);
    border-color: var(--border-hover);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.ranking-card:hover::before {
    opacity: 1;
}

.ranking-card:hover::after {
    left: 100%;
}

/* Top 3 special styles */
.ranking-card.gold {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(18, 18, 26, 0.9));
}

.ranking-card.gold:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.2);
}

.ranking-card.silver {
    border-color: rgba(192, 192, 192, 0.3);
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.06), rgba(18, 18, 26, 0.9));
}

.ranking-card.silver:hover {
    border-color: rgba(192, 192, 192, 0.5);
    box-shadow: 0 20px 50px rgba(192, 192, 192, 0.15);
}

.ranking-card.bronze {
    border-color: rgba(205, 127, 50, 0.3);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.06), rgba(18, 18, 26, 0.9));
}

.ranking-card.bronze:hover {
    border-color: rgba(205, 127, 50, 0.5);
    box-shadow: 0 20px 50px rgba(205, 127, 50, 0.15);
}

/* Rank Badge */
.rank-badge {
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.ranking-card:hover .rank-badge {
    transform: scale(1.1);
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #1a1a00;
    border: none;
    box-shadow: 0 4px 20px var(--gold-glow);
    animation: goldPulse 2s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% { box-shadow: 0 4px 20px var(--gold-glow); }
    50% { box-shadow: 0 4px 30px var(--gold-glow), 0 0 40px var(--gold-glow); }
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #1a1a1a;
    border: none;
    box-shadow: 0 4px 20px var(--silver-glow);
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #e6a04a);
    color: #1a1000;
    border: none;
    box-shadow: 0 4px 20px var(--bronze-glow);
}

/* Avatar */
.ranking-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    transition: var(--transition-normal);
}

.ranking-card:hover .ranking-avatar {
    transform: scale(1.05);
    border-color: var(--border-hover);
}

.ranking-card.gold .ranking-avatar { 
    border-color: var(--gold); 
    box-shadow: 0 0 20px var(--gold-glow);
}
.ranking-card.silver .ranking-avatar { 
    border-color: var(--silver); 
    box-shadow: 0 0 20px var(--silver-glow);
}
.ranking-card.bronze .ranking-avatar { 
    border-color: var(--bronze); 
    box-shadow: 0 0 20px var(--bronze-glow);
}

/* User Info */
.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    transition: var(--transition-fast);
}

.ranking-card:hover .ranking-name {
    color: white;
}

.ranking-username {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats */
.ranking-stats {
    text-align: right;
    flex-shrink: 0;
}

.ranking-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.ranking-card:hover .ranking-value {
    transform: scale(1.05);
}

.ranking-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Growth value colors */
.ranking-value.positive {
    color: #22c55e;
}

.ranking-value.negative {
    color: #ef4444;
}

/* Growth details for growth categories */
.ranking-growth-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
    font-size: 0.75rem;
}

.growth-from-to {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.7rem;
}

.growth-percent {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
    font-size: 0.75rem;
}

.growth-percent.positive {
    color: #22c55e;
}

.growth-percent.negative {
    color: #ef4444;
}

.growth-percent i {
    font-size: 0.65rem;
}

/* Growth indicator (legacy) */
.ranking-growth {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 20px;
}

.ranking-growth.positive {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.ranking-growth.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-state i {
    font-size: 5rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ===== Footer ===== */
.rankings-footer {
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
    border-top: 1px solid var(--border-color);
    padding: 40px 24px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-links a:hover::after {
    width: 100%;
}

/* ===== Skeleton Loading ===== */
.skeleton-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.skeleton-pulse {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 100%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .rankings-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 16px;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .platform-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .platform-nav-btn {
        flex-shrink: 0;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .platform-nav-btn span {
        display: none;
    }
    
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    .platform-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .category-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-tab {
        flex-shrink: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .rankings-nav {
        padding: 0 16px;
    }
    
    .nav-link span {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .period-selector {
        gap: 8px;
    }
    
    .period-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .ranking-card {
        padding: 14px 16px;
    }
    
    .ranking-avatar {
        width: 48px;
        height: 48px;
    }
    
    .platform-section-title .platform-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .platform-section-title h2 {
        font-size: 1.5rem;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--border-color), var(--border-hover));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--border-hover), var(--accent-primary));
}

/* ===== Selection ===== */
::selection {
    background: var(--accent-primary);
    color: white;
}
