/* =========================================================================
БАЗОВЫЕ ПЕРЕМЕННЫЕ И СБРОС СТИЛЕЙ
========================================================================= */
:root {
    --bg-color: #08080a;
    --bg-secondary: #121216;
    --accent-color: #ff523b;
    --accent-hover: #ff361c;
    --accent-glow: rgba(255, 82, 59, 0.35);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #ff523b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* =========================================================================
ЗАЛ СЛАВЫ - ФИНАЛЬНЫЙ ДИЗАЙН (Floating Edge + Желтый ТОП-1)
========================================================================= */
.leaders-main {
    margin-top: 130px;
    padding-bottom: 80px;
    width: 100%;
    min-height: calc(100vh - 130px - 200px);
    transition: all 0.4s ease;
}

.leaders-page-title {
    text-align: center;
    margin-bottom: 40px;
}

.leaders-page-title h1 {
    color: #fff;
    font-size: 44px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    margin: 0 0 10px 0;
}

.leaders-page-title p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

/* 1. FLOATING EDGE (98% WIDTH) */
.widescreen-wrapper {
    width: 98%;
    max-width: 1800px;
    margin: 0 auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(18, 18, 22, 0.95);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* 2. СЕТКА 4 КАТЕГОРИЙ */
.top-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

.top-category-card {
    padding: 30px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.top-category-card:last-child {
    border-right: none;
}

.tc-header {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Цвета иконок */
.rich-header i {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.level-header i {
    color: #00bcd4;
    text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}

.forum-header i {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.donate-header i {
    color: #e91e63;
    text-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
}

/* Элементы списка в топе */
.tc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Обычные элементы (Ранги 2, 3, 4) */
.tc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    transition: 0.2s;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
}

.tc-item:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.tc-item:not(:nth-child(1)):hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Обертка для имени и значения */
.tc-info-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    justify-content: space-between;
}

.tc-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.tc-val {
    font-size: 13px;
    font-weight: 700;
    color: #aaa;
    white-space: nowrap;
}

.tc-rank {
    font-size: 15px;
    font-weight: 800;
    color: #555;
    width: 25px;
    text-align: center;
    flex-shrink: 0;
}

.tc-item:nth-child(2) .tc-rank {
    color: #c0c0c0;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.tc-item:nth-child(3) .tc-rank {
    color: #cd7f32;
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

.tc-item:nth-child(4) .tc-rank {
    color: #8fa3bd;
}

.tc-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #383842, #24242a);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

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

/* 3. ЖЕЛТЫЕ, ПОЛУКРУГЛЫЕ ШНЯГИ ДЛЯ ТОП-1 */
.tc-item:nth-child(1) {
    padding: 15px 20px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 25px;
    /* Полукруглые края */
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.15);
    display: flex;
    flex-direction: row;
    align-items: center;
}

.tc-item:nth-child(1):hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.25);
    background: rgba(255, 215, 0, 0.15);
}

.tc-item:nth-child(1) .tc-rank {
    width: auto;
    margin-right: 5px;
    font-size: 22px;
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.tc-item:nth-child(1) .tc-avatar {
    width: 48px;
    height: 48px;
    margin-right: 5px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.tc-item:nth-child(1) .tc-info-wrap {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.tc-item:nth-child(1) .tc-name {
    font-size: 15px;
    margin-bottom: 2px;
    color: #fff;
    padding-right: 0;
}

.tc-item:nth-child(1) .tc-val {
    font-size: 14px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 4. ШИРОКАЯ ТАБЛИЦА СНИЗУ ПАНЕЛИ */
.leaders-table-wrapper {
    background: transparent;
    padding: 0;
}

.leaders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaders-table th {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 40px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    letter-spacing: 1px;
}

.leaders-table th:first-child {
    padding-left: 50px;
}

.leaders-table th:last-child {
    padding-right: 50px;
}

.leaders-table td {
    padding: 18px 40px;
    font-size: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.leaders-table td:first-child {
    padding-left: 50px;
}

.leaders-table td:last-child {
    padding-right: 50px;
}

.leaders-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.leaders-table tbody tr:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.leader-table-profile {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.leader-table-profile:hover {
    color: var(--accent-color);
}

/* Сортировка */
.leaders-table th.sortable {
    cursor: pointer;
    transition: 0.2s;
    user-select: none;
}

.leaders-table th.sortable:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
}

.leaders-table th i {
    margin-left: 5px;
    font-size: 12px;
    color: #555;
    transition: 0.2s;
}

.leaders-table th.active-sort i {
    color: var(--accent-color);
}

/* Элементы внутри таблицы */
.tbl-rank {
    font-weight: 800;
    font-size: 16px;
    color: #888;
}

.tbl-player {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.tbl-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #222;
    overflow: hidden;
}

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

.tbl-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.badge-pd {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-mafia {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-gov {
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-news {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-civil {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* ПАГИНАЦИЯ */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 25px 0;
    background: rgba(0, 0, 0, 0.2);
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
}

.page-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

.page-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
}

.page-input-wrap input {
    width: 50px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
}

.page-input-wrap input:focus {
    border-color: var(--accent-color);
}

.page-input-wrap input::-webkit-outer-spin-button,
.page-input-wrap input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =========================================================================
ФУТЕР И ПЛАНШЕТ
========================================================================= */
.footer {
    background: #050507;
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 60px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-top-glow {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 1px;
    background: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-color);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 80px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.brand-col .logo {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-col p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 13px;
    opacity: 0.7;
    max-width: 400px;
}

.footer-copyright {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
}

.footer-heading {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

.links-col a {
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
    margin-bottom: 15px;
    font-size: 14px;
}

.links-col a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.support-mail {
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 25px;
}

.btn-support {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-support:hover {
    background: rgba(255, 82, 59, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}
