/* ================================================================
   iQ DayZ Leaderboard – assets/leaderboard.css
   Styl sladěn s inQer.eu cyberpunk tématem
   Barvy: --cyan #00f2ff | --bg #050608 | glass rgba(255,255,255,0.03)
   Fonty: 'Open Sans' (tělo), 'Teko' (nadpisy/akcenty)
   ================================================================ */

/* ── Wrapper ── */
.iq-lb-wrapper {
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    color: #e0e0e0;
    width: 100%;
    box-sizing: border-box;
}

/* WP page.php by jinak vypsalo LEADERBOARD dvakrát + datum vytvoření */
.article-wrapper:has(.iq-lb-wrapper) > .article-title,
.article-wrapper:has(.iq-lb-wrapper) > .article-meta {
    display: none;
}

/* ── Nadpis = stejné písmo + spodní cyan čára jako „Naše hodnoty“ ── */
.article-content h2.iq-section-title,
.iq-lb-wrapper h2.iq-section-title,
.iq-lb-wrapper .iq-section-title {
    font-family: 'Teko', sans-serif !important;
    font-size: 3.6rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 0.85 !important;
    text-transform: uppercase !important;
    text-align: left !important;
    color: #fff !important;
    background: none !important;
    -webkit-text-fill-color: unset !important;
    border: 0 !important;
    border-left: none !important;
    padding: 0 !important;
    padding-left: 0 !important;
    margin: 10px 0 40px 0 !important;
    position: relative;
    display: inline-block;
}
.iq-lb-wrapper .title-fill,
.iq-title-fill {
    background: linear-gradient(180deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.iq-lb-wrapper .iq-section-title::after,
.article-content h2.iq-section-title::after {
    content: '' !important;
    position: absolute !important;
    display: block !important;
    bottom: -10px !important;
    left: 0 !important;
    top: auto !important;
    width: 60% !important;
    height: 2px !important;
    background: linear-gradient(90deg, #00f2ff, transparent) !important;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4) !important;
    border: 0 !important;
    animation: none !important;
    clip-path: none !important;
    transform: none !important;
    opacity: 1 !important;
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
}

/* Glitch jen cyan, projede textem */
.iq-section-title.glitch-pass,
.iq-glitch { position: relative; display: inline-block; }
.iq-glitch::before,
.iq-section-title.glitch-pass::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-transform: inherit;
    white-space: pre-line;
    text-shadow: none;
    color: #00f2ff;
    background: none !important;
    -webkit-background-clip: border-box !important;
    background-clip: border-box !important;
    -webkit-text-fill-color: #00f2ff !important;
    pointer-events: none;
    animation: iq-glitch-pass 4s infinite;
}
@keyframes iq-glitch-pass {
    0%, 76%, 100% {
        clip-path: inset(0 0 100% 0);
        opacity: 0;
        transform: translateX(0);
    }
    80% {
        clip-path: inset(0 0 65% 0);
        opacity: 0.95;
        transform: translateX(-0.08em);
    }
    84% {
        clip-path: inset(20% 0 40% 0);
        opacity: 1;
        transform: translateX(0.1em);
    }
    88% {
        clip-path: inset(45% 0 20% 0);
        opacity: 0.95;
        transform: translateX(-0.07em);
    }
    92% {
        clip-path: inset(70% 0 0 0);
        opacity: 0.75;
        transform: translateX(0.05em);
    }
}
@media (prefers-reduced-motion: reduce) {
    .iq-glitch::before,
    .iq-section-title.glitch-pass::before { animation: none; opacity: 0; }
}

/* ── Ovládací panel ── */
.iq-table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 16px;
}

.iq-search-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.iq-search-btn,
.iq-refresh-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8a9199;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Teko', 'Open Sans', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
    clip-path: polygon(6px 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
.iq-search-btn:hover,
.iq-refresh-btn:hover {
    background: rgba(0, 242, 255, 0.08);
    border-color: rgba(0, 242, 255, 0.4);
    color: #00f2ff;
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.2);
}

#iq-searchInput {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width .3s, opacity .3s, border-color .2s;
}
#iq-searchInput.active {
    width: 200px;
    opacity: 1;
}
#iq-searchInput:focus {
    outline: none;
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15);
}

.iq-season-map-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    min-width: 0;
}

.iq-map-name {
    font-family: 'Teko', 'Open Sans', sans-serif;
    font-size: 25px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 1.5px;
    line-height: 1.2;
    text-transform: capitalize;
    background: linear-gradient(180deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.iq-lb-updated {
    font-size: 11px;
    color: rgba(138, 145, 153, 0.75);
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: nowrap;
}

.iq-lb-updated:empty {
    display: none;
}

.iq-actions-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

#iq-seasonSelector {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 1rem;
    font-family: 'Teko', 'Open Sans', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
#iq-seasonSelector:focus {
    outline: none;
    border-color: rgba(0, 242, 255, 0.5);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.15);
}

/* ── Kontejner tabulky – styl glass card z tématu ── */
.iq-leaderboard-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* plynulý swipe-scroll širší tabulky na iOS */
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
    position: relative;
}

/* Cyan linka nahoře – stejná jako u .hero-main::before a .copyright-bar::before */
.iq-leaderboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #00f2ff;
    box-shadow: 0 0 15px #00f2ff;
    opacity: 0.8;
    border-radius: 4px 4px 0 0;
    z-index: 1;
}

/* Trojúhelníkový akcent vlevo nahoře – stejný jako u .article-wrapper::before */
.iq-leaderboard-container::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 30px;
    height: 30px;
    background: #00f2ff;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: 0.7;
    box-shadow: 0 0 15px #00f2ff;
    z-index: 2;
}

.iq-leaderboard-container table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    background: transparent;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
}

/* ── Hlavička tabulky ── */
.iq-leaderboard-container thead tr {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.iq-leaderboard-container th {
    padding: 14px 16px;
    text-align: center;
    color: #8a9199;
    font-family: 'Teko', 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color .2s, text-shadow .2s;
}
.iq-leaderboard-container th:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}
.iq-leaderboard-container th.iq-player { text-align: left; }

/* Indikátor řazení */
.iq-leaderboard-container th.iq-sort-asc::after  { content: ' ↑'; color: #00f2ff; text-shadow: 0 0 8px #00f2ff; }
.iq-leaderboard-container th.iq-sort-desc::after { content: ' ↓'; color: #00f2ff; text-shadow: 0 0 8px #00f2ff; }

/* ── Řádky hráčů ── */
.iq-player-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.iq-player-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.iq-leaderboard-container td {
    padding: 12px 16px;
    text-align: center;
    vertical-align: middle;
    color: #e0e0e0;
}
.iq-leaderboard-container td.iq-player {
    text-align: left;
    font-family: 'Teko', 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}

/* ── Top 3 – zlatá/stříbrná/bronzová ── */
.iq-rank-gold   {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.06), transparent);
    border-left: 2px solid gold !important;
}
.iq-rank-silver {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.05), transparent);
    border-left: 2px solid silver !important;
}
.iq-rank-bronze {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.05), transparent);
    border-left: 2px solid #cd7f32 !important;
}

.iq-trophy-icon { font-size: 11px; margin-right: 4px; opacity: .85; }
.iq-rank-gold   .iq-trophy-icon { color: gold;    text-shadow: 0 0 6px gold; }
.iq-rank-silver .iq-trophy-icon { color: silver;  text-shadow: 0 0 6px silver; }
.iq-rank-bronze .iq-trophy-icon { color: #cd7f32; text-shadow: 0 0 6px #cd7f32; }

/* ── Body – cyan akcent barva tématu ── */
.iq-points {
    color: #00f2ff;
    font-family: 'Teko', 'Open Sans', sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

/* ── Footer tabulky ── */
.iq-leaderboard-container tfoot td {
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 4px 4px;
}

/* ── Detail řádek ── */
/* display:none přesunuto z inline style="display:none;" v PHP (CSP unsafe-inline odstraněno z theme) */
.iq-details-row { display: none; background: rgba(0, 0, 0, 0.3); }

/* Helper třídy nahrazující zbývající inline style="" atributy v shortcode výstupu */
.iq-empty-state  { text-align: center; padding: 20px; }
.iq-kill-arrow   { font-size: .8em; color: #888; }
.iq-details-content {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.iq-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}
.iq-details-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #00f2ff;
    border-radius: 4px;
    padding: 14px;
    transition: background .2s, border-color .2s;
}
.iq-details-section:hover {
    background: rgba(0, 242, 255, 0.04);
    border-color: rgba(0, 242, 255, 0.3);
}
.iq-details-section h4 {
    color: #00f2ff;
    font-family: 'Teko', 'Open Sans', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
    margin: 0 0 10px;
    text-transform: uppercase;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}
.iq-details-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
    font-size: 13px;
}
.iq-details-list li {
    list-style: none !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 8px;
    color: #8a9199;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
}
.iq-details-list li::before,
.iq-details-list li::marker {
    content: none !important;
    display: none !important;
}
.iq-details-list li:last-child {
    border-bottom: none;
}

/* ── Status ikony (Poslední viděn) ── */
.iq-status-green  { color: #00f2ff; text-shadow: 0 0 6px rgba(0, 242, 255, 0.6); }
.iq-status-orange { color: #f39c12; }
.iq-status-red    { color: #e74c3c; }

/* ── Spin animace pro refresh ── */
.fa-spin { animation: iq-fa-spin 1s linear infinite; }
@keyframes iq-fa-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Scrollbar – stejný styl jako v tématu ── */
.iq-leaderboard-container::-webkit-scrollbar { height: 6px; }
.iq-leaderboard-container::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
.iq-leaderboard-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.iq-leaderboard-container::-webkit-scrollbar-thumb:hover { background: rgba(0, 242, 255, 0.4); }

/* ── Responsivita ── */
.iq-lb-footnote {
    margin: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .iq-leaderboard-container {
        border-radius: 4px;
    }
    .iq-lb-wrapper .iq-section-title {
        font-size: 2.5rem;
        letter-spacing: 3px;
    }
    .iq-leaderboard-container th,
    .iq-leaderboard-container td { padding: 9px 8px; font-size: 12px; }

    /* Skryjeme méně důležité sloupce na mobilu */
    .iq-leaderboard-container th:nth-child(7),
    .iq-leaderboard-container td:nth-child(7),
    .iq-leaderboard-container th:nth-child(8),
    .iq-leaderboard-container td:nth-child(8),
    .iq-leaderboard-container th:nth-child(9),
    .iq-leaderboard-container td:nth-child(9) { display: none; }

    /* Základní min-width (900px) počítá se všemi 11 sloupci — tady jsou
       3 skryté, takže tabulce reálně stačí mnohem méně a scroll nemusí
       být zbytečně široký. */
    .iq-leaderboard-container table { min-width: 640px; }

    .iq-details-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .iq-details-grid { grid-template-columns: 1fr; }
    .iq-table-controls { flex-direction: column; align-items: flex-start; }
    .iq-search-btn,
    .iq-refresh-btn,
    #iq-seasonSelector {
        clip-path: none;
    }
}