 /* === 1. NOWA PALETA (STYL "GRANITOWY BŁĘKIT") === */

:root {
    --bg-main: #1d263b; /* TŁO: Głęboki, "granitowo-niebieski" */
    --bg-main-trans: rgba(29, 38, 59, 0.85); /* Tło dla menu sticky */
    --border-dark: #2f3a52; /* Separatory */
    --text-primary: #eaf0ff; /* Tekst główny (chłodna biel) */
    --text-secondary: #7b8ab3; /* Tekst drugorzędny (szaro-niebieski) */
    
    --accent-gold: #e0b943; /* NOWY "ŻYWY" ZŁOTY */
    --accent-gold-bg-light: rgba(224, 185, 67, 0.1); /* Tło dla aktywnego filtra */
    --accent-gold-bg-hover: rgba(224, 185, 67, 0.05); /* Tło dla hover */
    
    /* --- TWOJE NOWE KOLORY - TRUDNOŚĆ --- */
    --diff-unknown: var(--border-dark);
    --diff-easy: #7ac207ff;
    --diff-normal: #0568c4ff;
    --diff-medium: #c46a03ff;
    --diff-hard: #be0303ff;
    --diff-extreme: #bd02adff;
} 

html, body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
}
body {
    margin: 0;
}
/* Ustawienie głównego kontenera dla zawartości (płaski layout) */
.topa {
    max-width: 1600px;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Reset "panelu" */
.section {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* Nadpisanie stylu inline */
.section > div[style*="margin"] {
    margin: 20px 0 !important;
}

/* Przejścia dla interakcji */
a, .button, .filter-btn, .expand-button {
    transition: all 0.2s ease-in-out;
}

/* === 2. MENU GÓRNE (STICKY) === */

/* === 2. MENU GÓRNE (STICKY) - WERSJA "SOLID GLOW" === */

.main-nav {
    margin: 0 !important; 
    padding: 0 20px;
    
    /* GŁÓWNE POZYCJONOWANIE (BEZ ZMIAN) */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: 55px;
    box-sizing: border-box; 
    
    /* CENTROWANIE ZAWARTOŚCI (BEZ ZMIAN) */
    display: flex;
    justify-content: center;
    align-items: center;

    /* --- SOLIDNY STYL "PREMIUM" (ZOSTAJE) --- */
    background-color: var(--border-dark); 
    border-bottom: none; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* === PRZYCISKI MENU Z NOWYMI EFEKTAMI === */

.main-nav .expand-button {
    background-color: transparent;
    border: none;
    color: var(--text-secondary); /* Bazowy szaro-niebieski */
    padding: 0 20px;
    margin: 0 5px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400; /* Normalna grubość */
    letter-spacing: 0.5px;
    border-radius: 0;
    
    /* Zostawiamy Twoją dolną kreskę jako bazę */
    border-bottom: 3px solid transparent; 
    
    /* PŁYNNE PRZEJŚCIE DLA NOWYCH EFEKTÓW */
    transition: color 0.2s var(--pro-curve), 
                text-shadow 0.2s var(--pro-curve), 
                border-bottom-color 0.2s var(--pro-curve),
                transform 0.2s var(--pro-curve),
                background-color 0.2s var(--pro-curve);
}


/* === NOWY EFEKT HOVER (POŚWIATA I UNIESIENIE) === */
.main-nav .expand-button:hover {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold); /* Kreska pojawia się na złoto */
    
    /* 1. DODANA ZŁOTA POŚWIATA NA TEKST */
    text-shadow: 0 0 8px rgba(224, 185, 67, 0.6);
}


/* === NOWY EFEKT ACTIVE (MOCNIEJSZA POŚWIATA I TŁO) === */
.main-nav .expand-button.active {
    color: var(--accent-gold);
    border-bottom-color: var(--accent-gold); /* Kreska zostaje na stałe */
    
    /* 1. DODANE SUBTELNE ZŁOTE TŁO */
    background-color: var(--accent-gold-bg-hover); /* rgba(224, 185, 67, 0.05) */
    
    /* 2. MOCNIEJSZA, STAŁA POŚWIATA */
    text-shadow: 0 0 10px rgba(224, 185, 67, 0.8);
}

/* === 3. NAGŁÓWEK STRONY I FILTRY (PŁASKI LAYOUT) === */

.topa h2[style*="color: #d3b35a"] {
    color: var(--text-primary) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-dark) !important;
    margin: 0 0 20px 0 !important;
    padding: 10px 0 20px 0 !important;
}

/* Płaskie filtry */
/* Płaskie filtry */
.filters-wrapper { 
    display: flex; 
    flex-wrap: wrap; /* Zostaje dla responsywności */
    gap: 8px; 
    margin: 0 0 20px 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    border: none;

    /* DODANE LINIE: */
    justify-content: space-between; /* Rozsuwa filtry i przełącznik */
    align-items: center; /* Wyrównuje je w pionie */
}
.filter-buttons-group {
    display: flex;
    flex-wrap: wrap; /* Pozwala samym filtrom się zawijać */
    gap: 8px;
}
.filter-btn { 
    background-color: rgba(0,0,0,0.2); /* NOWE TŁO (jak w przełączniku) */
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    cursor: pointer;
    font-weight: 400;
    box-shadow: none;
}

.filter-btn:hover { 
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background-color: transparent; /* TŁO ZNIKA NA HOVER */
    transform: none;
    box-shadow: none;
}

.filter-btn.active { 
    background-color: rgba(0,0,0,0.2); /* TŁO JEST PRZEZROCZYSTE */
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    font-weight: 400;
    box-shadow: none;
    transform: none;
}

/* === 4. PŁASKA TABELA === */

.topa table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

/* Nagłówek tabeli */
.topa table th {
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 10px;
    text-align: center;
    border-bottom: 2px solid var(--border-dark);
}

/* Komórki tabeli */
.topa table td {
    padding: 14px 10px;
    color: var(--text-primary);
    font-size: 15px;
    border-bottom: 1px solid var(--border-dark);
    text-align: center;
}

/* Link w tabeli */
.topa table td a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
}
.topa table td a:hover {
    color: var(--accent-gold);
}

/* Styl dla "Zebry" (co drugi wiersz) */
.topa table tr.row-dark td { 
    background: rgba(0, 0, 0, 0.3); /* Lub jakikolwiek kolor tła dla ciemniejszego wiersza */
}

/* Subtelny hover na całym wierszu */
.topa table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}
.topa table tr:hover td a {
    color: var(--text-primary);
}
.topa table tr:hover td a:hover {
    color: var(--accent-gold);
}


/* === 5. STONOWANE AKCENTY I STATUSY === */

        .loader-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9999; }
        .loader { width: 48px; height: 48px; border: 3px solid var(--accent-gold); border-bottom-color: transparent; border-radius: 50%; animation: rotation 1s linear infinite; }
        @keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
        
        .record-info { display: flex; flex-direction: column; align-items: center; }
        .record-time { display: block; text-align: center; font-weight: 400; }
        .record-holder { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 14px; }
        .record-holder a { text-decoration: none; font-weight: 400; }
        .record-holder.glow { text-shadow: 1px 1px 10px currentColor; }
        .online-status { width: 8px; height: 8px; }
        .popularity-badge { 
            display: inline-block; 
            padding: 2px 8px; 
            border-radius: 3px; 
            color: white; 
            font-size: 12px; 
            min-width: 120px; 
            text-align: center; 
            font-weight: 400; /* Lżejsza czcionka, tak jak prosiłeś */
        }
                .popularity-high { background-color: #538600ff; }
        .popularity-medium { background-color: #864700ff; } /* Używamy głównego złotego */
        .popularity-low { background-color: #860000ff; }

        /* GWIAZDKI TRUDNOŚCI (Style bazowe) */
        .difficulty-stars { 
            display: inline-flex; 
            gap: 2px; 
        }
        .star { 
            color: var(--border-dark); /* Kolor pustej gwiazdki */
            font-size: 18px; /* Przywrócenie prawidłowego rozmiaru */
        }
        
        .difficulty-0 .star:nth-child(-n+5) { color: var(--diff-unknown); }
        .difficulty-1 .star:nth-child(-n+1) { color: var(--diff-easy); }
        .difficulty-2 .star:nth-child(-n+2) { color: var(--diff-normal); }
        .difficulty-3 .star:nth-child(-n+3) { color: var(--diff-medium); }
        .difficulty-4 .star:nth-child(-n+4) { color: var(--diff-hard); }
        .difficulty-5 .star:nth-child(-n+5) { color: var(--diff-extreme); }
        
        /* Styl przycisku przełączania widoku (dopasowany do filtrów) */
        #toggleViewBtn {
            font-weight: 500;
        }
        #toggleViewBtn.active {
            background-color: var(--accent-gold-bg-light);
            border-color: var(--accent-gold);
            color: var(--accent-gold);
            font-weight: 500;
        }

        .topa { overflow-x: auto; }

        /* Przełączanie widoku */
        .topa table .col-league { display: none; }
        .topa table .col-records { display: table-cell; }

        .topa table.view-league .col-league { display: table-cell; }
        .topa table.view-league .col-records { display: none; }

        /* Media queries */
        @media (max-width: 992px) {
            .topa { padding: 0 10px; }
            .main-nav { display: flex; flex-direction: column; gap: 10px; align-items: stretch; height: auto; padding: 10px; }
            .main-nav .expand-button { margin: 0; text-align: center; }
            
            table th, table td { font-size: 12px; padding: 10px 5px; white-space: nowrap; }
            table td:nth-child(2) { white-space: normal; word-break: break-word; }
            .filters-wrapper { gap: 6px; padding: 0 0 10px 0; }
            .filter-btn { padding: 5px 10px; font-size: 11px; }
            
            /* Ukrywanie kolumn dla widoku REKORDÓW na mobile */
            .topa table:not(.view-league) th.col-records:nth-of-type(3), 
            .topa table:not(.view-league) td.col-records:nth-of-type(3),
            .topa table:not(.view-league) th.col-records:nth-of-type(4), 
            .topa table:not(.view-league) td.col-records:nth-of-type(4),
            .topa table:not(.view-league) th.col-records:nth-of-type(5), 
            .topa table:not(.view-league) td.col-records:nth-of-type(5),
            .topa table:not(.view-league) th.col-records:nth-of-type(11), 
            .topa table:not(.view-league) td.col-records:nth-of-type(11) {
                display: none;
            }
        }
        .toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background-color: rgba(0,0,0,0.2); /* Lekkie tło dla grupy */
    border: 1px solid var(--border-dark);
    border-radius: 4px;
}
.toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none; /* Zapobiega zaznaczaniu tekstu */
}

/* Sam przełącznik */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px; /* Szerokość */
    height: 24px; /* Wysokość */
}

/* Ukryj domyślny checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Tło przełącznika (slider) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #434e68; /* Kolor tła gdy OFF */
    transition: .4s;
    border-radius: 24px; /* Zaokrąglenie */
}

/* Kółko w środku */
.slider:before {
    position: absolute;
    content: "";
    height: 18px; /* Rozmiar kółka */
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Stan WŁĄCZONY (ON) */
input:checked + .slider {
    background-color: var(--accent-gold); /* Używamy Twojego złotego koloru */
}

input:checked + .slider:before {
    transform: translateX(20px); /* Przesunięcie kółka */
}





/* === EFEKTY "FUTURISTIC PREMIUM" v16.0 (CACHE-FIX + HEIGHT-FIX) === */

/* --- 0. NASZA BAZA --- */
:root {
    --pro-curve: cubic-bezier(0.2, 0.8, 0.2, 1);
    --pro-speed: 0.3s;
    /* TEN DOBRY "NIE-OSIKANY" KOLOR */
    --hover-bg-dark-gold: rgba(40, 35, 15, 0.4); 
}

/* --- 2. FILTRY (POPRAWIONE WYSOKOŚCI + "SKAKANIE") --- */

/* Wrapper (bez zmian) */
.filters-wrapper { 
    display: flex; 
    flex-wrap: wrap;
    gap: 8px; 
    margin: 0 0 20px 0;
    padding: 0;
    background-color: transparent;
    border: none;
    justify-content: space-between; 
    align-items: center; 
}

/* Grupa (bez zmian) */
.filter-buttons-group {
    display: flex;
    flex-wrap: wrap; 
    gap: 8px;
    align-items: center; 
}

/* === NOWA BAZA DLA RÓWNYCH PRZYCISKÓW === */
/* (Wszystkie 3 elementy dostają tę samą wysokość) */
.filter-btn-all,
.star-rating-filter,
.toggle-switch-wrapper {
    height: 38px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid var(--border-dark);
    background-color: rgba(0,0,0,0.2);
}

/* Przycisk "WSZYSTKIE" */
.filter-btn-all {
    color: var(--text-secondary);
    padding: 6px 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all var(--pro-speed) var(--pro-curve);
    
    /* Wyrównanie tekstu w środku (bo to <a>) */
    display: inline-flex;
    align-items: center;
}
.filter-btn-all:hover {
    color: var(--accent-gold);
    /* DODANA POŚWIATA (jak w etykiecie) */
    text-shadow: 0 0 5px rgba(224, 185, 67, 0.5); 
}
.filter-btn-all.active {
    /* Używamy teraz tła z hovera, zamiast pełnego */
    /* Zmieniamy czcionkę na złotą (jak w etykiecie) */
    color: var(--accent-gold); 
    font-weight: 700;
    /* Dodajemy poświatę (jak w etykiecie) */
    text-shadow: 0 0 5px rgba(224, 185, 67, 0.5); 
}

/* Kontener na gwiazdki */
.star-rating-filter {
    display: flex;
    gap: 5px;
    padding: 6px 10px; 
    /* NOWOŚĆ: Wyrównuje gwiazdki w pionie */
    align-items: center; 
}

/* Przełącznik (reset bazowych styli) */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    /* Nie potrzebuje już tych reguł, bo ma je z bazy */
}


/* Gwiazdka (stan bazowy) */
.star-rating-btn {
    font-size: 20px; 
    color: var(--border-dark); 
    text-decoration: none;
    transition: all 0.2s var(--pro-curve);
    text-shadow: none;
    /* OSTATECZNY FIX NA "SKAKANIE" (nadpisuje stary cache) */
    transform: none !important;
}

/* Gwiazdka (hover) */
.star-rating-btn:hover {
    text-shadow: 0 0 8px currentColor; 
    transform: none !important;
}

/* Gwiazdka (aktywna) */
.star-rating-btn.active {
    text-shadow: 0 0 10px currentColor; 
    transform: none !important;
}

/* Kolory (Hover) - bez zmian */
.star-rating-filter .star-rating-btn:nth-child(1):hover { color: var(--diff-unknown); }
.star-rating-filter .star-rating-btn:nth-child(2):hover { color: var(--diff-easy); }
.star-rating-filter .star-rating-btn:nth-child(3):hover { color: var(--diff-normal); }
.star-rating-filter .star-rating-btn:nth-child(4):hover { color: var(--diff-medium); }
.star-rating-filter .star-rating-btn:nth-child(5):hover { color: var(--diff-hard); }
.star-rating-filter .star-rating-btn:nth-child(6):hover { color: var(--diff-extreme); }

/* Kolory (Active) - bez zmian */
.star-rating-filter .star-rating-btn:nth-child(1).active { color: var(--diff-unknown); }
.star-rating-filter .star-rating-btn:nth-child(2).active { color: var(--diff-easy); }
.star-rating-filter .star-rating-btn:nth-child(3).active { color: var(--diff-normal); }
.star-rating-filter .star-rating-btn:nth-child(4).active { color: var(--diff-medium); }
.star-rating-filter .star-rating-btn:nth-child(5).active { color: var(--diff-hard); }
.star-rating-filter .star-rating-btn:nth-child(6).active { color: var(--diff-extreme); }


/* --- 3. PRZEŁĄCZNIK (NIETKNIĘTY - JEST SUPER) --- */
/* (KOD SKOPIOWANY 1:1) */
input:checked + .slider {
    background-color: var(--accent-gold);
    background-image: none;
    animation: none;
    box-shadow: 0 0 12px 2px rgba(224, 185, 67, 0.4); 
}
input:checked + .slider:before {
    box-shadow: none;
}
.toggle-label {
    transition: color var(--pro-speed) var(--pro-curve), 
                text-shadow var(--pro-speed) var(--pro-curve);
}
.toggle-switch-wrapper:hover .toggle-label {
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(224, 185, 67, 0.5);
}
input:checked ~ .toggle-label {
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(224, 185, 67, 0.5);
}
input:checked + .slider:before {
    box-shadow: 0 0 8px 1px var(--accent-gold);
}


/* --- 4. TABELA (BEZ ZMIAN - JEST OK) --- */
/* (KOD SKOPIOWANY 1:1) */
.topa table tr {
    border-left: 3px solid transparent;
}
.topa table tr:not(#a) { /* Wyklucza nagłówek */
    transition: background-color var(--pro-speed) var(--pro-curve),
                border-left-color var(--pro-speed) var(--pro-curve);
}
.topa table tr:not(#a):hover {
    background-color: var(--hover-bg-dark-gold); 
    border-left-color: var(--accent-gold);
}


/* === NOWY PROFESJONALNY WSKAŹNIK STATUSU (KROPKI) === */

/* Baza dla kropki - używamy 8px jak w oryginale */
.online-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%; /* Gwarancja idealnej kropki */
    /* Zapobiega ściśnięciu kropki przez flexbox */
    flex-shrink: 0; 
}

/* Kropka ZIELONA (Online) - pulsująca */
.online-status.status-online {
    background-color: #4CAF50; /* Czysty zielony */
    /* Uruchomienie animacji "radaru" */
    animation: pulse-online 2s infinite; 
}

/* Kropka CZERWONA (Offline) - statyczna */
.online-status.status-offline {
    background-color: #D9534F; /* Profesjonalny, ciemniejszy czerwony */
    /* Statyczna, subtelna poświata */
    box-shadow: 0 0 6px rgba(217, 83, 79, 0.5);
}

/* Animacja pulsowania dla statusu Online */
@keyframes pulse-online {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        /* Aura rozszerza się do 8px i znika */
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0); 
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}
/*
=============================================
STYL STOPKI (FOOTER)
=============================================
*/

.site-footer {
    background-color: #161d2b; /* Ciemniejsze tło niż reszta strony */
    border-top: 2px solid var(--border-dark);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 40px; /* Odstęp od tabeli */
}

.footer-container {
    max-width: 1600px; /* Ten sam kontener co .topa */
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 kolumny */
    gap: 30px;
}

.footer-column h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.footer-about p {
    margin: 0;
    color: var(--text-secondary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(224, 185, 67, 0.5);
}

.footer-links i {
    margin-right: 12px;
    color: var(--accent-gold);
    width: 18px; /* Stała szerokość dla ikonek */
    text-align: center;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    flex-wrap: wrap; /* Zawijanie na mobile */
    gap: 15px;
}

.footer-bottom-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-right: 15px;
    transition: all 0.2s ease-in-out;
}

.footer-bottom-links a:hover {
    color: var(--accent-gold);
}

.footer-copyright {
    text-align: right;
}

.footer-copyright img {
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}
.footer-copyright img:hover {
    opacity: 1;
}


/* --- RESPONSIVE DLA STOPKI --- */
@media (max-width: 992px) {
    .footer-main {
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny na tabletach */
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr; /* 1 kolumna na mobile */
    }

    .footer-bottom {
        flex-direction: column; /* Wszystko jedno pod drugim */
        text-align: center;
    }

    .footer-bottom-links {
        order: 2; /* Linki na dole */
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .footer-bottom-links a {
        margin: 0 5px;
    }

    .footer-copyright {
        order: 1; /* Copyright na górze */
        text-align: center;
    }
}
/*
=============================================
STYL WYSZUKIWARKI I PAGINACJI
=============================================
*/

/* Zmiana layoutu filtrów, aby zmieścić wyszukiwarkę */
.filters-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Kluczowe: rozsuwa grupy */
    align-items: center;
    gap: 15px; /* Odstęp między grupą filtrów a grupą wyszukiwania */
}

/* Grupa dla filtrów (gwiazdki, "wszystkie") */
.filter-buttons-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* NOWA GRUPA: dla wyszukiwarki i przełącznika ligi */
.filter-right-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Formularz wyszukiwarki */
.search-form {
    display: flex;
    height: 38px; /* Ta sama wysokość co filtry */
}

/* Pole do wpisywania */
.map-search-input {
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-dark);
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-primary);
    height: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}
.map-search-input::placeholder {
    color: var(--text-secondary);
}

/* Przycisk "Szukaj" (lupka) */
.search-submit-btn {
    height: 100%;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-dark);
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 12px;
    transition: all 0.2s ease-in-out;
}
.search-submit-btn:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Kontener na paginację */
/* ZASTĄP STARY BLOK .pagination-container TYM: */
.pagination-container {
    display: grid;
    /* Dzieli paginację na 3 kolumny: lewa strzałka, numery, prawa strzałka */
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    gap: 10px; /* Odstęp między strzałkami a numerami */
    margin-top: 25px;
    padding: 10px;
}
.pagination-container > .pagination-arrow:first-child {
    justify-self: end;
}

/* DODAJ TEN BLOK: Wyrównuje strzałkę "Następna" do lewej */
.pagination-container > .pagination-arrow:last-child {
    justify-self: start;
}
/* ZASTĄP STARY BLOK .pagination-numbers TYM: */
.pagination-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px; /* <-- TO JEST KLUCZ do rozklejenia numerków */
}
/* Linki paginacji (numery, strzałki) */
.pagination-link {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    color: var(--text-secondary);
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 0 5px;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}
.pagination-link:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Aktywna strona */
.pagination-link.active {
    background-color: var(--accent-gold-bg-light);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    font-weight: 700;
}

/* Nieaktywne strzałki */
.pagination-link.disabled {
    color: #434e68;
    background-color: transparent;
    border-color: transparent;
    pointer-events: none;
}

/* Kropki "..." */
.pagination-link.pagination-dots {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    min-width: 20px;
}

/* Box dla braku wyników */
.no-results-box {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: var(--text-secondary);
    border: 1px dashed var(--border-dark);
    border-radius: 4px;
    margin-top: 20px;
}

/* Poprawka dla przełącznika ligi (teraz ma krótszy tekst) */
.toggle-label {
    white-space: nowrap;
}


/* 1. Stan HOVER (najechanie na DOWOLNĄ część formularza) */
.search-form:hover .map-search-input,
.search-form:hover .search-submit-btn {
    border-color: var(--accent-gold);
    color: var(--accent-gold); /* Lupka też staje się złota */
}

/* 2. Stan FOCUS (po kliknięciu w pole) */
.map-search-input:focus {
    /* Ten styl jest unikalny dla focusa - tło */
    background-color: rgba(0,0,0,0.4); 
    /* Te style są odziedziczone z :hover, ale dla pewności je powtarzamy */
    border-color: var(--accent-gold);
    outline: none;
}

/* 3. Przycisk, gdy input jest w FOCUS */
/* (To zapewnia, że ramka zostaje podświetlona nawet jak odjedziesz myszką) */
.map-search-input:focus + .search-submit-btn {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
/*
=============================================
NOWE STYLE DLA MENU (Nawigacja Lewo/Prawo)
=============================================
*/

.main-nav {
    justify-content: space-between; /* Rozsuwa lewą i prawą grupę */
    padding: 0 40px; /* Dodaje odstęp od krawędzi ekranu */
}

.nav-group-left,
.nav-group-right {
    display: flex;
    align-items: center;
    height: 100%;
}

/*
=============================================
NOWE STYLE DLA PRZYCISKÓW LOGOWANIA (Czysty podział)
=============================================
*/

/* --- STYL 1: ZŁOTY PRZYCISK (dla "Zaloguj się") --- */
.nav-button-gold {
    background-color: transparent;
    border: none;
    color: var(--accent-gold); /* Bazowy szaro-niebieski */
    padding: 0 20px;
    margin: 0 5px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400; /* Normalna grubość */
    letter-spacing: 0.5px;
    border-radius: 0;
    
    /* Zostawiamy Twoją dolną kreskę jako bazę */
    border-bottom: 3px solid transparent; 
    
    /* PŁYNNE PRZEJŚCIE DLA NOWYCH EFEKTÓW */
    transition: color 0.2s var(--pro-curve), 
                text-shadow 0.2s var(--pro-curve), 
                border-bottom-color 0.2s var(--pro-curve),
                transform 0.2s var(--pro-curve),
                background-color 0.2s var(--pro-curve);
}

.nav-button-gold:hover {
    background-color: var(--accent-gold-bg-hover);
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(224, 185, 67, 0.6);
    border-color: var(--accent-gold); 
}

/* --- STYL 2: CIEMNY PRZYCISK (dla "Zarejestruj") --- */
.nav-button-dark {
    background-color: transparent;
    border: none;
    color: var(--text-secondary); /* Bazowy szaro-niebieski */
    padding: 0 20px;
    margin: 0 5px;
    height: 100%;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400; /* Normalna grubość */
    letter-spacing: 0.5px;
    border-radius: 0;
    
    /* Zostawiamy Twoją dolną kreskę jako bazę */
    border-bottom: 3px solid transparent; 
    
    /* PŁYNNE PRZEJŚCIE DLA NOWYCH EFEKTÓW */
    transition: color 0.2s var(--pro-curve), 
                text-shadow 0.2s var(--pro-curve), 
                border-bottom-color 0.2s var(--pro-curve),
                transform 0.2s var(--pro-curve),
                background-color 0.2s var(--pro-curve);
}

/* 2. Style dla Popupu */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.popup-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--bg-main); /* Używamy tła strony */
    border: 1px solid var(--border-dark);
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2001;
    width: 90%;
    max-width: 400px;
    padding: 25px 30px;

    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.popup-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.popup-content {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    text-align: center;
}

.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease-in-out;
}
.popup-close-btn:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}
/* League XP Styles */
.xp-default .number-container {
    color: #E1D9D1;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-0.png');
}

.xp-10000 .number-container { color: #FBD701; background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-10000.png'); }
.xp-8000 .number-container { color: #E94A46; background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-8000.png'); }
.xp-6000 .number-container { color: #E315F1; background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-6000.png'); }
.xp-4000 .number-container { color: #BD6DFA; background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-4000.png'); }
.xp-2000 .number-container { color: #6A80E4; background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-2000.png'); }
.xp-1000 .number-container { color: #8BBCE6; background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-1000.png'); }

.number-container:hover { color: white; }

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #4CAF50;
    border-radius: 4px;
}

/* === CLAN TAG - DELIKATNY ALE WIDOCZNY === */

/*.clan-tag {
    display: inline-block;
    background-color: rgba(224, 185, 67, 0.1);
    border: 1px solid rgba(224, 185, 67, 0.25);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(224, 185, 67, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}*/
.clan-tag {
    display: none !important;
}
/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border: 2px solid #d3b35a;
    border-radius: 5px;
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(211, 179, 90, 0.2);
    border: 1px solid #d3b35a;
    color: #d3b35a;
    font-size: 28px;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.video-modal-close:hover {
    background: rgba(211, 179, 90, 0.4);
}

.video-modal video {
    width: 100%;
    height: auto;
    display: block;
}

/* Q&A Section */
.qa-section {
    background-color: rgba(211, 179, 90, 0.1);
    border: 1px solid rgba(211, 179, 90, 0.3);
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.qa-header {
    background-color: rgba(211, 179, 90, 0.2);
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s;
}

.qa-header:hover {
    background-color: rgba(211, 179, 90, 0.3);
}

.qa-question {
    color: #d3b35a;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

.qa-toggle {
    color: #d3b35a;
    font-size: 18px;
    transition: transform 0.3s;
}

.qa-toggle.active {
    transform: rotate(180deg);
}

.qa-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.qa-content.active {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.qa-answer {
    padding: 15px;
    color: #bbbbbb;
    line-height: 1.6;
}

.qa-answer strong {
    color: #d3b35a;
}

.qa-video {
    width: 100%;
    max-width: 640px;
    margin: 15px 0;
    border-radius: 5px;
    border: 1px solid rgba(211, 179, 90, 0.3);
}

/* Responsive */
@media screen and (max-width: 1200px) {
    table th:nth-child(1), table td:nth-child(1),
    table th:nth-child(4), table td:nth-child(4),
    table th:nth-child(5), table td:nth-child(5),
    table th:nth-child(6), table td:nth-child(6) {
        display: none;
    }
    
    table td, table th {
        padding: 8px 15px;
    }

    table td:nth-child(2), table th:nth-child(2) {
        padding-left: 25px;
    }
    
    .topa {
        overflow-x: auto;
    }
    
    table {
        min-width: 100%;
        border-collapse: separate;
        border-spacing: 0 0;
    }

    .qa-video {
        max-width: 100%;
    }

    .video-modal-content {
        width: 95%;
    }
}

/* === PUNKTY LIGOWE - PRZYWRÓCENIE GRAFIK === */
/* === PUNKTY LIGOWE - WYRÓWNANIE DYNAMICZNE === */

.number-container {
    width: 80px;
    height: 30px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;  /* ← ZOSTAJE flex dla center vertical */
    align-items: center;
    justify-content: center;  /* ← POWRÓT NA CENTER */
    margin: 0;
    padding: 0;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    text-indent: 6px;  /* ← NOWE: przesunięcie tekstu w prawo */
}

.xp-default .number-container {
    color: #E1D9D1;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-0.png');
}

.xp-1000 .number-container {
    color: #8BBCE6;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-1000.png');
}

.xp-2000 .number-container {
    color: #6A80E4;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-2000.png');
}

.xp-4000 .number-container {
    color: #BD6DFA;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-4000.png');
}

.xp-6000 .number-container {
    color: #E315F1;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-6000.png');
}

.xp-8000 .number-container {
    color: #E94A46;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-8000.png');
}

.xp-10000 .number-container {
    color: #FBD701;
    background-image: url('https://dobrewafle.pl/images/topka-grafiki/league-10000.png');
}

.number-container:hover {
    color: white;
}

.topa table td:last-child {
    text-align: center;
}

/* Wyrównanie wrappera punktów */
.xp-default, .xp-1000, .xp-2000, .xp-4000, .xp-6000, .xp-8000, .xp-10000 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === VIDEO MODAL - LEPSZY LAYOUT === */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 2px solid var(--accent-gold);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(224, 185, 67, 0.3);
}

.video-modal-content video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(224, 185, 67, 0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 28px;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
    line-height: 1;
}

.video-modal-close:hover {
    background: rgba(224, 185, 67, 0.4);
    box-shadow: 0 0 15px rgba(224, 185, 67, 0.4);
}

/* === OBRAZEK MAPY - WIĘKSZY === */
.map-image-container {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--border-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile responsywność */
@media (max-width: 768px) {
    .video-modal-content {
        max-width: 95vw;
        aspect-ratio: auto;
        height: auto;
        max-height: 70vh;
    }
}
        /* BREADCRUMB - CRITICAL */
        .breadcrumb-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-size:13px;
        }
        .breadcrumb-link:hover {
            color: var(--accent-gold);
            font-size:13px;
        }
        .breadcrumb-separator {
            margin: 0 5px;
            color: var(--text-secondary);
            font-size:13px;
        }
        .breadcrumb-current {
            color: var(--accent-gold) !important;
            font-size:13px;
        }