/* =====================================================
   Expandable cards
   ===================================================== */

.expandable-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;

    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.expandable-card:hover {
    border-color: rgba(230, 91, 50, .75);
}

.expandable-card::after {
    content: "⌄";

    position: absolute;
    top: 13px;
    right: 15px;

    color: var(--accent);

    font-size: 19px;
    font-weight: 900;

    transition: transform .2s ease;
}

.expandable-card.open::after {
    transform: rotate(180deg);
}

.expandable-detail {
    display: none;

    margin-top: 16px;
    padding-top: 13px;

    border-top: 1px solid var(--border);
}

.expandable-card.open .expandable-detail {
    display: block;
}

.detail-heading {
    margin: 14px 0 7px;

    color: #777e87;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .12em;
    text-transform: uppercase;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 6px 0;

    color: var(--muted);

    font-size: 12px;
}

.detail-row strong {
    color: var(--text);
}


/* =====================================================
   Players inside expandable cards
   ===================================================== */

.player-link {
    width: 100%;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;

    align-items: center;
    gap: 15px;

    padding: 9px 0;

    border: 0;
    border-bottom: 1px solid #24272d;

    background: transparent;

    color: var(--text);

    font-family: inherit;
    text-align: left;

    cursor: pointer;
}

.player-link:last-child {
    border-bottom: 0;
}

.player-link:hover {
    background: transparent;
}

.player-link-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: var(--text);

    font-size: 13px;
    font-weight: 700;

    transition: color .15s ease;
}

.player-link:hover .player-link-name {
    color: var(--accent);
}

.player-link-value {
    color: var(--muted);

    font-size: 12px;
    font-weight: 700;
}


/* =====================================================
   Resource cards
   ===================================================== */

#resources-grid .resource-card {
    min-height: 105px;
}

#resources-grid .resource-card.open {
    background:
        linear-gradient(
            145deg,
            #191c21,
            #121418
        );

    border-color: #343942;
}

#resources-grid .resource-name {
    padding-right: 22px;
}

#resources-grid .resource-value {
    margin-top: 4px;
}

.resource-top-players {
    margin-top: 4px;
}


/* =====================================================
   Leaderboards
   ===================================================== */

.clickable-player {
    cursor: pointer;

    transition: background .15s ease;
}

.clickable-player:hover {
    background: #191c21;
}

.clickable-player:hover .player-name {
    color: var(--accent);
}


/* =====================================================
   Player profile
   ===================================================== */

.player-result {
    padding: 0;
}

.player-profile {
    padding: 26px;
}

.player-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    margin-bottom: 28px;
    padding-bottom: 22px;

    border-bottom: 1px solid var(--border);
}

.player-profile-name {
    margin: 0;

    color: var(--text);

    font-size: 30px;
    font-weight: 900;

    letter-spacing: -.03em;
}

.player-profile-steamid {
    margin-top: 6px;

    color: var(--muted);

    font-family: monospace;
    font-size: 12px;
}

.player-profile-scope {
    padding: 8px 12px;

    border: 1px solid rgba(230, 91, 50, .45);

    border-radius: 999px;

    background: rgba(230, 91, 50, .08);

    color: var(--accent);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .08em;
    text-transform: uppercase;
}


/* =====================================================
   Player categories
   ===================================================== */

.player-category {
    margin-top: 31px;
}

.player-category:first-of-type {
    margin-top: 0;
}

.player-category-title {
    margin-bottom: 12px;

    color: var(--accent);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: .13em;
    text-transform: uppercase;
}

.player-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}

.player-detail-card {
    min-width: 0;

    padding: 15px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background:
        linear-gradient(
            145deg,
            #121418,
            #0e1013
        );
}

.player-detail-label {
    margin-bottom: 7px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .05em;
    text-transform: uppercase;
}

.player-detail-value {
    overflow: hidden;

    color: var(--text);

    font-size: 21px;
    font-weight: 850;

    text-overflow: ellipsis;
}


/* =====================================================
   Player subtables
   ===================================================== */

.player-subtable {
    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #0e1013;
}

.player-subtable-row {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding: 12px 15px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;
}

.player-subtable-row:last-child {
    border-bottom: 0;
}

.player-subtable-row strong {
    color: var(--text);
}


/* =====================================================
   Player growables
   ===================================================== */

.player-growable {
    border-bottom: 1px solid var(--border);
}

.player-growable:last-child {
    border-bottom: 0;
}

.player-growable-main {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 13px 15px;

    color: var(--text);

    font-size: 13px;
    font-weight: 750;

    cursor: pointer;
}

.player-growable-main:hover {
    color: var(--accent);
}

.player-growable-detail {
    display: none;

    padding:
        0 15px
        13px;
}

.player-growable.open .player-growable-detail {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}

.player-growable-detail-box {
    padding: 11px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: #15181c;

    color: var(--muted);

    font-size: 12px;
}

.player-growable-detail-box strong {
    float: right;

    color: var(--text);
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1000px) {
    .player-detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .player-detail-grid {
        grid-template-columns: 1fr;
    }

    .player-profile {
        padding: 18px;
    }

    .player-profile-header {
        flex-direction: column;
    }
}

.brand-home {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.brand-home:hover .brand-name {
    color: var(--accent);
}

.brand-home .brand-name {
    transition: color .15s ease;
}

/* =====================================================
   Steam profile
   ===================================================== */

.steam-profile-link {
    display: inline-block;

    margin-top: 9px;

    color: var(--accent);

    font-size: 12px;
    font-weight: 800;

    text-decoration: none;
}

.steam-profile-link:hover {
    text-decoration: underline;
}


/* =====================================================
   PvP kill history
   ===================================================== */

.kill-history {
    overflow-x: auto;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #0e1013;
}

.kill-row {
    min-width: 720px;

    display: grid;

    grid-template-columns:
        minmax(160px, 1.4fr)
        minmax(150px, 1.2fr)
        100px
        90px
        100px;

    gap: 14px;

    align-items: center;

    padding: 12px 15px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 13px;
}

.kill-row:last-child {
    border-bottom: 0;
}

.kill-header {
    background: #15181d;

    color: #9ba1aa;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .07em;
    text-transform: uppercase;
}

.kill-victim {
    padding: 0;

    border: 0 !important;

    background: transparent !important;
}

.kill-victim .player-link-name {
    color: var(--text);
}

.kill-victim:hover .player-link-name {
    color: var(--accent);
}

/* =====================================================
   Full PvP history
   ===================================================== */

.kill-row {
    grid-template-columns:
        72px
        minmax(140px, 1.3fr)
        minmax(150px, 1.2fr)
        90px
        85px
        90px;
}

.history-result {
    display: inline-block;

    min-width: 54px;

    padding: 4px 7px;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 900;

    text-align: center;

    letter-spacing: .05em;
}

.history-result-kill {
    color: #72db91;
    background: rgba(67, 190, 105, .10);
    border: 1px solid rgba(67, 190, 105, .28);
}

.history-result-death {
    color: #ef735f;
    background: rgba(230, 91, 50, .10);
    border: 1px solid rgba(230, 91, 50, .28);
}

/* =====================================================
   NEW CLEAN RANKINGS LAYOUT
   ===================================================== */


/* =====================================================
   Search at top
   ===================================================== */

.top-player-search {
    margin-top: 10px;
}

.player-search-panel {
    overflow: hidden;
}

.player-search-panel .player-result:empty {
    display: none;
}


/* =====================================================
   Rankings
   ===================================================== */

.ranking-hint {
    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}

.rankings-panel {
    padding: 0 !important;

    overflow: hidden;
}

.rankings-scroll {
    width: 100%;

    overflow-x: auto;
}

.rankings-table {
    width: 100%;
    min-width: 1180px;

    border-collapse: collapse;

    font-size: 12px;
}

.rankings-table thead {
    background: #15181d;
}

.rankings-table th {
    padding: 0;

    border-bottom: 1px solid var(--border);

    text-align: right;
    white-space: nowrap;
}

.rankings-table th:nth-child(1),
.rankings-table th:nth-child(2) {
    text-align: left;
}

.rank-column {
    width: 52px;

    padding-left: 15px !important;

    color: #777e87;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .08em;
}

.ranking-sort {
    width: 100%;

    padding: 14px 13px;

    border: 0;

    background: transparent;

    color: #8f959e;

    font-family: inherit;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .055em;
    text-align: right;
    text-transform: uppercase;

    cursor: pointer;

    white-space: nowrap;
}

.rankings-table th:nth-child(2)
.ranking-sort {
    text-align: left;
}

.ranking-sort:hover,
.ranking-sort.active {
    color: var(--accent);
}

.sort-indicator {
    display: inline-block;

    width: 12px;

    margin-left: 3px;

    color: var(--accent);
}

.ranking-player-row {
    border-bottom: 1px solid var(--border);

    transition:
        background .15s ease;
}

.ranking-player-row:last-child {
    border-bottom: 0;
}

.ranking-player-row:hover {
    background: #15181c;
}

.rankings-table td {
    padding: 13px;

    color: var(--muted);

    text-align: right;

    white-space: nowrap;
}

.rankings-table td:nth-child(1),
.rankings-table td:nth-child(2) {
    text-align: left;
}

.rank-number {
    width: 52px;

    padding-left: 15px !important;

    color: #656b74 !important;

    font-size: 11px;
    font-weight: 800;
}

.ranking-player {
    min-width: 170px;
}

.ranking-player-button {
    max-width: 220px;

    overflow: hidden;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--text);

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    text-overflow: ellipsis;

    cursor: pointer;
}

.ranking-player-button:hover {
    color: var(--accent);
}

.ranking-number {
    font-variant-numeric:
        tabular-nums;
}

.ranking-kd {
    color: var(--text) !important;

    font-weight: 850;
}

.rankings-empty {
    padding: 28px !important;

    color: var(--muted);

    text-align: center !important;
}


/* =====================================================
   Search Results
   ===================================================== */

.search-results {
    margin-top: 20px;

    padding-top: 20px;

    border-top: 1px solid var(--border);
}

.search-result-player {
    width: 100%;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 12px 0;

    border: 0;
    border-bottom: 1px solid var(--border);

    background: transparent;

    color: var(--text);

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    text-align: left;

    cursor: pointer;
}

.search-result-player:last-child {
    border-bottom: 0;
}

.search-result-player:hover {
    color: var(--accent);
}

.search-result-player span:last-child {
    color: var(--muted);

    font-size: 12px;
}


/* =====================================================
   Player Overview
   ===================================================== */

.profile-kpi-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 10px;

    margin-bottom: 32px;
}

.profile-resources
.player-detail-grid {
    grid-template-columns:
        repeat(6, minmax(0, 1fr));
}


/* =====================================================
   PvP history player links
   ===================================================== */

.history-player-link {
    max-width: 100%;

    overflow: hidden;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--text);

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    text-align: left;
    text-overflow: ellipsis;

    cursor: pointer;

    white-space: nowrap;
}

.history-player-link:hover {
    color: var(--accent);
}


/* =====================================================
   Compact lower profile sections
   ===================================================== */

.profile-compact-area {
    display: grid;

    gap: 10px;

    margin-top: 30px;
}

.compact-details {
    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #0e1013;
}

.compact-details summary {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 14px 15px;

    color: var(--text);

    font-size: 12px;
    font-weight: 850;

    cursor: pointer;

    list-style: none;
}

.compact-details summary::-webkit-details-marker {
    display: none;
}

.compact-details summary::after {
    content: "⌄";

    color: var(--accent);

    font-size: 18px;
    font-weight: 900;

    transition: transform .15s ease;
}

.compact-details[open]
summary::after {
    transform: rotate(180deg);
}

.compact-details-count {
    margin-left: auto;

    color: var(--muted);

    font-size: 10px;
    font-weight: 700;
}

.compact-details-body {
    border-top: 1px solid var(--border);
}

.compact-row {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding: 11px 15px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 12px;
}

.compact-row:last-child {
    border-bottom: 0;
}

.compact-row strong {
    color: var(--text);
}

.growable-compact-row {
    display: grid;

    grid-template-columns:
        minmax(140px, 1fr)
        100px
        100px
        100px;

    gap: 15px;

    padding: 11px 15px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 11px;
}

.growable-compact-row:last-child {
    border-bottom: 0;
}

.growable-compact-row div:not(:first-child) {
    text-align: right;
}

.growable-compact-row strong {
    color: var(--text);
}


/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1100px) {

    .profile-kpi-grid,
    .profile-resources
    .player-detail-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 650px) {

    .ranking-hint {
        display: none;
    }

    .profile-kpi-grid,
    .profile-resources
    .player-detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .growable-compact-row {
        grid-template-columns:
            1fr 80px 80px 80px;

        min-width: 520px;
    }

    .compact-details-body {
        overflow-x: auto;
    }
}

/* =====================================================
   Rankings - uniform row height
   ===================================================== */

.rankings-table tbody tr {
    height: 46px;
}

.rankings-table tbody td {
    height: 46px;
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
}

.ranking-player-button {
    line-height: 46px;
}

/* =====================================================
   Rankings - clean uniform grid
   ===================================================== */

.rankings-table {
    table-layout: fixed;
    width: 100%;
    min-width: 1220px;
}

/* Rank */
.rankings-table th:nth-child(1),
.rankings-table td:nth-child(1) {
    width: 4%;
    text-align: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Player */
.rankings-table th:nth-child(2),
.rankings-table td:nth-child(2) {
    width: 15%;
    text-align: left;
}

/* All statistic columns */
.rankings-table th:nth-child(n+3),
.rankings-table td:nth-child(n+3) {
    width: 8.1%;
    text-align: center;
}

/* Header alignment */
.rankings-table th:nth-child(n+3) .ranking-sort {
    text-align: center;
}

.rankings-table th:nth-child(2) .ranking-sort {
    text-align: left;
}

/* Uniform player rows */
.rankings-table tbody tr {
    height: 48px;
}

.rankings-table tbody td {
    height: 48px;
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
}

/* Player name */
.ranking-player-button {
    width: 100%;
    line-height: normal;
    text-align: left;
}

/* Numbers */
.ranking-number,
.ranking-kd {
    text-align: center !important;
    font-variant-numeric: tabular-nums;
}

/* =====================================================
   Rankings - final width / no horizontal scrolling
   ===================================================== */

.rankings-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.rankings-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    table-layout: fixed;
}

/* Rank */
.rankings-table th:nth-child(1),
.rankings-table td:nth-child(1) {
    width: 4%;
}

/* Player */
.rankings-table th:nth-child(2),
.rankings-table td:nth-child(2) {
    width: 17%;
}

/* PvP Kills */
.rankings-table th:nth-child(3),
.rankings-table td:nth-child(3) {
    width: 8%;
}

/* PvP Deaths */
.rankings-table th:nth-child(4),
.rankings-table td:nth-child(4) {
    width: 8%;
}

/* K/D */
.rankings-table th:nth-child(5),
.rankings-table td:nth-child(5) {
    width: 7%;
}

/* Playtime */
.rankings-table th:nth-child(6),
.rankings-table td:nth-child(6) {
    width: 9%;
}

/* Sulfur */
.rankings-table th:nth-child(7),
.rankings-table td:nth-child(7) {
    width: 8%;
}

/* Metal */
.rankings-table th:nth-child(8),
.rankings-table td:nth-child(8) {
    width: 8%;
}

/* HQM */
.rankings-table th:nth-child(9),
.rankings-table td:nth-child(9) {
    width: 7%;
}

/* Stone */
.rankings-table th:nth-child(10),
.rankings-table td:nth-child(10) {
    width: 8%;
}

/* Wood */
.rankings-table th:nth-child(11),
.rankings-table td:nth-child(11) {
    width: 8%;
}

/* Cloth */
.rankings-table th:nth-child(12),
.rankings-table td:nth-child(12) {
    width: 8%;
}

.ranking-sort {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
   Player KPI row - 7 equal cards
   ===================================================== */

.profile-kpi-grid {
    grid-template-columns:
        repeat(7, minmax(0, 1fr));
}

@media (max-width: 1200px) {
    .profile-kpi-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .profile-kpi-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

/* =====================================================
   PvP History - Team Kills
   ===================================================== */

.history-result-teamkill,
.history-result-teamdeath {
    color: #f0b75e;
    background: rgba(240, 183, 94, .10);
    border: 1px solid rgba(240, 183, 94, .30);
}

/* =====================================================
   PvP History - Team Kill badges
   ===================================================== */

.history-result {
    min-width: 86px;
    white-space: nowrap;
}

.history-result-teamkill,
.history-result-teamdeath {
    color: #f0b75e;
    background: rgba(240, 183, 94, .10);
    border: 1px solid rgba(240, 183, 94, .30);
}

.history-teamkill,
.history-teamdeath {
    background:
        linear-gradient(
            90deg,
            rgba(240, 183, 94, .035),
            transparent 35%
        );
}

/* =====================================================
   PvP History - result/player spacing
   ===================================================== */

.kill-row {
    grid-template-columns:
        105px
        minmax(150px, 1.3fr)
        minmax(150px, 1.2fr)
        90px
        85px
        90px;
}

/* =====================================================
   Dedicated player profile mode
   ===================================================== */

body.profile-open #home-overview,
body.profile-open #home-rankings {
    display: none;
}

.profile-back {
    margin-top: 30px;

    padding-top: 25px;

    border-top: 1px solid var(--border);
}

.back-to-leaderboards {
    padding: 11px 16px;

    border: 1px solid rgba(230, 91, 50, .45);

    border-radius: 7px;

    background: rgba(230, 91, 50, .08);

    color: var(--accent);

    font-family: inherit;
    font-size: 11px;
    font-weight: 900;

    letter-spacing: .04em;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease;
}

.back-to-leaderboards:hover {
    background: rgba(230, 91, 50, .16);
    border-color: var(--accent);
}

/* =====================================================
   Expandable player stat cards
   ===================================================== */

.player-expandable-card {
    padding: 0;
    overflow: hidden;
}

.player-expandable-card[open] {
    grid-column: 1 / -1;
}

.player-expandable-card summary {
    min-height: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 15px;

    cursor: pointer;

    list-style: none;
}

.player-expandable-card summary::-webkit-details-marker {
    display: none;
}

.player-expandable-card summary:hover
.player-detail-label {
    color: var(--accent);
}

.expand-stat-arrow {
    color: var(--accent);

    font-size: 18px;
    font-weight: 900;

    transition:
        transform .15s ease;
}

.player-expandable-card[open]
.expand-stat-arrow {
    transform: rotate(180deg);
}

.expand-stat-content {
    padding:
        0 15px
        15px;

    border-top: 1px solid var(--border);
}

.expand-stat-title {
    padding: 13px 0 9px;

    color: var(--accent);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .08em;
    text-transform: uppercase;
}


/* =====================================================
   Animal breakdown
   ===================================================== */

.expand-stat-rows {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 8px;
}

.expand-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 10px 12px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: #0e1013;

    color: var(--muted);

    font-size: 12px;
}

.expand-stat-row strong {
    color: var(--text);
}

.expand-stat-empty {
    padding: 12px 0;

    color: var(--muted);

    font-size: 12px;
}


/* =====================================================
   Growables breakdown
   ===================================================== */

.growable-stat-table {
    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 7px;
}

.growable-stat-row {
    display: grid;

    grid-template-columns:
        minmax(160px, 1fr)
        110px
        110px
        110px;

    gap: 15px;

    align-items: center;

    padding: 11px 13px;

    border-bottom: 1px solid var(--border);

    color: var(--muted);

    font-size: 11px;
}

.growable-stat-row:last-child {
    border-bottom: 0;
}

.growable-stat-name {
    color: var(--text);

    font-size: 12px;
    font-weight: 800;
}

.growable-stat-row > div:not(:first-child) {
    display: flex;
    justify-content: space-between;

    gap: 8px;
}

.growable-stat-row strong {
    color: var(--text);
}


/* =====================================================
   Resource grid with Growables card
   ===================================================== */

.profile-resources
.player-detail-grid {
    grid-template-columns:
        repeat(7, minmax(0, 1fr));
}


@media (max-width: 1200px) {

    .profile-resources
    .player-detail-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .expand-stat-rows {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .profile-resources
    .player-detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .expand-stat-rows {
        grid-template-columns: 1fr;
    }

    .growable-stat-table {
        overflow-x: auto;
    }

    .growable-stat-row {
        min-width: 560px;
    }
}

/* =====================================================
   FIX: expandable player cards
   ===================================================== */

.player-expandable-card {
    height: auto;
    min-height: 0;
}

.player-expandable-card summary {
    height: auto;
    min-height: 78px;
    box-sizing: border-box;
}

.player-expandable-card[open] summary {
    height: auto;
    min-height: 78px;
}

.player-expandable-card[open] {
    height: auto;
}

.player-expandable-card .expand-stat-content {
    display: block;
    height: auto;
    min-height: 0;
}

/* =====================================================
   Animal Kills - same visual style as Growables
   ===================================================== */

.animal-stat-row {
    grid-template-columns:
        minmax(160px, 1fr)
        110px;
}

/* =====================================================
   Detail tables (Animal Kills / Growables)
   ===================================================== */

.detail-table-wrap {
    margin-top: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.01);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.detail-table thead th {
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.03);
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.detail-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.92);
    font-size: 15px;
    vertical-align: middle;
}

.detail-table tbody tr:last-child td {
    border-bottom: none;
}

.detail-table tbody td:nth-child(n+2) {
    text-align: right;
}

.detail-table tbody td:first-child {
    font-weight: 700;
}

.detail-table-empty {
    text-align: center !important;
    color: rgba(255,255,255,0.55) !important;
    padding: 18px 16px !important;
}

@media (max-width: 900px) {
    .detail-table thead th,
    .detail-table tbody td {
        padding: 12px 12px;
        font-size: 13px;
    }
}

/* =====================================================
   Detail tables - aligned columns
   ===================================================== */

.detail-table {
    width: 100%;
    table-layout: fixed;
}

/* First column: labels */
.detail-table th:first-child,
.detail-table td:first-child {
    width: 28%;
    text-align: left;
}

/* Numeric columns */
.detail-table th:not(:first-child),
.detail-table td:not(:first-child) {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Growables: 1 label + 3 equal value columns */
.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(2),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(2),
.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(3),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(3),
.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(4),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(4) {
    width: 24%;
}

/* Animals: name + kills */
.player-expandable-card[data-profile-detail="animals"]
.detail-table th:first-child,
.player-expandable-card[data-profile-detail="animals"]
.detail-table td:first-child {
    width: 70%;
}

.player-expandable-card[data-profile-detail="animals"]
.detail-table th:nth-child(2),
.player-expandable-card[data-profile-detail="animals"]
.detail-table td:nth-child(2) {
    width: 30%;
    text-align: center;
}

/* =====================================================
   FINAL detail table alignment
   ===================================================== */

/* Common */
.detail-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.detail-table thead th,
.detail-table tbody td {
    box-sizing: border-box;
}

.detail-table thead th {
    vertical-align: middle;
}

.detail-table tbody td {
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}


/* =====================================================
   Growables
   Type 40% / values 20% each
   ===================================================== */

.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(1),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(1) {
    width: 40% !important;
    text-align: left !important;
}

.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(2),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(2),
.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(3),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(3),
.player-expandable-card[data-profile-detail="growables"]
.detail-table th:nth-child(4),
.player-expandable-card[data-profile-detail="growables"]
.detail-table td:nth-child(4) {
    width: 20% !important;
    text-align: center !important;
}


/* =====================================================
   Animals
   Animal 80% / Kills 20%
   ===================================================== */

.player-expandable-card[data-profile-detail="animals"]
.detail-table th:nth-child(1),
.player-expandable-card[data-profile-detail="animals"]
.detail-table td:nth-child(1) {
    width: 80% !important;
    text-align: left !important;
}

.player-expandable-card[data-profile-detail="animals"]
.detail-table th:nth-child(2),
.player-expandable-card[data-profile-detail="animals"]
.detail-table td:nth-child(2) {
    width: 20% !important;
    text-align: center !important;
}


/* Slightly cleaner numeric cells */
.player-expandable-card
.detail-table tbody td:not(:first-child) {
    color: var(--text);
    font-weight: 700;
}

/* =====================================================
   OLDRust header logo
   ===================================================== */

.brand-logo-link {
    display: flex;
    align-items: center;

    padding: 0;

    text-decoration: none;
}

.brand-logo-image {
    display: block;

    width: auto;
    height: 92px;

    max-width: 380px;

    object-fit: contain;

    transition:
        transform .15s ease,
        opacity .15s ease;
}

.brand-logo-link:hover
.brand-logo-image {
    transform: translateY(-1px);
    opacity: .92;
}

@media (max-width: 700px) {
    .brand-logo-image {
        height: 46px;
        max-width: 190px;
    }
}

/* =====================================================
   Multi-server selector
   ===================================================== */

.server-switch {
    margin-left: auto;
    margin-right: 12px;
}

.server-switch.hidden {
    display: none;
}

.server-select {
    min-width: 150px;

    padding: 8px 32px 8px 12px;

    border: 1px solid var(--border);

    border-radius: 7px;

    background: #111318;

    color: var(--text);

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;

    outline: none;

    cursor: pointer;
}

.server-select:hover,
.server-select:focus {
    border-color:
        rgba(230, 91, 50, .65);
}

@media (max-width: 700px) {

    .server-switch {
        margin-right: 7px;
    }

    .server-select {
        min-width: 110px;
        max-width: 145px;
    }
}

/* =====================================================
   Live stats feed status
   ===================================================== */

.live-indicator.is-live .live-dot {
    background: #42e882;
    box-shadow:
        0 0 10px rgba(66, 232, 130, .65);
}

.live-indicator.is-delayed .live-dot {
    background: #e7a93b;
    box-shadow:
        0 0 10px rgba(231, 169, 59, .5);
}

.live-indicator.is-offline .live-dot {
    background: #e55353;
    box-shadow:
        0 0 10px rgba(229, 83, 83, .45);
}

.live-indicator.is-no-data .live-dot {
    background: #7b8492;
    box-shadow: none;
}

.live-indicator.is-delayed {
    color: #e7a93b;
}

.live-indicator.is-offline {
    color: #e55353;
}

.live-indicator.is-no-data {
    color: #8e98a8;
}

/* =====================================================
   Scenic server hero banner
   ===================================================== */

.hero {
    position: relative;
    overflow: hidden;

    min-height: 245px;

    padding: 48px 42px;

    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;

    background:
        linear-gradient(
            90deg,
            rgba(11, 12, 14, .96) 0%,
            rgba(11, 12, 14, .82) 34%,
            rgba(11, 12, 14, .48) 68%,
            rgba(11, 12, 14, .72) 100%
        ),
        url("/assets/scenic-banner2.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    text-shadow:
        0 2px 4px rgba(0, 0, 0, .7),
        0 8px 28px rgba(0, 0, 0, .65);
}

.hero .eyebrow,
.hero .hero-text {
    text-shadow:
        0 2px 8px rgba(0, 0, 0, .9);
}

@media (max-width: 700px) {
    .hero {
        min-height: 210px;
        padding: 34px 24px;

        background-position: center;
    }
}

/* =====================================================
   Scenic hero positioning refinement
   ===================================================== */

.hero {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    min-height: 245px;

    padding:
        46px
        42px
        38px
        42px;
}


/* Left hero content */
.hero > div:first-child {
    width: 100%;
    max-width: 1180px;
}


/* Eyebrow */
.hero .eyebrow {
    margin-bottom: 14px;
}


/* Main server title */
.hero h1 {
    margin:
        0
        0
        12px
        0;

    max-width: calc(100% - 40px);

    font-size:
        clamp(
            42px,
            3.7vw,
            58px
        );

    line-height: .98;
    letter-spacing: -1.5px;
}


/* Subtitle */
.hero .hero-text {
    margin: 0;

    font-size: 16px;
}


/* Live status */
.hero .live-indicator {
    position: absolute;

    top: 28px;
    right: 28px;

    z-index: 3;

    min-width: 112px;

    justify-content: center;
}


/* Tablet */
@media (max-width: 1100px) {

    .hero h1 {
        max-width: 850px;

        font-size:
            clamp(
                38px,
                5vw,
                52px
            );
    }
}


/* Mobile */
@media (max-width: 700px) {

    .hero {
        min-height: 220px;

        padding:
            72px
            24px
            30px
            24px;
    }

    .hero > div:first-child {
        max-width: 100%;
    }

    .hero h1 {
        max-width: 100%;

        font-size: 36px;
        line-height: 1.02;
        letter-spacing: -1px;
    }

    .hero .hero-text {
        font-size: 14px;
    }

    .hero .live-indicator {
        top: 18px;
        right: 18px;
    }
}


/* =====================================================
   Search results spacing refinement
   ===================================================== */

.search-results {
    padding-bottom: 6px;
}

.search-results > .player-category-title {
    margin:
        0
        16px
        10px
        16px;
}

.search-result-player {
    box-sizing: border-box;

    min-height: 48px;

    padding:
        13px
        16px;

    gap: 24px;
}

.search-result-player span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-player span:last-child {
    flex: 0 0 auto;

    min-width: 72px;

    text-align: right;
}

.search-result-player:hover {
    background:
        rgba(255, 255, 255, .018);
}

/* =====================================================
   PvP history pagination
   ===================================================== */

.pvp-history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 14px;

    margin-top: 14px;
}

.pvp-history-page-button {
    min-width: 105px;

    padding: 9px 14px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: #111318;

    color: var(--text);

    font-family: inherit;
    font-size: 11px;
    font-weight: 800;

    cursor: pointer;

    transition:
        border-color .15s ease,
        color .15s ease,
        background .15s ease;
}

.pvp-history-page-button:hover:not(:disabled) {
    border-color:
        rgba(230, 91, 50, .65);

    color: var(--accent);
}

.pvp-history-page-button:disabled {
    opacity: .35;
    cursor: default;
}

.pvp-history-page-info {
    min-width: 82px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 750;

    text-align: center;
}

@media (max-width: 700px) {

    .pvp-history-pagination {
        gap: 8px;
    }

    .pvp-history-page-button {
        min-width: 90px;
        padding: 8px 10px;
    }
}

/* Keyboard access */
:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *, *::before, *::after { animation:none!important; transition:none!important; } }

/* Staff activity has no placement or competitive counters. */
#staff-activity[hidden] { display: none; }
.staff-panel { padding: 0; overflow: hidden; }
.staff-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.staff-table th, .staff-table td { padding: 14px 20px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
.staff-table th { background: rgba(255,255,255,.015); color: #858e9a; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.staff-table th:first-child { width: 50%; }
.staff-table th:nth-child(2) { width: 20%; }
.staff-table th:last-child, .staff-table td:last-child { text-align: right; }
.staff-member:last-child td { border-bottom: 0; }
.staff-table .ranking-player-button { display: inline; max-width: 100%; overflow-wrap: anywhere; white-space: normal; text-align: left; }
.staff-identity { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.staff-role { color: #858e9a; font-size: 12px; font-weight: 400; }
.staff-playtime { font-variant-numeric: tabular-nums; white-space: nowrap; color: #b6beca; font-size: 12px; }
.staff-profile { padding: 24px; }
body.profile-open #staff-activity { display: none; }
@media (max-width: 600px) { .staff-table th, .staff-table td { padding: 13px 12px; } }
