@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

/* Performance optimizations */
* {
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* Willchange hints for animated elements */
.kit-player,
.nav-btn,
.kit-badge,
.player-card {
    will-change: transform;
}

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === INDIVIDUÁLNÍ KIT TABULKY === */
.kit-columns {
    display: flex !important;
    flex-direction: row !important;
    gap: 32px;
    justify-content: flex-start; /* Změněno z center na flex-start pro lepší scroll */
    margin-bottom: 40px;
    background: #18191f;
    padding: 32px 16px;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    overflow-x: auto; /* Horizontální scrollování */
    overflow-y: hidden; /* Skryje vertikální scroll */
    scroll-behavior: smooth;
    position: relative;
    /* Webkit scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #eecd14 #23242a;
}

.kit-columns::-webkit-scrollbar {
    height: 8px;
}

.kit-columns::-webkit-scrollbar-track {
    background: #23242a;
    border-radius: 4px;
}

.kit-columns::-webkit-scrollbar-thumb {
    background: #eecd14;
    border-radius: 4px;
}

.kit-columns::-webkit-scrollbar-thumb:hover {
    background: #ffe066;
}

/* Podpora pro touch scrolling na mobilech */
.kit-columns {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.kit-tier-col {
    scroll-snap-align: start;
}

.kit-tier-col {
    background: linear-gradient(135deg, #2a2b32 0%, #23242a 100%);
    border-radius: 20px;
    padding: 20px 18px 20px 8px;
    min-width: 200px;
    max-width: 200px;
    width: 200px;
    flex-shrink: 0;
    box-shadow: 0 6px 30px rgba(0,0,0,0.4),
                0 0 0 1px rgba(238, 205, 20, 0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border: 2px solid rgba(238, 205, 20, 0.08);
    margin-left: 12px;
    transition: all 0.3s ease;
}

.kit-tier-col:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(238, 205, 20, 0.15),
                0 0 0 2px rgba(238, 205, 20, 0.2);
    border-color: rgba(238, 205, 20, 0.2);
}

.kit-tier-header {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1.3px;
    border-radius: 14px;
    padding: 14px 0;
    background: linear-gradient(135deg, #45464d 0%, #35363b 100%);
    border: 1px solid rgba(238, 205, 20, 0.15);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2),
                inset 0 1px 0 rgba(255,255,255,0.1);
}

.kit-tier-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.kit-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 6px;
    background: linear-gradient(135deg, #3d3e45 0%, #35363b 100%);
    border-radius: 16px;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-left: 3px solid transparent;
    position: relative;
    letter-spacing: 0.3px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    border: 1px solid rgba(238, 205, 20, 0.05);
}

.kit-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, transparent, #eecd14, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.kit-player:hover::before {
    opacity: 1;
}

.kit-player:hover {
    background: linear-gradient(135deg, #ffe066 0%, #eecd14 100%);
    color: #1a1a1f;
    transform: translateX(6px) scale(1.02);
    border-left-color: #d4b810;
    box-shadow: 0 6px 25px rgba(238, 205, 20, 0.5),
                inset 0 1px 0 rgba(255,255,255,0.3);
    border-color: rgba(212, 184, 16, 0.3);
}

.kit-player img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #23242a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3),
                0 0 0 2px rgba(238, 205, 20, 0.1);
    margin: 0;
    transition: all 0.3s ease;
    margin-left: 2px;
    border: 2px solid rgba(238, 205, 20, 0.15);
}

.kit-player:hover img {
    transform: scale(1.15) rotate(3deg);
    box-shadow: 0 4px 12px rgba(238, 205, 20, 0.4),
                0 0 0 3px rgba(26, 26, 31, 0.3);
    border-color: rgba(26, 26, 31, 0.3);
}

.kit-player span {
    display: inline-block;
    max-width: 20ch;
    font-size: clamp(0.45em, calc(8em / var(--nick-length, 6)), 0.8em);
    text-align: left;
    font-weight: 600; /* Silnější pro lepší čitelnost */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: font-size 0.2s;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4); /* Výraznější stín pro lepší kontrast */
    letter-spacing: 0.3px; /* Větší rozestupy mezi písmeny */
    color: rgba(255,255,255,0.95); /* Mírně tlumenější bílá pro lepší čitelnost */
}

/* Menší písmo pro dlouhé nicky - postupné zmenšování */
.kit-player span[title] {
    font-size: clamp(0.5em, calc(11em / var(--nick-length, 11)), 0.75em);
    max-width: 30ch;
}


/* Sjednocené styly pro badge řadu v individuálních tabulkách (stejné jako overall) */
.kit-badge-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    align-items: center;
}
.kit-player-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    background: #23242a;
    border-radius: 18px;
    box-shadow: 0 2px 12px #0005;
    padding: 22px 40px 18px 40px;
    color: #fff;
    max-width: 1100px;
    width: 100%;
}
.kit-player-row span {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    margin-right: 18px;
}
.kit-player-row .kit-badges {
    display: flex;
    gap: 0px;
    align-items: flex-end;
    margin-left: 0;
    background: #18191f;
    border-radius: 16px;
    padding: 8px 0;
}
.kit-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 38px;
}
.kit-badge img {
    width: 24px;
    height: 24px;
    background: none;
    border-radius: 6px;
    margin-right: 0px;
    margin-bottom: 1px;
}
.kit-badge .kit-tier {
    font-weight: bold;
    font-size: 0.95em;
    padding: 2px 18px;
    border-radius: 8px;
    text-align: center;
    min-width: 38px;
    margin-top: 1px;
    margin-bottom: 1px;
    box-shadow: 0 1px 4px #0003;
}
.kit-icon-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    margin-top: 2px;
    margin-bottom: 0;
    margin-left: -2px;
    box-sizing: border-box;
    background: none !important;
    border: none !important;
}

/* Zvýraznění aktivní tabulky v navigaci (overall) */
.nav-btn.active {
    background: linear-gradient(135deg, #ffe066 0%, #eecd14 50%, #d4b810 100%);
    color: #1a1a1f !important;
    border-radius: 28px;
    font-weight: 800;
    box-shadow: 0 6px 24px rgba(238, 205, 20, 0.6), 
                0 0 0 2px rgba(238, 205, 20, 0.4),
                inset 0 2px 0 rgba(255,255,255,0.4),
                inset 0 -2px 4px rgba(0,0,0,0.1);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.05);
    border: 2px solid rgba(255, 224, 102, 0.6);
    animation: pulse-active 2s ease-in-out infinite;
}

@keyframes pulse-active {
    0%, 100% {
        box-shadow: 0 6px 24px rgba(238, 205, 20, 0.6), 
                    0 0 0 2px rgba(238, 205, 20, 0.4),
                    inset 0 2px 0 rgba(255,255,255,0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(238, 205, 20, 0.8), 
                    0 0 0 3px rgba(238, 205, 20, 0.6),
                    inset 0 2px 0 rgba(255,255,255,0.4);
    }
}

.nav-btn.active img {
    filter: brightness(0.2) drop-shadow(0 0 4px rgba(26, 26, 31, 0.8)) saturate(1.2);
    transform: scale(1.1);
}
/* --- HEADER FLEX LAYOUT --- */
.main-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 28px 12px 28px;
    background: linear-gradient(135deg, #2a2b32 0%, #23242a 50%, #1f2026 100%);
    width: 100%;
    box-sizing: border-box;
    border-radius: 20px;
    margin-bottom: 36px;
    min-height: 68px;
    position: relative;
    gap: 0;
    box-shadow: 0 6px 30px rgba(0,0,0,0.4), 
                0 0 0 1px rgba(238, 205, 20, 0.1),
                inset 0 1px 0 rgba(255,255,255,0.05);
    border: 1px solid rgba(238, 205, 20, 0.08);
}

.main-title {
    grid-column: 2 / 3;
    justify-self: center;
    margin: 0;
    font-size: 2.2em;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1.5px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 2px 8px rgba(238, 205, 20, 0.3),
                 0 0 20px rgba(238, 205, 20, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #eecd14 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    grid-column: 1 / 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    width: 100%;
}

.discord-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #7289da;
    font-weight: 600;
    font-size: 1.1em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}

.discord-link {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #7289da;
    font-weight: 600;
    font-size: 1.1em;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
}
.discord-btn:hover {
    background: #232b4d;
    color: #5865f2;
}
.discord-icon {
    width: 24px;
    height: 24px;
    display: block;
}


.main-title {
    justify-self: center;
    margin: 0;
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}
.search-box {
    justify-self: end;
    margin-left: 40px;
    margin-right: 150px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border-radius: 20px;
    padding: 0 12px;
    height: 38px;
    min-width: 200px;
    max-width: 260px;
    font-size: 0.95em;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25), 
                inset 0 1px 0 rgba(255,255,255,0.8);
    gap: 6px;
    border: 2px solid rgba(238, 205, 20, 0.15);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: rgba(238, 205, 20, 0.5);
    box-shadow: 0 4px 20px rgba(238, 205, 20, 0.3), 
                inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateY(-1px);
}
.discord-link {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #7289da;
    font-weight: 700;
    font-size: 1.15em;
    transition: all 0.3s ease;
    min-width: 0;
    margin-left: 130px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(114, 137, 218, 0.1);
    border: 2px solid rgba(114, 137, 218, 0.2);
}
.discord-link:hover {
    color: #5865f2;
    background: rgba(88, 101, 242, 0.15);
    border-color: rgba(88, 101, 242, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(114, 137, 218, 0.3);
}
.discord-icon {
    width: 40px;
    height: 28px;
    display: block;
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #23242a;
    font-size: 16px !important;
    flex: 1 1 auto;
    padding: 0 2px;
    min-width: 0;
    height: 24px;
    text-align: center;
    margin-top: 8px;
}

#search-input::placeholder {
    color: #23242a;
    opacity: 0.7;
    font-size: 16px !important;
    text-align: center;
}

.search-shortcut {
    color: #23242a;
    font-size: 14px;
    opacity: 0.5;
    padding-left: 2px;
    padding-right: 0;
    user-select: none;
}

/* Zabrání horizontálnímu scrollu */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #272727;
    margin: 10px;
    color: #333;
}

/* Header */
header {
    background: #23242a;
    padding: 18px 30px;
    margin-bottom: 36px;
    border-radius: 18px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 2px 12px #0007;
    font-size: 2em;
    letter-spacing: 1px;
}

h1 {
    display: inline;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #23242a;
    border-radius: 18px;
    margin-bottom: 36px;
    box-shadow: 0 2px 12px #0007;
    min-height: 70px;
    padding: 0 24px;
}
.header-title {
    flex: 1 1 auto;
    text-align: center;
    font-size: 2em;
    color: #fff;
    margin: 0;
}
.header-title a {
    color: inherit;
    text-decoration: none;
}
.search-box {
    display: flex;
    align-items: center;
    background: #fff;           /* bílý ovál */
    border-radius: 18px;
    padding: 0 10px;
    height: 34px;
    min-width: 180px;
    max-width: 240px;
    font-size: 0.95em;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    gap: 4px;
    margin-left: 0;
    position: relative;
    z-index: 10001;
}

/* Autocomplete suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2a2b32 0%, #1e1f25 100%);
    border: 2px solid rgba(238, 205, 20, 0.3);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(238, 205, 20, 0.1);
}

.search-suggestions.active {
    display: block;
}

.search-suggestion-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: hidden;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: linear-gradient(90deg, rgba(238, 205, 20, 0.15) 0%, rgba(238, 205, 20, 0.05) 100%);
}

.search-suggestion-item:hover::-webkit-scrollbar-thumb:hover,
.search-suggestion-item.selected::-webkit-scrollbar-thumb:hover {
    background: rgba(238, 205, 20, 0.6);
}

.search-suggestion-item .player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(238, 205, 20, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(238, 205, 20, 0.1);
    image-rendering: pixelated;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.search-suggestion-item:hover .player-avatar {
    transform: scale(1.05);
    border-color: rgba(238, 205, 20, 0.6);
    box-shadow: 0 4px 12px rgba(238, 205, 20, 0.2),
                0 0 0 2px rgba(238, 205, 20, 0.2);
}

.search-suggestion-item .player-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.search-suggestion-item .player-details .name {
    font-weight: 600;
    color: #fff;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: visible;
}

.search-suggestion-item .player-details .score {
    font-size: 0.75em;
    color: #8c8ca3;
    white-space: nowrap;
    overflow: visible;
}

.search-suggestions-empty {
    padding: 16px;
    text-align: center;
    color: #8c8ca3;
    font-size: 0.85em;
}

/* Custom scrollbar pro suggestions */
.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 12px 12px 0;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: rgba(238, 205, 20, 0.3);
    border-radius: 4px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: rgba(238, 205, 20, 0.5);
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    color: #23242a;             /* tmavý text */
    font-size: 16px !important;
    flex: 1 1 auto;
    padding: 0 2px;
    min-width: 0;
    height: 24px;
    text-align: center;
    margin-top: 8px;              /* zarovnej s ikonou */
}

#search-input::placeholder {
    color: #23242a;             /* tmavý placeholder */
    opacity: 0.7;
    font-size: 16px !important;
    text-align: center;
}

.search-shortcut {
    color: #23242a;
    font-size: 14px;
    opacity: 0.5;
    padding-left: 2px;
    padding-right: 0;
    user-select: none;
}

/* Menu */
nav ul {
    list-style: none;
    padding: 0;
    font-size: 1.2em;
    background: linear-gradient(135deg, #23242a 0%, #18191f 100%);
    text-align: center;
    border-radius: 16px;
    padding: 14px 8px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 1px rgba(238, 205, 20, 0.1);
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

nav ul li {
    display: inline-block;
    margin: 0;
}

nav ul li a {
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    background: linear-gradient(135deg, #45464d 0%, #35363b 100%);
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05em;
    box-shadow: 0 3px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 205, 20, 0.2), transparent);
    transition: left 0.5s;
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    background: linear-gradient(135deg, #ffe066 0%, #eecd14 100%);
    color: #1a1a1f;
    box-shadow: 0 6px 24px rgba(238, 205, 20, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(238, 205, 20, 0.3);
}

nav ul li a img {
    max-width: 26px;
    filter: brightness(1.1) drop-shadow(0 0 3px rgba(238, 205, 20, 0.4));
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

nav ul li a:hover img {
    transform: scale(1.2) rotate(5deg);
    filter: brightness(0.2) drop-shadow(0 0 8px rgba(26, 26, 31, 0.6));
}

section {
    padding: 2rem;
    text-align: center;
}

#kit {
    max-width: 25px;
}

#konec {
    color: white;
}

#mctiers {
    text-align: center;
    color: lightblue;
}

/* Responzivní header pro střední obrazovky */
@media (max-width: 1200px) {
    .main-header {
        padding: 18px 20px 12px 20px;
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 1.8em;
        grid-column: 1;
        text-align: center;
        margin-bottom: 12px;
    }
    
    .header-actions {
        grid-column: 1;
        justify-content: center;
        margin-top: 0;
        gap: 12px;
    }
    
    .discord-link {
        margin-left: 0;
        padding: 8px 14px;
        font-size: 0.95em;
    }
    
    .search-box {
        margin: 0;
        min-width: 180px;
        max-width: 220px;
    }
}

@media (max-width: 1000px) {
    .main-header {
        padding: 16px;
    }
    
    .main-title {
        font-size: 1.6em;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .discord-link,
    .search-box {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .main-header {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 0;
    }
    
    .main-title {
        grid-column: 1;
        font-size: 1.5em;
        margin-bottom: 10px;
    }
    
    .header-actions {
        grid-column: 1;
        flex-direction: column;
        gap: 8px;
    }
    
    .discord-link {
        font-size: 0.95em;
        padding: 6px 10px;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        max-width: 280px;
        justify-self: center;
        height: 36px;
        padding: 0 10px;
    }
}

.table-container {
    overflow-x: visible !important;
    width: 95%;
    margin: 20px auto;
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
}

.tabulka {
    width: 100%;
    border-collapse: collapse;
    display: none;
    margin: 20px auto;
    border-radius: 30px;
    overflow: hidden;
    width: 75%;
    overflow: visible !important;
}


.tabulka th {
    background-color: #f2f2f2;
}

.tabulka.active {
    display: table;
}

.tabulka th, .tabulka td {
    border: 1px solid #ddd;
    text-align: center;
}
.tabulka th,
.tabulka td {
    border: none;
    font-family: 'Poppins', sans-serif;
    color: white;
}
.tabulka img {
    max-width: 100%;
    height: auto;
    margin-left: 15%;
}

.tabulka td:nth-child(2) {
    width: 80px; /* Pevná šířka */
    height: 80px; /* Pevná výška */
    text-align: center;
}


tbody tr:nth-child(1) td:first-child,
tbody tr:nth-child(1) td:nth-child(2) {
    background-color: #eecd14;
}

tbody tr:nth-child(2) td:first-child,
tbody tr:nth-child(2) td:nth-child(2) {
    background-color: #c0c0c0;
}

tbody tr:nth-child(3) td:first-child,
tbody tr:nth-child(3) td:nth-child(2) {
    background-color: #cd7f32;
}


#overall-tabulka {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #1f2026 0%, #18191f 50%, #141418 100%);
    border-radius: 20px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.5), 
                0 0 0 1px rgba(238, 205, 20, 0.1),
                inset 0 2px 0 rgba(238, 205, 20, 0.05);
    padding: 50px 30px;
    margin: 32px auto 0 auto;
    max-width: 1400px;
    width: 95%;
    border: 1px solid rgba(238, 205, 20, 0.08);
}

#overall-tabulka td:nth-child(4) {
    background-color: #141212;
}

@media (min-width: 769px) {
    .tabulka th, .tabulka td {
        padding: clamp(2px, 1vw, 4px);
        font-size: clamp(2px, 1vw, 32px);
    }
    .tabulka th,
    .tabulka td {
        padding-left: clamp(2px, 1vw, 28px);
        padding-right: clamp(2px, 1vw, 28px);

    }
    .tabulka img {
        width: clamp(1px, 2vw, 120px);
    }
    .tabulka td:nth-child(1) {
        font-size: clamp(1px, 2vw, 120px);
    }
}
/* Postupné zmenšování kit tabulek před mobilem */
@media (max-width: 1200px) {
    .kit-tier-col {
        min-width: 180px;
        max-width: 180px;
        width: 180px;
        padding: 18px 14px;
    }
}

@media (max-width: 1000px) {
    .kit-tier-col {
        min-width: 160px;
        max-width: 160px;
        width: 160px;
        padding: 16px 12px;
    }
    
    .kit-columns {
        gap: 20px;
        padding: 24px 12px;
    }
}

/* Tablet optimalizace */
@media (max-width: 900px) {
    .kit-tier-col {
        min-width: 150px;
        max-width: 150px;
        width: 150px;
    }
    
    .kit-player {
        font-size: 0.9em;
    }
    
    .kit-tier-header {
        font-size: 1.3em;
        padding: 10px 0;
    }
}

@media (max-width: 768px) {
    /* Celkové úpravy pro mobil */
    body {
        margin: 4px;
        font-size: 14px;
    }
    
    /* Optimalizovaný header pro mobil */
    .main-header {
        grid-template-columns: 1fr;
        padding: 12px 12px;
        margin-bottom: 16px;
        gap: 12px;
    }
    
    .main-title {
        grid-column: 1;
        font-size: 1.5em;
        text-align: center;
    }
    
    .header-actions {
        grid-column: 1;
        margin-top: 0;
        flex-direction: column;
        gap: 12px;
    }
    
    .discord-link {
        margin-left: 0;
        justify-self: center;
        font-size: 1em;
    }
    
    .discord-icon {
        width: 32px;
        height: 24px;
    }
    
    .search-box {
        margin: 0;
        width: 100%;
        max-width: 100%;
        justify-self: center;
    }
    
    /* Optimalizovaná navigace pro mobil */
    nav ul {
        width: auto;
        padding: 6px;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li a {
        padding: 10px 14px;
        font-size: 0.85em;
        gap: 6px;
        min-height: 44px; /* Touch-friendly */
        min-width: 44px;
    }
    
    nav ul li a img {
        max-width: 20px;
    }
    
    /* Tabulky na mobilu */
    .tabulka,
    .tabulka.active {
        display: block;
        width: 100%;
        overflow-x: visible;
        background: none;
        border: none;
    }
    
    .tabulka tbody {
        display: block;
        width: 100%;
    }
    
    .tabulka tr {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 16px;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        background: #23242a;
        border-radius: 12px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .tabulka td, .tabulka th {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        font-size: 1em;
        padding: 6px 0;
        border: none;
        background: transparent;
    }
    
    .tabulka td.rank-cell {
        font-size: 1.8em;
        font-weight: bold;
        text-align: center;
        border-radius: 8px;
        padding: 8px;
        margin-bottom: 8px;
        width: auto;
        display: inline-block;
        min-width: 50px;
    }
    
    .tabulka td.player-name {
        font-size: 1.3em;
        font-weight: 700;
        color: #fff;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .tabulka td.score-cell {
        font-size: 1.2em;
        font-weight: 600;
        background: #18191f;
        color: #eecd14;
        border-radius: 8px;
        padding: 8px;
        text-align: center;
        margin-bottom: 12px;
    }
    
    .tabulka td.kits-cell {
        text-align: center;
        padding: 12px 8px;
        min-width: 0;
    }
    
    /* Kit badges na mobilu - více prostoru a lepší vzhled */
    .tabulka td.kits-cell .kits-row {
        display: flex;
        flex-wrap: wrap;
        gap: 24px; /* Velké mezery mezi badges na mobilu */
        justify-content: center;
        align-items: center;
        padding: 20px 16px; /* Velký padding kolem badges */
        background: #18191f;
        border-radius: 12px;
        margin-top: 8px;
    }
    
    .kit-badge {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 48px; /* Větší pro lepší dotyk */
        padding: 8px 6px;
        border-radius: 10px;
        background: rgba(35, 36, 42, 0.8);
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        transition: transform 0.2s, box-shadow 0.2s;
        cursor: pointer;
    }
    
    .kit-badge:active {
        transform: scale(0.95);
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }
    
    .kit-icon-circle,
    .kit-icon-missing {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #23242a;
        margin-bottom: 4px;
        border: 3px solid;
    }
    
    .kit-icon,
    .kit-icon-missing svg {
        width: 22px !important;
        height: 22px !important;
        display: block;
    }
    
    .kit-tier-text,
    .kit-tier-missing {
        min-width: 38px !important;
        max-width: 38px !important;
        font-size: 0.85em !important;
        padding: 3px 1px !important;
        border-radius: 8px !important;
        font-weight: bold !important;
        text-align: center !important;
        line-height: 1.1 !important;
    }
    
    /* Optimalizace kit columns pro mobil */
    .kit-columns {
        padding: 16px 8px;
        gap: 12px;
        scroll-padding: 8px;
    }
    
    .kit-tier-col {
        min-width: 140px;
        max-width: 140px;
        width: 140px;
        padding: 12px 8px;
    }
    
    .kit-player img {
        width: 28px;
        height: 28px;
    }
    
    /* Overall tabulka na mobilu */
    #overall-tabulka {
        padding: 20px 8px;
        margin: 16px auto 0 auto;
    }
    
    .table-container {
        width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }
}

.kits-row {
    display: flex;
    gap: 6px; /* Ještě větší mezery mezi badges na desktopu */
    align-items: flex-end;
    margin-left: 0;
    background: #18191f;
    border-radius: 14px;
    padding: 10px 12px; /* Ještě větší padding */
}

.kit-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: bold;
    font-size: 0.95em;
    background: none;
    box-shadow: none;
    padding: 4px; /* Ještě větší padding */
    border: none;
    cursor: pointer;
    position: relative;
    min-width: 48px; /* Ještě větší minimum */
    transition: transform 0.2s;
}

/* Extra small mobile devices (< 480px) */
@media (max-width: 480px) {
    body {
        margin: 2px;
        font-size: 13px;
    }
    
    .main-title {
        font-size: 1.3em;
    }
    
    nav ul li a {
        padding: 8px 10px;
        font-size: 0.8em;
        gap: 4px;
    }
    
    .kit-tier-col {
        min-width: 130px;
        max-width: 130px;
        width: 130px;
        padding: 10px 6px;
    }
    
    .kit-tier-header {
        font-size: 1.1em;
        padding: 8px 0;
    }
    
    .kit-player {
        padding: 6px 10px 6px 0;
        font-size: 0.85em;
    }
    
    .kit-player img {
        width: 26px;
        height: 26px;
    }
    
    .player-card {
        padding: 10px;
    }
    
    .kit-badge {
        min-width: 40px;
    }
    
    .kit-icon-circle,
    .kit-icon-missing {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }
    
    .kit-icon,
    .kit-icon-missing svg {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Performance: Use transform instead of position for animations */
@media (prefers-reduced-motion: no-preference) {
    .kit-player {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
}

.kit-badge:hover {
    transform: scale(1.1); /* Ještě větší hover efekt */
}

.kit-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; /* Ještě větší kruh */
    height: 36px;
    border-radius: 50%;
    border: 3px solid #eecd14; /* Silnější border */
    background: #23242a;
    margin-bottom: 4px; /* Ještě větší mezera */
    margin-top: 1px;
    transition: border-color 0.2s, transform 0.2s;
}

.kit-icon-circle:hover {
    transform: scale(1.15); /* Ještě větší hover efekt */
}

.kit-icon {
    width: 26px; /* Ještě větší ikona */
    height: 26px;
    background: none;
    border-radius: 50%;
    display: block;
}

.kit-tier-text {
    display: block;
    min-width: 38px; /* Ještě větší text area */
    padding: 4px 6px; /* Ještě větší padding */
    border-radius: 10px; /* Ještě větší zaoblení */
    box-shadow: 0 2px 6px #0004; /* Ještě silnější stín */
    line-height: 1.1;
    font-size: 0.95em; /* Ještě větší text */
    text-align: center;
    font-weight: bold;
}

/* Tooltip */
.tooltip .tooltiptext {
    visibility: hidden;
    width: 90px;
    background-color: #23242a;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 0;
    position: absolute;
    z-index: 10;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.18s;
    font-size: 1em;
    box-shadow: 0 2px 8px #0007;
    pointer-events: none;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Ohraničení a zaoblení pro každý řádek jako kartu */
.tabulka tbody tr {
    background: #23242a;
    border-radius: 18px;
    box-shadow: 0 2px 8px #0003;
    border: 2px solid #35363b;
    margin-bottom: 18px;
    transition: 
        box-shadow 0.2s, 
        border-color 0.2s, 
        background 0.2s,
        transform 0.18s cubic-bezier(.4,2,.6,1);
    display: block;
    position: relative;
}
.tabulka tbody tr:hover {
    box-shadow: 0 6px 24px #0007;
    border-color: #474747;
    background: #35363b;
    transform: translateX(-12px);
}
.tabulka tbody tr td {
    background: transparent;
}
.tabulka tbody tr td:first-child {
    border-radius: 16px 0 0 16px;
}
.tabulka tbody tr td:last-child {
    border-radius: 0 16px 16px 0;
}

/* Jednotné styly pro všechny kit badges */
.kit-badge,
.kit-badge-missing {
    min-width: 48px !important; /* Ještě větší pro lepší viditelnost */
    max-width: 48px !important;
    width: 48px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 4px; /* Ještě větší padding */
    box-sizing: border-box;
}

/* Jednotné styly pro ikony */
.kit-icon-circle,
.kit-icon-missing {
    width: 36px; /* Ještě větší kruhy */
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    margin-bottom: 4px; /* Ještě větší mezera */
    box-sizing: border-box;
    background: #23242a;
    border-radius: 50%;
    border: 3px solid; /* Silnější border */
    transition: transform 0.2s, border-color 0.2s;
}

.kit-icon-circle:hover,
.kit-icon-missing:hover {
    transform: scale(1.1); /* Ještě větší hover efekt */
}

/* Jednotné styly pro ikony samotné */
.kit-icon,
.kit-icon-missing svg {
    width: 26px !important; /* Ještě větší ikony */
    height: 26px !important;
    display: block;
}

.kit-icon-missing svg {
    margin: 0;
    padding: 0;
}

.kit-icon-missing svg circle {
    stroke: #666;
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 5; /* Ještě větší čárky */
    cx: 13;
    cy: 13;
    r: 10; /* Ještě větší poloměr */
}

/* Jednotné styly pro tier text */
.kit-tier-text,
.kit-tier-missing {
    display: block;
    min-width: 40px !important; /* Ještě větší text area */
    max-width: 40px !important;
    width: 40px !important;
    padding: 5px 2px !important; /* Ještě větší padding */
    font-size: 0.95em !important; /* Ještě větší text */
    border-radius: 10px !important; /* Ještě větší zaoblení */
    margin-top: 4px !important; /* Ještě větší mezera */
    text-align: center;
    font-weight: bold;
    line-height: 1.1;
    box-sizing: border-box;
    box-shadow: 0 2px 6px #0004; /* Ještě silnější stín */
}

/* Moderní vzhled řádků */
.tabulka tr {
    background: #23242a;
    border-bottom: 2px solid #18191f;
}
.tabulka tr:nth-child(1) td.rank-cell {
    background: #eecd14 !important;
    color: #23242a !important;
}
.tabulka tr:nth-child(2) td.rank-cell {
    background: #c0c0c0 !important;
    color: #23242a !important;
}
.tabulka tr:nth-child(3) td.rank-cell {
    background: #cd7f32 !important;
    color: #23242a !important;
}

.tabulka td.rank-cell {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    width: 60px;
    border-radius: 12px 0 0 12px;
    background: #18191f;
    color: #fff;
    border-right: 4px solid #23242a;
}


.tabulka td.player-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.1em;
    text-align: left;
    padding-left: 18px;
}

.tabulka td.score-cell {
    background: #18191f;
    color: #fff;
    font-size: 1.2em;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    border-radius: 0 12px 12px 0;
}

.tabulka td.kits-cell {
    text-align: right;
    white-space: nowrap;
    padding-right: 12px;
    min-width: 220px;
}

.kit-badge {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 1em;
    margin-left: 4px; /* Ještě větší mezera */
    margin-bottom: 2px;
    padding: 4px; /* Ještě větší padding */
    min-width: 48px; /* Ještě větší minimum */
}
@media (max-width: 900px) {
    .tabulka td.kits-cell {
        min-width: 0;
        font-size: 0.9em;
        padding-right: 2px;
    }
    .kit-badge {
        font-size: 0.85em;
        padding: 2px 6px 2px 2px;
    }
    .tabulka td.skin-cell img {
        width: 36px;
        height: 36px;
    }
}

.player-card {
    background: linear-gradient(135deg, #2a2b32 0%, #23242a 100%);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 
                0 0 0 1px rgba(238, 205, 20, 0.1);
    padding: 24px 44px 20px 44px;
    color: #fff;
    max-width: 1100px;
    width: 100%;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(238, 205, 20, 0.08);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 205, 20, 0.1), transparent);
    transition: left 0.6s;
}

.player-card:hover::before {
    left: 100%;
}

.player-card:hover {
    box-shadow: 0 8px 40px rgba(238, 205, 20, 0.2), 
                0 0 0 2px rgba(238, 205, 20, 0.3);
    transform: translateY(-4px) scale(1.01);
    background: linear-gradient(135deg, #35363d 0%, #2a2b32 100%);
    border-color: rgba(238, 205, 20, 0.3);
}
.card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 10px;
}
.rank-badge {
    color: #fff !important; /* bílé číslo */
    font-weight: bold;
    font-size: 2.1em;
    border-radius: 10px 0 0 10px;
    padding: 8px 18px;
    min-width: 54px;
    text-align: center;
}

.player-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.player-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.score {
    font-size: 1.1em;
    color: #eecd14;
    font-weight: 600;
}
.tiers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1px; /* Velmi malé mezery na desktopu */
    justify-content: center;
    margin-top: 10px;
}

.kit-badge img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: none; /* ŽÁDNÉ POZADÍ! */
    box-shadow: none;
    margin: 0;
    padding: 0;
}
.kit-badge.lt {
    background: #b87333;
    color: #fff;
}
.kit-badge.ht {
    background: #eecd14;
    color: #23242a;
}
.kit-badge.default {
    background: #a0a0a0;
    color: #23242a;
}
@media (max-width: 1100px) {
    #overall-tabulka {
        max-width: 98vw;
        padding: 0 2vw;
    }
    .player-card {
        max-width: 98vw;
        padding: 12px 6vw 12px 6vw;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .rank-badge {
        font-size: 1.5em;
        padding: 6px 14px;
        min-width: 38px;
        margin-bottom: 4px;
    }
    .skin {
        width: 44px;
        height: 44px;
    }
    .player-name {
        font-size: 1.1em;
    }
    .tiers-list {
        gap: 16px; /* Větší mezery mezi kit badges na mobilu */
        margin-top: 10px;
        justify-content: center;
        flex-wrap: wrap;
        padding: 16px 12px; /* Velký padding kolem celé oblasti */
        background: #18191f;
        border-radius: 10px;
    }
    .kit-badge {
        font-size: 0.95em;
        padding: 6px 4px; /* Velký padding pro lepší dotyk */
        min-width: 42px; /* Větší minimum pro lepší klikání */
        border-radius: 8px;
        background: rgba(35, 36, 42, 0.6);
        box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .kit-badge:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    }
}
.skin {
    width: 120px;
    height: 120px;
    object-fit: contain;
    image-rendering: pixelated;
}
.card {
    display: flex;
    align-items: center;
    justify-content: space-between; /* rozloží obsah na obě strany */
    padding: 10px;
    background-color: #222;
    border-radius: 8px;
    color: #fff;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.skin {
    width: 90px;
    height: 90px;
    image-rendering: pixelated;
}

.tiers {
    display: flex;
    gap: 5px; /* mezery mezi ikonami tiér */
}

#overall-tabulka .player-card {
    background: #23242a;
    border-radius: 18px;
    box-shadow: 0 2px 12px #0005;
    padding: 22px 40px 18px 40px;
    color: #fff;
    max-width: 1100px;
    width: 100%;
    margin-bottom: 8px;
}

#overall-tabulka .compact-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

#overall-tabulka .rank-badge {
    color: #fff;
    font-weight: bold;
    font-size: 2.2em;
    border-radius: 12px;
    padding: 20px 16px;
    min-width: 60px;
    text-align: center;
    background: #eecd14;
    box-shadow: 0 4px 16px rgba(238, 205, 20, 0.4);
    flex-shrink: 0;
}

#overall-tabulka .skin {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    margin-right: 0;
    margin-left: 0;
    box-shadow: 0 4px 16px rgba(238, 205, 20, 0.3),
                0 0 0 3px rgba(238, 205, 20, 0.2);
    border: 2px solid rgba(238, 205, 20, 0.4);
    transition: all 0.3s ease;
    image-rendering: pixelated;
}

#overall-tabulka .player-card:hover .skin {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 6px 24px rgba(238, 205, 20, 0.5),
                0 0 0 4px rgba(238, 205, 20, 0.3);
}

#overall-tabulka .player-info {
    min-width: 140px;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}
#overall-tabulka .player-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
#overall-tabulka .score {
    font-size: 1.05em;
    color: #eecd14;
    font-weight: 600;
}

#overall-tabulka .kits-row {
    display: flex;
    gap: 6px; /* Ještě větší mezery mezi badges na desktopu */
    align-items: flex-end;
    margin-left: 0;
    background: #18191f;
    border-radius: 14px;
    padding: 10px 12px; /* Ještě větší padding */
}

#overall-tabulka .kit-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px; /* Ještě větší minimum */
}

#overall-tabulka .kit-icon-circle {
    width: 32px; /* Ještě větší kruhy */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #23242a;
    border-radius: 50%;
    border: 3px solid; /* Silnější border */
    margin-bottom: 4px; /* Ještě větší mezera */
    transition: transform 0.2s;
}

#overall-tabulka .kit-icon-circle:hover {
    transform: scale(1.1); /* Ještě větší hover efekt */
}

#overall-tabulka .kit-icon {
    width: 22px; /* Ještě větší ikony */
    height: 22px;
    background: none;
    border-radius: 50%;
    display: block;
}

#overall-tabulka .kit-tier {
    font-weight: bold;
    font-size: 0.9em; /* Ještě větší text */
    padding: 4px 6px; /* Ještě větší padding */
    border-radius: 10px; /* Ještě větší zaoblení */
    text-align: center;
    min-width: 36px; /* Ještě větší minimum */
    margin-top: 4px; /* Ještě větší mezera */
    margin-bottom: 1px;
    box-shadow: 0 2px 6px #0004; /* Ještě silnější stín */
    line-height: 1.1;
}
@media (max-width: 1000px) {
    /* Header pro střední obrazovky */
    .main-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        min-height: 48px;
        gap: 12px;
    }
    
    .main-title {
        order: 1;
        font-size: 1.5em;
        margin: 0;
        text-align: center;
        width: 100%;
    }
    
    .header-actions {
        order: 2;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        width: 100%;
        margin-top: 0;
    }
    
    .discord-link {
        margin: 0;
        flex-shrink: 0;
    }
    
    .search-box {
        margin: 0;
        min-width: 140px;
        max-width: 180px;
        font-size: 0.95em;
        padding: 0 8px;
        height: 32px;
    }
    
    /* Overall tabulka pro střední obrazovky */
    #overall-tabulka {
        max-width: 95vw;
        padding: 16px 8px;
        margin: 16px auto;
    }
    
    .player-card {
        max-width: 100%;
        padding: 16px 20px;
        margin-bottom: 12px;
    }
    
    .compact-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .rank-badge {
        font-size: 1.4em;
        padding: 8px 12px;
        min-width: 40px;
    }
    
    .skin {
        width: 60px;
        height: 60px;
    }
    
    .player-name {
        font-size: 1.1em;
    }
    
    .kits-row {
        padding: 6px 8px;
        gap: 4px; /* Větší mezera na středních obrazovkách */
        background: #18191f;
        border-radius: 8px;
    }
    
    .kit-badge {
        min-width: 34px !important;
        max-width: 34px !important;
    }
    
    #overall-tabulka .kit-icon-circle {
        width: 20px;
        height: 20px;
    }
    
    #overall-tabulka .kit-icon {
        width: 14px;
        height: 14px;
    }
    
    #overall-tabulka .kit-tier {
        font-size: 0.75em;
        padding: 1px 3px;
        min-width: 24px;
    }
}

.tooltip {
    position: relative;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 90px;
    background-color: #23242a;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 0;
    position: absolute;
    z-index: 10;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.18s;
    font-size: 1em;
    box-shadow: 0 2px 8px #0007;
    pointer-events: none;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.kit-icon-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    max-width: 38px;
    max-height: 38px;
    margin-top: 2px;
    margin-bottom: 0;
    margin-left: -2px; /* posune kruh doleva, uprav podle potřeby */
    box-sizing: border-box;
    background: none !important;
    border: none !important;
}

.player-modal {
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
}
.player-modal[style*="display: flex"] {
    display: flex;
}
.player-modal-content {
    background: #23242a;
    border-radius: 18px;
    padding: 40px 48px;
    min-width: 420px;
    max-width: 600px;
    color: #fff;
    position: relative;
    box-shadow: 0 8px 48px #000a;
    text-align: center;
}
.player-modal-close {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2em;
    cursor: pointer;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.player-modal-close:hover {
    opacity: 1;
}
.player-modal-name {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 12px;
}
.player-modal-position {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
}
.player-modal-rank {
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    border-radius: 8px;
    padding: 6px 18px;
    min-width: 54px;
    text-align: center;
    background: #555555ff; /* default */
}
.player-modal-rank.rank-1 { background: #eecd14; color: #fff; }
.player-modal-rank.rank-2 { background: #c0c0c0; color: #fff; }
.player-modal-rank.rank-3 { background: #cd7f32; color: #fff; }
.player-modal-rank.rank-other { background: #555555ff; color: #fff; }
.player-modal-skin {
    width: 100px !important;
    height: 100px !important;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 3px solid rgba(238, 205, 20, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    image-rendering: pixelated;
}

.player-modal-score {
    font-size: 1.1em;
    color: #fff;
}

.player-modal-tiers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal pro hledání */
.search-modal {
    position: fixed;
    z-index: 1100;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-modal-content {
    background: #23242a;
    border-radius: 14px;
    padding: 28px 32px 22px 32px;
    min-width: 320px;
    color: #fff;
    position: relative;
    box-shadow: 0 8px 48px #000a;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#search-input {
    font-size: 1.1em;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    outline: none;
    width: 100%;
    margin-bottom: 8px;
}
#search-confirm {
    font-size: 1em;
    padding: 7px 18px;
    border-radius: 8px;
    border: none;
    background: #eecd14;
    color: #23242a;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 8px;
    transition: background 0.18s;
}
#search-confirm:hover {
    background: #ffe96a;
}
.search-modal-close {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2em;
    cursor: pointer;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.search-modal-close:hover {
    opacity: 1;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.search-btn {
    background: #23242a;
    border: none;
    border-radius: 50%;
    padding: 8px;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-btn:hover {
    background: #35363b;
    box-shadow: 0 2px 12px #eecd1477;
}
.search-btn svg {
    display: block;
}

@media (max-width: 700px) {
    /* Malé mobily */
    body {
        margin: 4px;
    }
    
    .main-header {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .main-title {
        font-size: 1.2em;
        margin-bottom: 8px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .discord-link {
        font-size: 0.9em;
        margin-left: 8px;
    }
    
    .discord-icon {
        width: 20px;
        height: 20px;
    }
    
    .search-box {
        max-width: 120px;
        height: 28px;
        padding: 0 6px;
    }
    
    #search-input {
        font-size: 0.9em !important;
    }
    
    /* Navigace pro malé mobily */
    nav ul {
        padding: 6px;
        gap: 6px;
        margin-bottom: 16px;
    }
    
    nav ul li a {
        padding: 6px 10px;
        font-size: 0.8em;
        gap: 4px;
    }
    
    nav ul li a img {
        max-width: 18px;
    }
    
    /* Overall tabulka pro malé mobily */
    #overall-tabulka {
        padding: 12px 4px;
        margin: 12px auto;
    }
    
    .player-card {
        padding: 12px 16px;
        margin-bottom: 8px;
        border-radius: 12px;
    }
    
    .compact-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }
    
    .rank-badge {
        font-size: 1.2em;
        padding: 6px 10px;
        margin-bottom: 8px;
    }
    
    .skin {
        width: 50px;
        height: 50px;
        margin: 0;
    }
    
    .player-info {
        margin: 0;
        align-items: center;
        text-align: center;
    }
    
    .player-name {
        font-size: 1em;
        margin-bottom: 4px;
    }
    
    .score {
        font-size: 0.9em;
    }
    
    .kits-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px; /* Větší mezery na malých mobilech */
        padding: 12px 10px; /* Více paddingu */
        background: #18191f;
        border-radius: 8px;
    }
    
    #overall-tabulka .kit-badge {
        min-width: 32px !important;
        max-width: 32px !important;
    }
    
    #overall-tabulka .kit-icon-circle {
        width: 20px;
        height: 20px;
    }
    
    #overall-tabulka .kit-icon {
        width: 14px;
        height: 14px;
    }
    
    #overall-tabulka .kit-tier {
        font-size: 0.7em;
        padding: 1px 3px;
        min-width: 22px;
    }
}
@media (max-width: 900px) {
    /* Navigace pro tablety a střední mobily */
    nav ul {
        flex-wrap: wrap;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 6px;
        padding: 8px;
    }
    
    nav ul li {
        display: flex;
        flex: 1 1 110px;
        min-width: 110px;
        max-width: 200px;
        margin: 0;
    }
    
    nav ul li a {
        width: 100%;
        justify-content: center;
        font-size: 0.9em;
        padding: 8px 10px;
        box-sizing: border-box;
        gap: 6px;
    }
    
    nav ul li a img {
        max-width: 22px;
    }
    
    /* Tabulky pro střední obrazovky */
    .tabulka td.kits-cell {
        min-width: 0;
        font-size: 0.9em;
        padding-right: 8px;
    }
    
    .kit-badge {
        font-size: 0.85em;
        padding: 2px 4px;
        margin: 1px;
    }
    
    .tabulka td.skin-cell img {
        width: 36px;
        height: 36px;
    }
    
    /* Kit columns - horizontální scroll i na malých obrazovkách */
    .kit-columns {
        flex-direction: row !important; /* Zůstává horizontální i na mobilu */
        gap: 20px;
        padding: 20px 12px;
        background: #18191f;
        border-radius: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
    }
    
    .kit-tier-col {
        min-width: 200px; /* Menší na mobilu, ale stále pevná šířka */
        max-width: 200px;
        width: 200px;
        flex-shrink: 0; /* Důležité pro horizontální scroll */
        margin: 0; /* Zruší auto centrování */
        background: #23242a;
        border: 2px solid #35363b;
        border-radius: 16px;
        padding: 16px 12px; /* Menší padding na mobilu */
        box-shadow: 0 6px 25px rgba(0,0,0,0.5);
    }
    
    .kit-tier-header {
        font-size: 1.3em;
        margin-bottom: 16px;
        padding: 10px 0;
        background: #35363b; /* Jednoduché šedé pozadí */
        border: 1px solid #35363b; /* Šedý border */
        color: #fff; /* Bílý text místo zlatého */
        text-shadow: none; /* Bez glow efektu */
    }
    
    .kit-player {
        padding: 12px 16px; /* Zvětšené mezery pro lepší dotyk */
        font-size: 1em;
        margin-bottom: 12px; /* Větší mezery mezi hráči */
        background: #35363b;
        border-left: 3px solid transparent;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 10px; /* Mezera mezi avatarem a jménem */
    }
    
    .kit-player:hover {
        background: #eecd14;
        color: #23242a;
        border-left-color: #23242a;
        transform: translateX(6px);
    }
    
    .kit-player img {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    
    .kit-player span {
        font-size: clamp(0.5em, calc(10em / var(--nick-length, 10)), 0.9em); /* Postupné zmenšování na mobilu */
        font-weight: 600;
        max-width: 25ch; /* Větší šířka pro dlouhé nicky */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Menší písmo pro dlouhé nicky na mobilu - postupné zmenšování */
    .kit-player span[title] {
        font-size: clamp(0.4em, calc(10em / var(--nick-length, 10)), 0.65em);
        max-width: 30ch;
    }
}

.kit-player-lt {
    background: #23242a !important;
}

.kit-player-lt:hover {
    background: #eecd14 !important;
    color: #23242a !important;
    transform: translateX(8px);
    border-left-color: #23242a;
    box-shadow: 0 6px 25px rgba(238, 205, 20, 0.4);
}

/* Responzivní úpravy pro mobil - Modal, Player Cards, Header */
@media (max-width: 600px) {
    .tabulka {
        width: calc(100% - 16px);
        margin: 20px 8px 20px 8px;
    }
    
    /* Modal */
    .player-modal-content {
        min-width: unset;
        max-width: calc(100vw - 40px);
        width: 90%;
        padding: 24px 20px;
        margin: 20px;
    }
    
    .player-modal-skin {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 12px;
    }
    
    .player-modal-name {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    
    .player-modal-rank {
        font-size: 1.2em;
        padding: 4px 12px;
        min-width: 44px;
    }
    
    .player-modal-score {
        font-size: 0.95em;
    }
    
    .player-modal-tiers {
        gap: 6px;
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .player-modal-close {
        right: 12px;
        top: 8px;
        font-size: 1.5em;
    }
    
    /* Header - Discord a Search */
    .header-actions {
        margin-top: 16px;
        gap: 8px;
        flex-direction: column;
        align-items: center;
    }
    
    .discord-link {
        margin-left: 0;
        font-size: 0.95em !important;
        padding: 6px 12px;
        justify-content: center;
        gap: 12px;
    }
    
    .discord-icon {
        width: 38px !important;
        height: 28px !important;
        flex-shrink: 0;
    }
    
    .search-box {
        margin-left: 0;
        margin-right: 0;
        min-width: 180px;
        max-width: 240px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.9em;
    }
    
    /* Player Cards v Overall - centrování */
    #overall-tabulka {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 8px 0 0;
        width: calc(100% - 8px);
        box-sizing: border-box;
    }
    
    #overall-tabulka .player-card {
        padding: 14px 8px 14px 8px;
        max-width: 100%;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    #overall-tabulka .compact-row {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    #overall-tabulka .kits-row {
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px 6px;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    #overall-tabulka .kit-badge {
        min-width: 40px;
    }
    
    #overall-tabulka .kit-icon-circle {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }
    
    #overall-tabulka .kit-icon {
        width: 18px;
        height: 18px;
    }
    
    #overall-tabulka .kit-tier {
        font-size: 0.8em;
        padding: 3px 5px;
        min-width: 32px;
    }
    
    #overall-tabulka .rank-badge {
        font-size: 1.8em;
        padding: 12px 10px;
        min-width: 50px;
    }
    
    #overall-tabulka .skin {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto;
    }
    
    #overall-tabulka .player-info {
        align-items: center;
        text-align: center;
        min-width: unset;
        margin-right: 0;
        width: 100%;
    }
    
    #overall-tabulka .player-name {
        font-size: 1.2em;
    }
    
    #overall-tabulka .player-score {
        font-size: 0.9em;
    }
    
    #overall-tabulka .kits-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        margin-top: 8px;
    }
    
    /* Kit badges */
    .kit-badge {
        min-width: 36px;
    }
    
    .kit-icon-circle,
    .kit-icon-missing {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        min-height: 26px !important;
    }
    
    .kit-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .kit-tier-text {
        font-size: 0.7em;
        padding: 3px 6px;
    }
}

@media (max-width: 400px) {
    /* Ještě menší zařízení */
    .player-modal-content {
        width: 95%;
        padding: 20px 16px;
    }
    
    .player-modal-skin {
        width: 70px !important;
        height: 70px !important;
    }
    
    .player-modal-name {
        font-size: 1.3em;
    }
    
    .player-modal-rank {
        font-size: 1.1em;
        padding: 3px 10px;
    }
    
    #overall-tabulka .player-card {
        padding: 12px 10px;
    }
    
    #overall-tabulka .rank-badge {
        font-size: 1.5em;
        padding: 10px 8px;
        min-width: 45px;
    }
    
    #overall-tabulka .skin {
        width: 70px !important;
        height: 70px !important;
    }
    
    .search-box {
        min-width: 140px;
        max-width: 180px;
        font-size: 0.9em;
    }
    
    .discord-link {
        font-size: 0.95em;
        gap: 6px;
    }
    
    .discord-icon {
        width: 20px;
        height: 20px;
    }
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #fff;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(238, 205, 20, 0.2);
    border-top-color: #eecd14;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-indicator p {
    margin-top: 16px;
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.8);
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #2a2b32 0%, #1e1f25 100%);
    border: 2px solid rgba(255, 82, 82, 0.3);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    color: #fff;
    max-width: 500px;
    margin: 40px auto;
}

.error-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

.error-message h3 {
    font-size: 1.5em;
    margin-bottom: 12px;
    color: #ff5252;
}

.error-message p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    line-height: 1.6;
}

.retry-btn {
    background: #eecd14;
    color: #23242a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: #f5d941;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 205, 20, 0.4);
}
