* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0d0e12;
    color: #e1e3e8;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.card {
    background: #14161d;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #1f232d;
    margin-bottom: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.section-title span.subtitle {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
    text-transform: none;
}

/* Serverlar ro'yxati va bir tekis tekislash */
.server-item {
    display: flex;
    align-items: center;
    background: #1a1d26;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid #252a37;
}

.server-map-img {
    width: 60px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.server-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.server-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    min-height: 22px;
}

.server-name {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.server-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
}

.server-details {
    font-size: 12px;
    color: #8b949e;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.server-players {
    text-align: right;
    margin-right: 20px;
    min-width: 80px;
    flex-shrink: 0;
}

.players-count {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #2a2f3d;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ff4724;
}

.btn-connect {
    background: linear-gradient(135deg, #ff5722, #ff3d00);
    color: #fff;
    padding: 8px 22px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: 0.2s;
    display: inline-block;
    flex-shrink: 0;
}

.btn-connect:hover {
    opacity: 0.9;
}

/* IP ni nusxalash tugmasi dizayni */
.server-ip-copy {
    color: #ff9800;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    background: rgba(255, 152, 0, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px dashed rgba(255, 152, 0, 0.3);
    display: inline-block;
}

.server-ip-copy:hover {
    background: rgba(255, 152, 0, 0.2);
    color: #ffa726;
}

.server-ip-copy.copied {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-color: #4caf50;
}

/* Banlar va Adminlar jadvali */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    color: #6c757d;
    padding-bottom: 10px;
    font-weight: 600;
    border-bottom: 1px solid #1f232d;
}

.data-table td {
    padding: 10px 0;
    border-bottom: 1px solid #191c25;
    color: #c9d1d9;
}

.data-table tr:last-child td {
    border-bottom: none;
}
    /* Telegram guruh vidjeti uslubi */
    .btn-telegram-join {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #229ed9;
        color: #fff;
        padding: 10px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        transition: background 0.2s ease-in-out;
        width: 100%;
        box-sizing: border-box;
    }
    .btn-telegram-join:hover {
        background: #1b8ac4;
    }

/* Kreativ Top O'yinchilar Dizayni */
#top-players-container {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 540px;
    overflow-y: auto;
    padding-right: 4px;
}

#top-players-container::-webkit-scrollbar {
    width: 4px;
}
#top-players-container::-webkit-scrollbar-thumb {
    background: #ff9800;
    border-radius: 4px;
}

/* Har bir o'yinchi qatori uchun zamonaviy ko'rinish */
.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 152, 0, 0.08);
    border-color: rgba(255, 152, 0, 0.3);
    transform: translateX(3px);
}

/* O'rinlar uchun maxsus badge (nishon) dizayni */
.rank-badge {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    border-radius: 6px;
    background: #1a1f2c;
    color: #8b949e;
}

/* Top 1, 2, 3 uchun maxsus ranglar */
.rank-1 { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000 !important; box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.rank-2 { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); color: #000 !important; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8d5524); color: #fff !important; }

.player-score {
    font-weight: 700;
    color: #ff9800;
    font-size: 13px;
    background: rgba(255, 152, 0, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-steam {
    display: block;""
    width: 100%;
    background: #1b2838;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    border: 1px solid #2a475e;
    transition: 0.2s;
}

.btn-steam:hover {
    background: #2a475e;
}

/* Serverlar ro'yxatini yig'ish va ochish effekti */
.server-item.hidden-server {
    display: none !important;
}

#servers-container.expanded .server-item.hidden-server {
    display: flex !important;
    animation: fadeInSlide 0.4s ease forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-toggle-servers {
    display: block;
    width: 100%;
    background: #1a1d26;
    border: 1px dashed #2a2f3d;
    color: #ff9800;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.btn-toggle-servers:hover {
    background: #222633;
    border-color: #ff9800;
}

 @keyframes blinkEffect {
            0% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
            50% { opacity: 0.3; text-shadow: none; }
            100% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
        }
        .blink-nik {
            animation: blinkEffect 1.5s infinite ease-in-out;
        }
        /* Port tugmalari dizayni */
        .ban-server-buttons {
            display: flex;
            gap: 6px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }
        .btn-ban-serv {
            background: #1a1d26;
            color: #8b949e;
            border: 1px solid #252a37;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            cursor: pointer;
            text-decoration: none;
            transition: 0.2s;
        }
        .btn-ban-serv:hover, .btn-ban-serv.active {
            background: #ff9800;
            color: #000;
            border-color: #ff9800;
        }
        /* Разбанен bo'lgan qatorlar uchun ochiq yashil fon */
        .data-table tr.success td {
            background-color: rgba(76, 175, 80, 0.08) !important;
            color: #2ea043 !important;
        }
        .data-table tr.success td b {
            color: #2ea043;
        }

/* Banlar jadvali almashganda silliq paydo bo'lish animatsiyasi */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#banlist-table-body {
    transition: opacity 0.3s ease-in-out;
}

.fade-row {
    animation: fadeIn 0.4s ease-in-out forwards;
}

/* Port tugmalari uchun ham silliq o'tish effekti */
.btn-ban-serv {
    transition: all 0.25s ease-in-out;
}

      html { scroll-behavior: smooth; }
        @keyframes blinkEffect {
            0% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
            50% { opacity: 0.3; text-shadow: none; }
            100% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
        }
        .blink-nik { animation: blinkEffect 1.5s infinite ease-in-out; }
        
        /* Tepa menyu dizayni */
        .top-nav-bar {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            background: #161b22;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #30363d;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
        }
        .top-nav-logo {
            font-weight: 800;
            color: #ff9800;
            font-size: 16px;
            text-decoration: none;
            letter-spacing: 0.5px;
        }
        .top-nav-buttons {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .btn-nav {
            background: #21262d;
            color: #c9d1d9;
            border: 1px solid #30363d;
            padding: 7px 14px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            text-decoration: none;
            transition: 0.2s;
        }
        .btn-nav:hover {
            background: #ff9800;
            color: #000;
            border-color: #ff9800;
        }

        .ban-server-buttons { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
        .btn-ban-serv {
            background: #1a1d26; color: #8b949e; border: 1px solid #252a37;
            padding: 5px 10px; border-radius: 4px; font-size: 11px; font-weight: 700;
            cursor: pointer; text-decoration: none; transition: 0.2s;
        }
        .btn-ban-serv:hover, .btn-ban-serv.active { background: #ff9800; color: #000; border-color: #ff9800; }
        .data-table tr.success td { background-color: rgba(76, 175, 80, 0.08) !important; color: #2ea043 !important; }
        .data-table tr.success td b { color: #2ea043; }
        #banlist-table-body { min-height: 380px; display: table-row-group; transition: opacity 0.2s ease-in-out; }
        
        .ban-pagination {
            display: flex;
            justify-content: center;
            gap: 5px;
            margin-top: 15px;
            flex-wrap: wrap;
        }
        .btn-page {
            background: #1a1d26; color: #8b949e; border: 1px solid #252a37;
            padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: 600;
            cursor: pointer; transition: 0.2s;
        }
        .btn-page:hover, .btn-page.active { background: #ff9800; color: #000; border-color: #ff9800; }
        .btn-telegram-join {
            display: flex;
            align-items: center;
            justify-content: center;
            background: #229ed9;
            color: #fff;
            padding: 10px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            text-decoration: none;
            transition: background 0.2s;
            width: 100%;
        }
        .btn-telegram-join:hover { background: #1b8ac4; }
/* =========================
   MOBIL VERSIYA (RESPONSIVE)
========================= */

@media screen and (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    body {
        padding: 10px;
    }
}

@media screen and (max-width: 600px) {
    /* Serverlar ro'yxatini 2x2 kvadrat grid shakliga keltiramiz */
    #servers-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .server-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        background: #1a1d26;
        border-radius: 8px;
        padding: 8px;
        margin-bottom: 0 !important;
        border: 1px solid #252a37;
        position: relative;
    }

    .server-map-img {
        width: 100%;
        height: 60px;
        border-radius: 4px;
        object-fit: cover;
        margin-right: 0;
        margin-bottom: 6px;
    }

    .server-info {
        width: 100%;
        margin-bottom: 6px;
    }

    .server-title-row {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        min-height: auto;
    }

    .server-name {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .server-badge {
        font-size: 8px;
        padding: 1px 4px;
    }

    .server-details {
        font-size: 9px;
        color: #8b949e;
        justify-content: center;
        margin-top: 2px;
    }

    .server-ip-copy {
        font-size: 9px;
        padding: 1px 4px;
        margin-top: 2px;
    }

    .server-players {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 6px;
    }

    .players-count {
        font-size: 11px;
    }

    .progress-bar {
        height: 3px;
        margin-top: 2px;
    }

    .btn-connect {
        width: 100%;
        padding: 5px;
        font-size: 10px;
        text-align: center;
        border-radius: 4px;
    }

    #toggleServersBtn {
        grid-column: span 2;
        margin-top: 12px;
    }

    #servers-container.expanded {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* MOBIL UCHUN TOP O'YINCHILAR DIZAYNI */
    .leaderboard-item {
        padding: 8px 10px;
        margin-bottom: 5px;
    }

    .rank-badge {
        width: 22px;
        height: 22px;
        font-size: 11px;
        border-radius: 4px;
    }

    .player-nick {
        font-size: 12px;
        max-width: 110px !important;
    }

    .player-score {
        font-size: 11px;
        padding: 2px 6px;
    }

    #top-players-container {
        max-height: 400px;
    }

    .data-table th, .data-table td {
        font-size: 11px;
        padding: 8px 4px;
    }

    .card {
        padding: 12px;
    }

    .section-title {
        font-size: 14px;
    }
}


/* 1-o'rindagi o'yinchi niki uchun miltillash (morgat qilish) effekti */
@keyframes blinkEffect {
    0% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
    50% { opacity: 0.3; text-shadow: none; }
    100% { opacity: 1; text-shadow: 0 0 8px rgba(255, 215, 0, 0.8); }
}

.blink-nik {
    animation: blinkEffect 1.5s infinite ease-in-out;
}