.stats-search-container {
    background: rgba(27, 23, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(251, 191, 36, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stats-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: white;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.stats-search-input:focus {
    outline: none;
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.stats-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.stats-search-type {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.stats-search-type:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
}

.stats-search-type input[type="radio"] {
    display: none;
}

.stats-search-type input[type="radio"]:checked + span {
    color: #fbbf24;
}

.stats-search-btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 1rem;
    color: black;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
}

.stats-game-card {
    background: rgba(27, 23, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
    display: block;
}

.stats-game-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.stats-top-player-card {
    background: rgba(27, 23, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 1rem;
}

.stats-top-player-card:hover {
    transform: translateX(10px);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.top-players-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.top-players-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: white;
}

.top-players-tab.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-color: #fbbf24;
    color: black;
    box-shadow: 0 5px 20px rgba(251, 191, 36, 0.3);
}

.top-players-content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.top-players-content.active {
    opacity: 1;
}

.stats-period-selector {
    display: flex;
    gap: 0.5rem;
    background: rgba(27, 23, 22, 0.8);
    padding: 0.5rem;
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.stats-period-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.stats-period-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.stats-period-btn.active {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: black;
}

.stats-mode-card {
    background: rgba(27, 23, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.stats-mode-card:hover {
    border-color: rgba(251, 191, 36, 0.3);
}

.stats-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.stats-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}

.stats-stat-card-compact {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.stats-stat-card-compact:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(251, 191, 36, 0.3);
    transform: translateY(-2px);
}


.stats-clan-member-card {
    background: rgba(27, 23, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stats-clan-member-card:hover {
    border-color: rgba(251, 191, 36, 0.5);
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stats-leaderboard-entry {
    background: rgba(27, 23, 22, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s ease;
}

.stats-leaderboard-entry:hover {
    transform: translateX(10px);
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stats-leaderboard-entry.top3 {
    border: 2px solid rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(218, 165, 32, 0.05));
}

.stats-leaderboard-entry.top3:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.2);
}

.stats-select {
    padding: 0.75rem 1.5rem;
    background: rgba(27, 23, 22, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-select:hover {
    border-color: rgba(251, 191, 36, 0.5);
}

.stats-select:focus {
    outline: none;
    border-color: #fbbf24;
}

.stats-select option {
    background: #1b1716;
    color: white;
    padding: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.stats-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
    color: white;
    transform: translateX(-5px);
}

.stats-back-btn .back-arrow {
    transition: transform 0.3s ease;
}

.stats-back-btn:hover .back-arrow {
    transform: translateX(-3px);
}

@media (max-width: 768px) {
    .stats-search-container {
        padding: 1.5rem;
    }
    
    .stats-game-card,
    .stats-mode-card,
    .stats-clan-member-card,
    .stats-leaderboard-entry {
        padding: 1.25rem;
    }
    
    .stats-period-selector {
        flex-direction: column;
    }
    
    .stats-stat-card {
        padding: 1rem;
    }
    
    .top-players-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-game-card,
.stats-top-player-card,
.stats-mode-card,
.stats-clan-member-card,
.stats-leaderboard-entry {
    animation: fadeInUp 0.5s ease-out;
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.slide-up {
    animation: fadeInUp 0.5s ease-out;
}

        .tab-button {
            padding: 12px 24px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            text-decoration: none;
            display: inline-block;
        }
        
        .tab-button:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(251, 191, 36, 0.3);
        }
        
        .tab-button.active {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
            border-color: rgba(251, 191, 36, 0.5);
            color: #FBB020;
        }
        
        .stats-clan-member-card {
            margin-bottom: 1rem;
        }
        
        .pagination {
            display: flex;
            gap: 8px;
            justify-content: center;
            margin-top: 2rem;
        }
        
        .pagination a, .pagination span {
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .pagination a:hover {
            background: rgba(251, 191, 36, 0.2);
            border-color: rgba(251, 191, 36, 0.5);
        }
        
        .pagination .current {
            background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(245, 158, 11, 0.3));
            border-color: rgba(251, 191, 36, 0.5);
            color: #FBB020;
            font-weight: bold;
        }
        
        .pagination .disabled {
            opacity: 0.3;
            cursor: not-allowed;
            pointer-events: none;
        }
        
        .debug-panel {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(0, 0, 0, 0.9);
            border: 1px solid rgba(251, 191, 36, 0.3);
            border-radius: 8px;
            padding: 12px;
            max-width: 300px;
            max-height: 400px;
            overflow-y: auto;
            z-index: 9999;
            font-size: 12px;
        }
        
        .debug-panel h4 {
            color: #FBB020;
            margin-bottom: 8px;
            font-weight: bold;
        }
        
        .debug-log {
            padding: 4px;
            margin: 2px 0;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 4px;
        }
        
        .debug-log.slow {
            background: rgba(239, 68, 68, 0.2);
            border-left: 3px solid #ef4444;
        }

.league-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.league-card:hover {
    transform: translateY(-4px);
    border-color: inherit;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.league-card h3 {
    text-shadow: 0 0 20px currentColor;
}

.league-card .w-16 {
    transition: all 0.3s ease;
}

.league-card:hover .w-16 {
    transform: scale(1.1) rotate(5deg);
}

@media (max-width: 768px) {
    .league-card {
        padding: 1rem;
    }
    
    .league-card h3 {
        font-size: 1.5rem;
    }
}

.league-info-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    padding: 2rem;
    border-radius: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.league-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.league-icon-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        box-shadow: 0 0 40px currentColor, 0 0 60px currentColor;
    }
}

.league-progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.league-progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease-out;
    position: relative;
    box-shadow: 0 0 15px currentColor;
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
    100% {
        filter: brightness(1);
    }
}

.league-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressSlide 2s ease-in-out infinite;
}

@keyframes progressSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

@media (max-width: 1024px) {
    .league-info-card {
        padding: 1.5rem;
    }
    
    .league-icon-large {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .league-info-card h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .league-info-card {
        padding: 1rem;
    }
    
    .league-icon-large {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .league-info-card h3 {
        font-size: 1.75rem;
    }
    
    .league-progress-bar {
        height: 20px;
    }
}

.league-progress-bar {
    transition: width 0.5s ease;
}