/**
 * SERVERS LIST IN HEADER STYLES - WERSJA RESPONSYWNA
 * Lista serwerów z zachowaniem oryginalnego układu na mobile
 * Poprawiona szerokość i pozycjonowanie dla wszystkich urządzeń
 */

/* Kontener dla listy serwerów - wersja desktopowa */
header .servers-list-container {
    position: absolute;
    left: 50%;
    margin-left: -100px; /* Zaktualizowana wartość */
    top: 150px;
    width: 850px;
    max-width: 850px;
    padding: 20px 30px;
    box-sizing: border-box;
    z-index: 50;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 143, 255, 0.4);
}

header {
    position: relative !important;
}

/* Nagłówek listy serwerów */
header .servers-list-container .servers-header {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-bottom: 2px solid #008fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

header .servers-list-container .servers-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    text-align: left;
}

/* Lista serwerów */
header .servers-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

/* Pojedynczy serwer */
header .servers-list .server-item {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    border-left: 3px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header .servers-list .server-item:hover {
    background: rgba(0, 0, 0, 0.85);
    border-left-color: #008fff;
    box-shadow: 0 3px 8px rgba(0, 143, 255, 0.4);
}

/* Status serwera */
header .servers-list .server-item .server-status {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
    padding-right: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

header .servers-list .server-item .server-status-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    min-width: 32px;
    height: 100%;
}

header .servers-list .server-item .server-status-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

header .servers-list .server-item .server-status-icon.online {
    background: #499107;
    box-shadow: 0 0 5px rgba(73, 145, 7, 0.6);
}

header .servers-list .server-item .server-status-icon.offline {
    background: #cc0000;
    box-shadow: 0 0 5px rgba(204, 0, 0, 0.6);
}

/* IP serwera */
header .servers-list .server-item .server-ip {
    color: #008fff;
    font-size: 12px;
    font-weight: normal;
    margin: 0;
    padding: 0 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    height: 100%;
    text-align: center;
}

/* Ikona typu serwera */
header .servers-list .server-item .server-type-icon {
    margin: 0;
    padding: 0 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 100%;
}

header .servers-list .server-item .server-type-icon img {
    width: 20px;
    height: 20px;
    display: block;
}

/* Nazwa serwera */
header .servers-list .server-item .server-name {
    color: #fff;
    font-size: 13px;
    font-weight: normal;
    margin: 0;
    padding: 0 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

/* Style dla opcji "New" */
header .servers-list .server-item .server-name .server {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.2;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 40px;
    box-sizing: border-box;
    animation: fadeInOut 3s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Gracze/Sloty */
header .servers-list .server-item .server-players {
    color: #fff;
    font-size: 12px;
    margin: 0;
    padding: 0 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 100%;
    text-align: center;
}

/* Ikony dodatkowe */
header .servers-list .server-item .server-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    padding-left: 10px;
}

header .servers-list .server-item .server-icons img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

header .servers-list .server-item .server-icons img:hover {
    opacity: 1;
}

/* Tekst po prawej */
header .servers-list .server-item .server-right-text {
    color: #999;
    font-size: 11px;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Scrollbar */
header .servers-list::-webkit-scrollbar {
    width: 6px;
}

header .servers-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

header .servers-list::-webkit-scrollbar-thumb {
    background: #00b7ff;
    border-radius: 3px;
}

header .servers-list::-webkit-scrollbar-thumb:hover {
    background: #00a8ff;
}

/* ==========================================
   RESPONSIVE STYLES - URZĄDZENIA MOBILNE
   Zachowanie oryginalnego układu poziomego
   Jednolite pozycjonowanie dla wszystkich urządzeń
   ========================================== */

/* Tablety w orientacji poziomej */
@media screen and (max-width: 1200px) {
    header .servers-list-container {
        left: 50%;
        margin-left: -100px;
        transform: translateX(-50%);
        width: 95%;
        max-width: 700px;
        padding: 15px 20px;
    }
    
    header .servers-list .server-item .server-ip {
        min-width: 100px;
        font-size: 11px;
        padding: 0 8px;
    }
    
    header .servers-list .server-item .server-name {
        font-size: 12px;
        padding: 0 8px;
    }
    
    header .servers-list .server-item .server-type-icon {
        min-width: 40px;
        padding: 0 8px;
    }
}

/* Tablety w orientacji pionowej */
@media screen and (max-width: 992px) {
    header .servers-list-container {
        position: relative;
        left: 0;
        right: 0;
        top: 20px;
        margin: 20px auto 0 auto;
        transform: none;
        width: 98%;
        max-width: 100%;
        padding: 10px 15px;
        overflow-x: auto;
    }
    
    /* Zmniejszone elementy, ale zachowany układ */
    header .servers-list {
        min-width: 0; /* Usuwamy min-width */
    }
    
    header .servers-list .server-item {
        padding: 8px 10px;
    }
    
    header .servers-list .server-item .server-status-icon-wrapper {
        min-width: 24px;
        padding: 0 6px;
    }
    
    header .servers-list .server-item .server-status-icon {
        width: 10px;
        height: 10px;
    }
    
    header .servers-list .server-item .server-ip {
        min-width: 85px;
        font-size: 10px;
        padding: 0 6px;
    }
    
    header .servers-list .server-item .server-type-icon {
        min-width: 32px;
        padding: 0 6px;
    }
    
    header .servers-list .server-item .server-type-icon img {
        width: 18px;
        height: 18px;
    }
    
    header .servers-list .server-item .server-name {
        font-size: 11px;
        padding: 0 6px;
        min-width: 100px;
    }
    
    header .servers-list .server-item .server-players {
        min-width: 50px;
        font-size: 11px;
        padding: 0 6px;
    }
    
    /* Ukryj ikony gametracker, steam itp. */
    header .servers-list .server-item .server-icons {
        display: none;
    }
    
    header .servers-list .server-item .server-right-text {
        display: none;
    }
}

/* Smartfony w orientacji poziomej i pionowej - JEDNOLITE POZYCJONOWANIE */
@media screen and (max-width: 768px) {
    header .servers-list-container {
        position: relative;
        left: 0;
        right: 0;
        top: 20px;
        margin: 20px auto 0 auto;
        transform: none;
        width: 98%;
        padding: 8px 10px;
        overflow-x: visible; /* Brak scrollowania */
    }
    
    header .servers-list {
        overflow-x: visible;
    }
    
    header .servers-list .server-item {
        padding: 6px 8px;
        margin-bottom: 6px;
    }
    
    header .servers-list .server-item .server-status-icon-wrapper {
        min-width: 20px;
        padding: 0 4px;
    }
    
    header .servers-list .server-item .server-status-icon {
        width: 8px;
        height: 8px;
    }
    
    header .servers-list .server-item .server-ip {
        min-width: 70px;
        font-size: 9px;
        padding: 0 4px;
    }
    
    header .servers-list .server-item .server-type-icon {
        min-width: 28px;
        padding: 0 4px;
    }
    
    header .servers-list .server-item .server-type-icon img {
        width: 14px;
        height: 14px;
    }
    
    header .servers-list .server-item .server-name {
        font-size: 9px;
        padding: 0 4px;
        min-width: 80px;
        flex: 1;
    }
    
    header .servers-list .server-item .server-name .server {
        font-size: 7px;
        padding: 1px 4px;
        min-width: 25px;
        margin-left: 2px;
    }
    
    header .servers-list .server-item .server-players {
        min-width: 40px;
        font-size: 9px;
        padding: 0 4px;
    }
    
    header .servers-list-container .servers-header h3 {
        font-size: 13px;
    }
}

/* Smartfony w orientacji pionowej - dodatkowe zmniejszenie */
@media screen and (max-width: 576px) {
    header .servers-list-container {
        width: 100%;
        padding: 6px 8px;
        margin: 15px auto 0 auto;
        top: 15px;
        border-radius: 6px;
    }
    
    header .servers-list-container .servers-header {
        padding: 6px 10px;
        margin-bottom: 6px;
    }
    
    header .servers-list-container .servers-header h3 {
        font-size: 12px;
    }
    
    header .servers-list {
        max-height: 300px;
    }
    
    header .servers-list .server-item {
        padding: 5px 6px;
        margin-bottom: 5px;
    }
    
    header .servers-list .server-item .server-status-icon-wrapper {
        min-width: 18px;
        padding: 0 3px;
    }
    
    header .servers-list .server-item .server-status-icon {
        width: 7px;
        height: 7px;
    }
    
    header .servers-list .server-item .server-ip {
        min-width: 60px;
        font-size: 8px;
        padding: 0 3px;
    }
    
    header .servers-list .server-item .server-type-icon {
        min-width: 24px;
        padding: 0 3px;
    }
    
    header .servers-list .server-item .server-type-icon img {
        width: 12px;
        height: 12px;
    }
    
    header .servers-list .server-item .server-name {
        font-size: 8px;
        padding: 0 3px;
        min-width: 70px;
    }
    
    header .servers-list .server-item .server-name .server {
        font-size: 6px;
        padding: 1px 3px;
        min-width: 20px;
        margin-left: 2px;
    }
    
    header .servers-list .server-item .server-players {
        min-width: 35px;
        font-size: 8px;
        padding: 0 3px;
    }
}

/* Bardzo małe smartfony */
@media screen and (max-width: 380px) {
    header .servers-list-container {
        padding: 5px 6px;
    }
    
    header .servers-list-container .servers-header h3 {
        font-size: 11px;
    }
    
    header .servers-list .server-item {
        padding: 4px 5px;
    }
    
    header .servers-list .server-item .server-status-icon-wrapper {
        min-width: 16px;
        padding: 0 2px;
    }
    
    header .servers-list .server-item .server-ip {
        min-width: 55px;
        font-size: 7px;
    }
    
    header .servers-list .server-item .server-type-icon {
        min-width: 20px;
        padding: 0 2px;
    }
    
    header .servers-list .server-item .server-type-icon img {
        width: 10px;
        height: 10px;
    }
    
    header .servers-list .server-item .server-name {
        font-size: 7px;
        min-width: 60px;
        padding: 0 2px;
    }
    
    header .servers-list .server-item .server-players {
        min-width: 30px;
        font-size: 7px;
    }
}