/* ======= ЛИДЕРЫ СЕРВЕРА ======= */

.leaders-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.leaders-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.leaders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.leader-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.25s;
    border: 1px solid rgba(255,255,255,0.06);
}

/* Общий эффект свечения при наведении */
.leader-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgb(53, 53, 53);
    background: rgba(255, 0, 0, 0.062);
}

.leader-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1b1b1b, #2a2a2a);
    overflow: hidden;
    flex-shrink: 0;
}

.leader-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leader-info {
    display: flex;
    flex-direction: column;
}

.leader-name {
    font-size: 18px;
    font-weight: 700;
}

.leader-desc {
    font-size: 13px;
    opacity: 0.7;
}

.leader-value {
    margin-top: 4px;
    font-weight: 600;
    font-size: 15px;
}

/* ======= ИКОНКИ ЛИДЕРОВ ======= */

.leader-icon {
    width: 26px;
    height: 26px;
    margin: 0 auto;
    margin-top: 18px;
    opacity: 0.85;
}

.leader-icon svg {
    width: 100%;
    height: 100%;
    fill: #ffffff;
    opacity: 0.85;
}

/* ======= АНИМАЦИЯ ПОЯВЛЕНИЯ КАРТОЧЕК ======= */

.leaders-grid {
    opacity: 0;
    transform: translateY(25px);
    animation: leadersFadeIn 0.8s ease forwards;
}

.leader-card {
    opacity: 0;
    transform: translateY(25px);
    animation: leaderCardFade 0.8s ease forwards;
}

.leader-card:nth-child(1) { animation-delay: 0.10s; }
.leader-card:nth-child(2) { animation-delay: 0.18s; }
.leader-card:nth-child(3) { animation-delay: 0.26s; }
.leader-card:nth-child(4) { animation-delay: 0.34s; }
.leader-card:nth-child(5) { animation-delay: 0.42s; }
.leader-card:nth-child(6) { animation-delay: 0.50s; }

@keyframes leaderCardFade {
    0% { opacity: 0; transform: translateY(25px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes leadersFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ----- Цветовые темы  ----- */

/* PvP  */
.leader-card[data-cat="kills"] {
    border-color: rgba(255, 80, 80, 0.7);
    box-shadow: 0 0 19px rgba(255, 80, 80, 0.596);
}
.leader-card[data-cat="kills"]:hover {
    box-shadow: 0 0 19px rgba(255, 80, 80, 0.514);
}

/* Playtime*/
.leader-card[data-cat="playtime"] {
    border-color: rgba(90, 150, 255, 0.7);
    box-shadow: 0 0 19px rgba(90, 150, 255, 596);
}
.leader-card[data-cat="playtime"]:hover {
    box-shadow: 0 0 18px rgba(90, 150, 255, 0.45);
}

/* Raids */
.leader-card[data-cat="raides"] {
    border-color: rgba(255, 140, 0, 0.7);
    box-shadow: 0 0 19px rgba(255, 140, 0, 596);
}
.leader-card[data-cat="raides"]:hover {
    box-shadow: 0 0 18px rgba(255, 140, 0, 0.45);
}

/* Ores*/
.leader-card[data-cat="ores"] {
    border-color: rgba(180, 180, 200, 0.7);
    box-shadow: 0 0 19px rgba(180, 180, 200, 596);
}

/* Hunting*/
.leader-card[data-cat="hunting"] {
    border-color: rgba(120, 220, 120, 0.7);
    box-shadow: 0 0 19px rgba(120, 220, 120, 596);
}

/* XP always */
.leader-card[data-cat="xpalways"] {
    border-color: rgba(190, 140, 255, 0.7);
    box-shadow: 0 0 19px rgba(190, 140, 255, 596);
}
.leader-card[data-cat="xpalways"]:hover {
    box-shadow: 0 0 20px rgba(190, 140, 255, 0.5);
}

/* XP за вайп */
.leader-card[data-cat="xp"] {
    border-color: rgba(255, 192, 203, 0.7);
    box-shadow: 0 0 19px rgb(255, 192, 203);
}
.leader-card[data-cat="xp"]:hover {
    box-shadow: 0 0 20px pink;
}

/* Фермерство */
.leader-card[data-cat="ferm"] {
    border-color: rgba(0, 255, 64, 0.7);
    box-shadow: 0 0 19px rgb(0, 255, 64, 203);
}
.leader-card[data-cat="ferm"]:hover {
    box-shadow: 0 0 20px rgb(0, 255, 64, 203);
}

/* Верты танки */
.leader-card[data-cat="hb"] {
    border-color: rgba(255, 238, 0, 0.7);
    box-shadow: 0 0 19px rgb(255, 238, 0, 203);
}
.leader-card[data-cat="hb"]:hover {
    box-shadow: 0 0 20px rgb(255, 238, 0, 203);
}

/* Стройка */
.leader-card[data-cat="build"] {
    border-color: rgba(195, 0, 255, 0.7);
    box-shadow: 0 0 19px rgb(195, 0, 255, 203);
}
.leader-card[data-cat="build"]:hover {
    box-shadow: 0 0 20px rgb(195, 0, 255, 203);
}

.leader-sparkline {
    width: 100%;
    height: 40px;
    margin-top: 10px;
    opacity: 0.85;
}


/* ============================= */
/*    PROFILE FRAME    */
/* ============================= */

@keyframes profileFadeIn {
    0% {
        opacity: 0;
        transform: translateX(80px) scale(0.96);
        filter: blur(6px);
    }
    70% {
        opacity: 1;
        transform: translateX(0px) scale(1.02);
        filter: blur(1px);
    }
    100% {
        transform: scale(1);
        filter: blur(0);
    }
}



/* === PLAYER PROFILE SECTION === */

#player-profile-section {
    display: none;

}



.profile-open-anim {
    display: none;
    padding: 40px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(10,10,18,0.95), rgba(22,22,32,0.95));
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
    animation: fadeInUp 0.45s ease forwards;

    transform: perspective(900px) rotateY(-18deg) translateX(120px) scale(0.9);
    animation: profile3DSlide 0.9s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes ppOpenAnim {
    0% {
        opacity: 0;
        transform: translateX(60px) scale(0.96);
        filter: blur(6px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}


@keyframes profile3DSlide {
    0% {
        opacity: 0;
        transform: perspective(900px) rotateY(-18deg) translateX(120px) scale(0.9);
        filter: blur(226px);
    }
    40% {
        opacity: 1;
        transform: perspective(900px) rotateY(-8deg) translateX(440px) scale(1.03);
        filter: blur(21px);
    }
    100% {
        opacity: 1;
        transform: perspective(900px) rotateY(0deg) translateX(0) scale(1);
        filter: blur(0);
    }
}

/* Неоновая рамка */
#player-profile-section::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(
        130deg,
        rgba(123, 151, 142, 0.185),
        rgba(10, 73, 100, 0.158),
        rgba(255, 0, 0, 0.123)
    );
    filter: blur(14px);
    z-index: -1;
    animation: neonFlow 2.5s linear infinite;
}

@keyframes neonFlow {
    0% { filter: blur(14px) brightness(0.8); }
    50% { filter: blur(20px) brightness(1.4); }
    100% { filter: blur(14px) brightness(0.8); }
}

#player-profile-section.active {
    display: block;
}

.player-profile-glass {
    max-width: 1400px;
    margin: 0 auto;
    backdrop-filter: blur(15px);
    background: rgba(20, 20, 30, 0.45);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    animation: fadeIn 0.4s ease;
}

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

/* HEADER */
.pp-header {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 35px;
}

/* Аватар игрока */
.pp-avatar {
    width: 290px;
    height: 290px;
    border-radius: 18px;
    border: 2px solid rgba(255, 0, 0, 0.349);
    box-shadow:
        0 0 20px rgba(255, 200, 200, 0.4),
        0 0 35px rgba(255, 195, 195, 0.2);
    transition: 0.3s ease;
    z-index: -99999;
}

.pp-avatar:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 30px rgba(0,255,170,0.55),
        0 0 45px rgba(0,255,170,0.25);
        z-index: 99999;
}

.pp-main h2 {
    font-size: 32px;
    margin: 0 0 10px;
}

.pp-steamid {
    font-size: 16px;
    opacity: 0.7;
}

.pp-steam-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: rgba(255, 1, 1, 0.459);
    border: 1px solid rgba(255, 255, 255, 0.363);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
    color: wheat;
    cursor: grab;
}

.pp-steam-btn:hover {
    background: rgba(72, 255, 0, 0.1);
    box-shadow: 0px 0px 20px rgb(255, 0, 0);
}

.pp-avatar-wrapper {
    position: relative;
    display: inline-block;
    z-index: 9999;
}

.pp-avatar-wrapper::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0,255,170,0.45), transparent 70%);
    animation: pulseAvatar 2.8s infinite ease-in-out;
    z-index: 999;
}

@keyframes pulseAvatar {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.9; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

.pp-badges {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.pp-badge {
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    background: rgba(59, 36, 36, 0.911);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 0 12px rgba(1, 232, 248, 0.836);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
    transform: translateY(10px);
    animation: badgePop 1.45s ease forwards;
}

/* Анимация плавного закрытия профиля */
.pp-close-anim {
    
    animation: ppCloseAnim 0.9s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes ppCloseAnim {
    100% {
        opacity: 0;
        transform: perspective(900px) rotateY(-18deg) translateX(120px) scale(0.9);
        filter: blur(226px);
    }
    40% {
        opacity: 1;
        transform: perspective(900px) rotateY(-8deg) translateX(440px) scale(1.03);
        filter: blur(21px);
    }
    0% {
        opacity: 1;
        transform: perspective(900px) rotateY(0deg) translateX(0) scale(1);
        filter: blur(0);
    }
}


.badge-icon {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 0 4px rgba(0,255,200,0.4));
}

.pp-avatar {
    position: relative;
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 999;
}

.pp-avatar:hover {
    position: relative;
    transform: scale(1.40) rotate(3deg);
    filter: drop-shadow(0 0 18px rgba(0,255,200,0.6));
    z-index: 999;
}


@keyframes badgePop {
    0% { opacity: 0; transform: translateY(1222px) scale(0.9); }
    60% { opacity: 1; transform: translateY(0) scale(1.05); }
    100% { transform: scale(1); }
}

.pp-badge:hover {
    transform: translateY(-2px);
    background: rgba(250, 0, 0, 0.12);
}

/* Цвета */
.badge-pvp { border-color: #ff3d3d; }
.badge-farm { border-color: #00ff9f; }
.badge-raider { border-color: #ffc23d; }
.badge-fisher { border-color: #3db8ff; }
.badge-hunter { border-color: #ff7b00; }
.badge-builder { border-color: #b86dff; }


/* Имя */
#pp-name {
    position: relative;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #c90c0cc5, #5154e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* STEAM ID */
#pp-steamid {
    position: relative;
    opacity: 0.55;
    font-size: 15px;
    color: antiquewhite;
}

/* Кнопка Open Steam */
#pp-steam-btn {
    position: relative;
    margin-top: 10px;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #ff5757, #ff894ab9);
    color: white;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 0 12px rgba(255,85,85,0.4);
    transition: 0.2s;
}

#pp-steam-btn:hover {
    position: relative;
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(255,85,85,0.7);
}

/* Кнопка "Назад" */
#pp-back {
    position: relative;
    padding: 10px 20px;
    background: #e14a4a;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: grab;
    box-shadow: 0 0 12px rgba(255,80,80,0.4);
    transition: 0.25s;
}

#pp-back:hover {
    position: relative;
    transform: translateY(-3px);
    box-shadow: 0 0 18px rgba(255,80,80,0.7);
}

/* === Карточки статистики === */

#pp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 40px;
}

#pp-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.5);
    opacity: 0.35;
    z-index: -2;
}

#pp-grid {
    position: absolute;
    inset: 0;
    z-index: -3;
    opacity: 0.25;
}

/* GRID */
.pp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

/* Основная карточка */




.pp-frame {
    --x: 50%;
    --y: 50%;
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(10,12,18,0.95);
}

.pp-frame::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 30px;
    background: radial-gradient(circle at var(--x) var(--y),
        rgb(255, 0, 0),
        rgb(255, 0, 0),
        transparent 65%);
    z-index: -1;
    filter: blur(22px);
    transition: 0.15s ease;
}

.pp-scanline {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        to bottom,
        rgba(0,255,200,0) 0%,
        rgba(0, 0, 0, 0.473) 50%,
        rgba(0, 255, 200, 0) 100%
    );
    filter: blur(10px);
    animation: scanMove 6s linear infinite;
    
    pointer-events: none;
}

@keyframes scanMove {
    0% { top: -60%; }
    100% { top: 100%; }
}


@keyframes statsFadeIn {
    to { transform: translateY(0); opacity: 21; }
}
/* Заголовок статистики */

.pp-card h4 {
    margin-bottom: 6px;
    font-size: 16px;
    opacity: 0.78;
}

.pp-card .pp-value {
    font-size: 32px;
    font-weight: 900;
    margin-top: 5px;
}

/* BACK BUTTON */
.pp-back-btn {
    margin-top: 40px;
    padding: 10px 20px;
    font-size: 16px;
    background: rgba(255, 1, 1, 0.459);
    border: 1px solid rgba(255, 255, 255, 0.363);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s;
    color: wheat;
}

.pp-back-btn:hover {
    background: rgba(72, 255, 0, 0.1);
    box-shadow: 0px 0px 20px rgb(255, 0, 0);
}


.clickable { cursor: grab; text-decoration: underline; }

.leader-cell {
  cursor: pointer;
}

.leader-cell:hover {
  background-color: rgba(255, 255, 255, 0.1);
}


/* --- Ховер и клик в таблице ТОП игроков --- */

.lb-col-player {
    position: relative;
    cursor: grab;
    transition: 0.25s ease;
    content: "Подробнее →";
}

.lb-col-player:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px);
}

/* Текст 'Подробнее' */
.lb-col-player::after {
    content: "Подробнее →";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0;
    transition: 0.25s ease;
    pointer-events: none;
}

.lb-col-player:hover::after {
    opacity: 0.85;
}

/*================================*/

.lb-col-main {
    position: relative;
    cursor: grab;
    transition: 0.25s ease;
}

.lb-col-main:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px);
}

/* Текст 'Подробнее' */
.lb-col-main::after {
    content: "Подробнее →";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0;
    transition: 0.25s ease;
    pointer-events: none;
}

.lb-col-main:hover::after {
    opacity: 0.85;
}

/* ================================ */
.lb-col-deaths {
    position: relative;
    cursor: grab;
    transition: 0.25s ease;
}

.lb-col-deaths:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px);
}

/* Текст 'Подробнее' */
.lb-col-deaths::after {
    content: "Подробнее →";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    
    opacity: 0;
    transition: 0.25s ease;
    pointer-events: none;
}

.lb-col-deaths:hover::after {
    opacity: 0.85;
}

/* ===================================== */

.lb-col-playtime {
    position: relative;
    cursor: grab;
    transition: 0.25s ease;
}

.lb-col-playtime:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateY(-1px);
}

/* Текст 'Подробнее' */
.lb-col-playtime::after {
    content: "Подробнее →";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    
    opacity: 0;
    transition: 0.25s ease;
    pointer-events: none;
}

.lb-col-playtime:hover::after {
    opacity: 0.85;
}