/* ===================================
   STRONA NAJPOPULARNIEJSZYCH KLUBÓW
   Stylowanie dla rankingu kibiców
   =================================== */

.popular-clubs-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============ NAGŁÓWEK STRONY ============ */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header h1 span {
    animation: trophy-pulse 2s ease-in-out infinite;
}

@keyframes trophy-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.page-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
}

/* ============ FILTRY DYSCYPLIN ============ */
.sport-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

.sport-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sport-filter-btn span {
    font-size: 16px;
}

.sport-filter-btn:hover {
    background: #f8f9ff;
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.sport-filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sport-filter-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* ============ STATYSTYKI OGÓLNE ============ */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #777;
    font-weight: 500;
}

/* ============ KONTENER RANKINGU ============ */
.ranking-container {
   
    border-radius: 16px;
   
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    padding-bottom: 20px;
  
}



.ranking-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4CAF50;
    font-size: 14px;
    font-weight: 500;
}

.ranking-info span {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============ LOADING SPINNER ============ */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #667eea;
}

.loading-spinner .spinner-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: inline-block;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1rem;
    color: #777;
    margin: 0;
}

/* ============ LISTA KLUBÓW ============ */
.clubs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.club-rank-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #fafafa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.club-rank-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.club-rank-item:hover {
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.club-rank-item:hover::before {
    opacity: 1;
}

/* Podium - top 3 */
.club-rank-item.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
}

.club-rank-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    border-color: #c0c0c0;
}

.club-rank-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #e9b87e 100%);
    border-color: #cd7f32;
}

/* Pozycja rankingowa */
.rank-position {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.rank-1 .rank-position {
    background: linear-gradient(135deg, #d4af37 0%, #f4e5a1 100%);
    font-size: 1.8rem;
    color: #8b6914;
}

.rank-2 .rank-position {
    background: linear-gradient(135deg, #8c8c8c 0%, #c9c9c9 100%);
    color: #4a4a4a;
}

.rank-3 .rank-position {
    background: linear-gradient(135deg, #a0522d 0%, #cd853f 100%);
    color: #5d2f1a;
}

/* Logo klubu */
.club-logo-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    padding: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.club-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Informacje o klubie */
.club-info {
    flex: 1;
    min-width: 0;
}

.club-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.club-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.club-name a:hover {
    color: #667eea;
}

.club-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item span {
    font-size: 14px;
}

.sport-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Liczba kibiców */
.fans-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 25px;
    background: white;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rank-1 .fans-count,
.rank-2 .fans-count,
.rank-3 .fans-count {
    background: rgba(255,255,255,0.9);
}

.fans-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.fans-label {
    font-size: 0.85rem;
    color: #777;
    font-weight: 500;
}

.fans-icon {
    font-size: 1.5rem;
    color: #667eea;
}

/* ============ BRAK WYNIKÓW ============ */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.no-results span {
    display: block;
    margin-bottom: 20px;
}

.no-results p {
    font-size: 1.2rem;
    margin: 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .page-header h1 span {
        font-size: 1.8rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .sport-filters {
        gap: 8px;
    }
    
    .sport-filter-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .ranking-container {
        padding: 20px 15px;
    }
    
    .ranking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ranking-header h2 {
        font-size: 1.5rem;
    }
    
    .club-rank-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .rank-position {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .club-logo-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .club-name {
        font-size: 1.1rem;
    }
    
    .club-meta {
        gap: 10px;
        font-size: 0.85rem;
    }
    
    .fans-count {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 15px;
    }
    
    .fans-number {
        font-size: 1.5rem;
    }
}

/* ============ ANIMACJE ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.club-rank-item {
    animation: fadeInUp 0.5s ease-out backwards;
}

.club-rank-item:nth-child(1) { animation-delay: 0.05s; }
.club-rank-item:nth-child(2) { animation-delay: 0.1s; }
.club-rank-item:nth-child(3) { animation-delay: 0.15s; }
.club-rank-item:nth-child(4) { animation-delay: 0.2s; }
.club-rank-item:nth-child(5) { animation-delay: 0.25s; }

/* Pozostałe bez opóźnienia */
.club-rank-item:nth-child(n+6) { animation-delay: 0s; }

/* ===================================
   WIDGET: NOWI KIBICE W TYM TYGODNIU
   =================================== */

.new-fans-widget {
   
    border-radius: 12px;
    
    margin-bottom: 30px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
   
}

.new-fans-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    
}

.new-fans-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-fans-header h3 span {
    font-size: 1.5rem;
}

.new-fans-period {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    background: #f0f0ff;
    padding: 5px 12px;
    border-radius: 20px;
}

.new-fans-loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 1rem;
}

.new-fans-loading span {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.new-fans-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.new-fan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.new-fan-item:hover {
    background: #f0f0ff;
    transform: translateX(5px);
}

.new-fan-club {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.new-fan-club-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.new-fan-club-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.new-fan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.new-fan-badge span {
    font-size: 1rem;
}

.new-fans-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.new-fans-empty p {
    margin: 10px 0 0 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .new-fans-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .new-fan-club-name {
        font-size: 0.85rem;
    }
    
    .new-fan-badge {
        font-size: 0.8rem;
    }
}

/* ===================================
   WIDGET: RANKING LIG/DYWIZJI
   =================================== */

.league-rankings-widget {
    
    border-radius: 12px;
    
    margin-top: 30px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
   
}

.league-rankings-header {
   
    margin-bottom: 20px;
    
    
}

.league-rankings-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.league-rankings-header h3 span {
    font-size: 1.6rem;
}

.league-rankings-subtitle {
    font-size: 0.9rem;
    color: #666;
}

.league-rankings-loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 1rem;
}

.league-rankings-loading span {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    animation: spin 2s linear infinite;
}

.league-rankings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.league-rank-item {
    background: linear-gradient(135deg, #f9f9f9 0%, #fff 100%);
    border-radius: 10px;
    padding: 18px 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.league-rank-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.league-rank-item.podium-1 {
    border-left-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #fff 100%);
}

.league-rank-item.podium-2 {
    border-left-color: #c0c0c0;
    background: linear-gradient(135deg, #f5f5f5 0%, #fff 100%);
}

.league-rank-item.podium-3 {
    border-left-color: #cd7f32;
    background: linear-gradient(135deg, #ffeee6 0%, #fff 100%);
}

.league-rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.league-position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.league-rank-item.podium-1 .league-position-badge {
    background: #ffd700;
    color: #333;
    font-size: 1.2rem;
}

.league-rank-item.podium-2 .league-position-badge {
    background: #c0c0c0;
    color: #333;
}

.league-rank-item.podium-3 .league-position-badge {
    background: #cd7f32;
    color: white;
}

.league-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    flex: 1;
    margin: 0 15px;
}

.league-sport-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0ff;
    color: #667eea;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.league-rank-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.league-stat {
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.league-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.league-stat-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    margin-top: 4px;
    display: block;
}

.league-rankings-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.league-rankings-empty p {
    margin: 10px 0 0 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .league-rank-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .league-name {
        font-size: 1rem;
        margin: 0 10px;
    }
    
    .league-rank-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .league-stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 8px 12px;
    }
    
    .league-stat-label {
        margin-top: 0;
        order: -1;
    }
}
