/* ========================================
   Ranks Component
   ======================================== */

.ranks-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Height of .ranks-server-btn, so a heading without a selector still matches
   one with it and side-by-side leaderboards start their tables on one line. */
.leaderboard-section-head {
    min-height: 2.25rem;
}

.ranks-server-selector {
    position: relative;
}

.ranks-server-btn {
    background: rgba(13, 202, 240, 0.08);
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: 0.5rem;
    color: #fff;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ranks-server-btn:hover {
    background: rgba(13, 202, 240, 0.15);
    border-color: #0dcaf0;
}

.ranks-dropdown-menu {
    background: rgba(15, 22, 33, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.5rem !important;
    min-width: 160px !important;
}

.ranks-dropdown-item {
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
}

.ranks-dropdown-item:hover {
    background: rgba(13, 202, 240, 0.1);
    color: #fff;
}

.ranks-dropdown-item.active {
    background: rgba(13, 202, 240, 0.2);
    color: #0dcaf0;
}

.ranks-row-top1 {
    background: rgba(255, 215, 0, 0.08) !important;
}

.ranks-row-top1:hover {
    background: rgba(255, 215, 0, 0.12) !important;
}

.ranks-row-top2 {
    background: rgba(192, 192, 192, 0.08) !important;
}

.ranks-row-top2:hover {
    background: rgba(192, 192, 192, 0.12) !important;
}

.ranks-row-top3 {
    background: rgba(205, 127, 50, 0.08) !important;
}

.ranks-row-top3:hover {
    background: rgba(205, 127, 50, 0.12) !important;
}

.ranks-medal-1 {
    color: #ffd700;
}

.ranks-medal-2 {
    color: #c0c0c0;
}

.ranks-medal-3 {
    color: #cd7f32;
}

/* Compact table layout */

.ranks-th {
    color: rgba(13, 202, 240, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.75rem;
}

.ranks-td {
    padding: 0.5rem 0.75rem;
    font-variant-numeric: tabular-nums;
}

.ranks-th-icon {
    color: rgba(13, 202, 240, 0.6);
    margin-right: 0.4rem;
}

.ranks-th-sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ranks-th-sortable:hover {
    color: rgba(13, 202, 240, 1);
    background-color: rgba(13, 202, 240, 0.15);
}

@media (max-width: 768px) {
    .ranks-table {
        min-width: 600px !important;
        width: auto !important;
    }
}

/* ========================================
   Activity Record - Professional Design
   ======================================== */

.activity-record-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.08) 0%, rgba(13, 202, 240, 0.03) 100%);
    border: 1px solid rgba(13, 202, 240, 0.2);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.activity-record-card:hover {
    border-color: rgba(13, 202, 240, 0.4) !important;
    box-shadow: 0 8px 32px rgba(13, 202, 240, 0.15);
    transform: translateY(-2px);
}

.record-icon-wrapper {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.2) 0%, rgba(13, 202, 240, 0.1) 100%);
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .activity-record-card {
        flex-direction: column;
        text-align: center;
    }
    
    .record-icon-wrapper {
        width: 56px;
        height: 56px;
    }
}

/* ========================================
   Leaderboard Menu
   ======================================== */

.leaderboard-menu {
    border-width: 1px !important;
    color: gray !important;
}

.leaderboard-menu:hover {
    border-width: 2px !important;
    color: rgb(180, 180, 180) !important;
}

.leaderboard-menu.active {
    border-width: 2px !important;
    color: white !important;
}

/* ========================================
   Hall of fame (home page) — players and clans in one sortable, searchable table
   ======================================== */

.hall-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 203, 49, 0.16);
    color: rgb(255, 203, 49);
    box-shadow: 0 0 16px rgba(255, 203, 49, 0.2);
}

/* Child combinators on purpose: Bootstrap styles every cell through
   `.table > :not(caption) > * > *`, which ties with a plain `.hall-table td`.
   Gutters shrink on phones so #, name, points and K/D fit without a sideways scroll. */
.hall-table > thead > tr > th {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    padding: 0.55rem clamp(0.45rem, 2vw, 0.9rem);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hall-table > tbody > tr > td {
    padding: 0.5rem clamp(0.45rem, 2vw, 0.9rem);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hall-table > thead > tr > th:first-child,
.hall-table > tbody > tr > td:first-child {
    width: 3.5rem;
    padding-left: 1.25rem;
}

.hall-table > thead > tr > th:last-child,
.hall-table > tbody > tr > td:last-child {
    padding-right: 1.25rem;
}

.hall-table > tbody > tr {
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hall-table > tbody > tr:hover {
    background: rgba(13, 202, 240, 0.06);
}

.hall-table > tbody > tr.hall-row-user {
    background: rgba(13, 202, 240, 0.1);
}

.hall-table > tbody > tr.hall-row-user > td:first-child {
    box-shadow: inset 3px 0 0 #0dcaf0;
}

/* "Mano vieta" flashes the row it jumped to. */
.hall-table > tbody > tr.hall-row-flash > td {
    animation: hall-row-flash 1.8s cubic-bezier(0.4, 0, 0.2, 1) 1;
}

@keyframes hall-row-flash {
    0%, 35% { background: rgba(13, 202, 240, 0.35); }
    100% { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .hall-table > tbody > tr.hall-row-flash > td {
        animation: none;
    }
}

/* Sortable headers: the whole label is the button. */
.hall-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hall-sort:hover,
.hall-sort:focus-visible {
    color: #fff;
}

.hall-sort > i {
    opacity: 0.4;
}

.hall-table > thead > tr > th.is-sorted {
    color: #0dcaf0;
}

.hall-table > thead > tr > th.is-sorted .hall-sort > i {
    opacity: 1;
}

.hall-table > tbody > tr > td.hall-sorted {
    background: rgba(13, 202, 240, 0.05);
}

.hall-mark {
    padding: 0 0.1em;
    border-radius: 0.2rem;
    background: rgba(255, 203, 49, 0.3);
    color: #fff;
}

.hall-num {
    font-variant-numeric: tabular-nums;
}

.hall-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hall-avatar-empty {
    color: rgba(255, 255, 255, 0.5);
}

.hall-name {
    max-width: clamp(6rem, 32vw, 20rem);
}

.hall-muted {
    color: rgba(255, 255, 255, 0.7);
}

.hall-tag {
    flex-shrink: 0;
    padding: 0 0.4rem;
    border-radius: 0.375rem;
    background: rgba(13, 202, 240, 0.12);
    color: #0dcaf0;
    font-weight: 600;
}

.hall-foot {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

