/* =========================================================
   GUN Stats — player profile
   Weapon/body-location cards, profile overview grid, stat categories,
   compact grids, mini-stats. Loads AFTER base on profile pages.
   ========================================================= */

.gun-stats-page .player-meta {
    min-width: 0;                                                                   /* Sets the minimum allowed width. */
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    align-items: baseline;                                                          /* Controls vertical alignment of child items. */
    gap: 6px;                                                                       /* Sets the spacing between flex or grid children. */
}

.gun-stats-page .player-meta a {
    color: #fff;                                                                    /* Sets the text color. */
    text-decoration: none;                                                          /* Controls link or text decoration. */
    font-size: var(--name-font);                                                    /* Sets the text size. */
    font-weight: var(--name-weight);                                                /* Sets the text thickness. */
}

.gun-stats-page .player-meta a:hover {
    color: var(--accent-2);                                                         /* Sets the active or hover text color. */
}

.gun-stats-page .profile-preview {
    display: grid;                                                                  /* Sets how the element is rendered in the layout. */
    grid-template-columns: minmax(240px, 0.9fr) 1.6fr;                              /* Defines the grid column layout. */
    gap: 18px;                                                                      /* Sets the spacing between flex or grid children. */
    padding: 0 clamp(20px, 2.5vw, 34px) clamp(24px, 2.4vw, 38px);                   /* Sets the inside spacing of the element. */
}

.gun-stats-page .profile-card {
    padding: 18px;                                                                  /* Sets the card or panel inner spacing. */
    background: rgba(10, 15, 22, 0.82);                                             /* Sets the card or panel background. */
    border: 1px solid var(--line);                                                  /* Sets the card or panel border. */
    border-radius: 13px;                                                            /* Rounds the card or panel corners. */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);                           /* Adds the element shadow effect. */
}

.gun-stats-page .profile-title {
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    align-items: center;                                                            /* Controls vertical alignment of child items. */
    gap: 13px;                                                                      /* Sets the spacing between flex or grid children. */
    margin-bottom: 16px;                                                            /* Sets the outside spacing below the element. */
}

.gun-stats-page .profile-title .avatar {
    width: 46px;                                                                    /* Sets the width for the icon or logo. */
    height: 46px;                                                                   /* Sets the height for the icon or logo. */
}

.gun-stats-page .profile-title strong {
    display: block;                                                                 /* Sets how the element is rendered in the layout. */
    color: #fff;                                                                    /* Sets the text color. */
    font-size: 1.05rem;                                                             /* Sets the heading text size. */
    font-weight: var(--name-weight);                                                /* Sets the heading text weight. */
}

.gun-stats-page .profile-title span:not(.avatar) {
    color: var(--muted-2);                                                          /* Uses the muted secondary text color. */
    font-size: 0.82rem;                                                             /* Sets the heading text size. */
}

.gun-stats-page .profile-grid {
    display: grid;                                                                  /* Sets how the element is rendered in the layout. */
    grid-template-columns: repeat(3, minmax(120px, 1fr));                           /* Defines the grid column layout. */
    gap: 12px;                                                                      /* Sets spacing between grid items. */
}

.gun-stats-page .mini-stat {
    padding: 14px;                                                                  /* Sets the inside spacing of the element. */
    background: rgba(255, 255, 255, 0.03);                                          /* Sets the element background. */
    border: 1px solid rgba(162, 176, 191, 0.12);                                    /* Sets the element border. */
    border-radius: 12px;                                                            /* Rounds the element corners. */
}

.gun-stats-page .mini-stat strong {
    display: block;                                                                 /* Sets how the element is rendered in the layout. */
    color: #fff;                                                                    /* Sets the text color. */
    font-size: 1.18rem;                                                             /* Sets the text size. */
    font-weight: var(--number-weight);                                              /* Sets the text thickness. */
}

.gun-stats-page .mini-stat span {
    display: block;                                                                 /* Sets how the element is rendered in the layout. */
    margin-top: 4px;                                                                /* Sets the outside spacing above the element. */
    color: var(--muted);                                                            /* Uses the muted secondary text color. */
    font-size: 0.72rem;                                                             /* Sets the text size. */
    font-weight: 800;                                                               /* Sets the text thickness. */
    letter-spacing: 0.12em;                                                         /* Sets spacing between letters. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

@media (max-width: 900px) {
    .gun-stats-page .profile-preview {
        grid-template-columns: 1fr;                                                 /* Defines the grid column layout. */
    }

    .gun-stats-page .profile-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));                       /* Defines the grid column layout. */
    }

    .gun-stats-page[data-gun-player-profile] .profile-preview.profile-overview-grid,
    .gun-stats-page[data-gun-player-profile] .profile-preview.profile-category-grid {
        grid-template-columns: 1fr !important;                                      /* Defines the grid column layout. */
    }
}

@media (max-width: 640px) {
    .gun-stats-page .profile-grid {
        grid-template-columns: 1fr;                                                 /* Defines the grid column layout. */
    }
}

/* =========================================================
   GUN Stats v0.3.7 profile name case fix
   Keep player names exactly as stored; do not CSS-uppercase
   special characters such as ñ/ø on profile pages.
   ========================================================= */
.gun-stats-page .gun-hero h1.player-profile-name {
    text-transform: none;                                                           /* Changes text casing. */
    letter-spacing: 0.025em;                                                        /* Sets spacing between letters. */
}

/* =========================================================
   GUN Stats v0.3.8+ categorized player profile
   ========================================================= */
.gun-stats-page .profile-overview-grid {
    grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.45fr);             /* Defines the grid column layout. */
}

.gun-stats-page .profile-category-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));                           /* Defines the grid column layout. */
}

.gun-stats-page .stat-category-card h2,
.gun-stats-page .weapon-category-card h3 {
    margin: 0 0 14px;                                                               /* Sets the outside spacing around the element. */
    color: var(--accent-2);                                                         /* Uses the accent text color. */
    font-size: 0.74rem;                                                             /* Sets the heading text size. */
    font-weight: 950;                                                               /* Sets the heading text weight. */
    letter-spacing: 0.18em;                                                         /* Sets spacing between letters. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

.gun-stats-page .profile-summary-line {
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    align-items: stretch;                                                           /* Controls vertical alignment of child items. */
    gap: 14px;                                                                      /* Sets the spacing between flex or grid children. */
    flex-wrap: wrap;                                                                /* Allows flex items to wrap onto new lines. */
}

.gun-stats-page .profile-kpi-pill {
    min-width: 190px;                                                               /* Sets the minimum allowed width. */
    flex: 1 1 190px;                                                                /* Controls how the flex item grows or shrinks. */
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    flex-direction: column;                                                         /* Sets the direction of flex children. */
    align-items: flex-start;                                                        /* Controls vertical alignment of child items. */
    justify-content: center;                                                        /* Controls horizontal distribution of child items. */
    padding: 15px 18px;                                                             /* Sets the inside spacing of the element. */
    color: var(--muted);                                                            /* Uses the muted secondary text color. */
    background: linear-gradient(145deg, rgba(216, 181, 78, 0.105), rgba(255, 255, 255, 0.028)),
        rgba(255, 255, 255, 0.03);                                                  /* Sets the element background. */
    border: 1px solid rgba(216, 181, 78, 0.24);                                     /* Sets the element border. */
    border-radius: 18px;                                                            /* Rounds the element corners. */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);                            /* Adds the element shadow effect. */
}

.gun-stats-page .profile-kpi-pill strong {
    margin-top: 10px;                                                               /* Sets the outside spacing above the element. */
    color: #fff;                                                                    /* Sets the text color. */
    font-size: clamp(1.55rem, 2.4vw, 2.2rem);                                       /* Sets the text size. */
    font-weight: 950;                                                               /* Sets the text thickness. */
    letter-spacing: 0.01em;                                                         /* Sets spacing between letters. */
    line-height: 0.95;                                                              /* Sets the height of each text line. */
}

.gun-stats-page .compact-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));                           /* Defines the grid column layout. */
}

.gun-stats-page .compact-grid.two-col {
    grid-template-columns: repeat(2, minmax(120px, 1fr));                           /* Defines the grid column layout. */
}

.gun-stats-page .compact-grid.four-col {
    grid-template-columns: repeat(4, minmax(110px, 1fr));                           /* Defines the grid column layout. */
}

.gun-stats-page .weapon-category-layout {
    display: grid;                                                                  /* Sets how the element is rendered in the layout. */
    grid-template-columns: repeat(3, minmax(250px, 1fr));                           /* Defines the grid column layout. */
    gap: 18px;                                                                      /* Sets the spacing between flex or grid children. */
    padding: 0 clamp(20px, 2.5vw, 34px) clamp(24px, 2.4vw, 38px);                   /* Sets the inside spacing of the element. */
}

.gun-stats-page .body-location-category-layout {
    grid-template-columns: repeat(4, minmax(220px, 1fr));                           /* Defines the grid column layout. */
}

.gun-stats-page .body-location-category-card .gun-compact-table th:last-child,
.gun-stats-page .body-location-category-card .gun-compact-table td:last-child {
    text-align: right;                                                              /* Sets horizontal text alignment. */
}

.gun-stats-page .weapon-category-layout .board-shell {
    margin: 0;                                                                      /* Sets the outside spacing around the element. */
}

.gun-stats-page .weapon-category-card {
    padding: 16px;                                                                  /* Sets the card or panel inner spacing. */
}

.gun-stats-page .body-location-item {
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    align-items: center;                                                            /* Controls vertical alignment of child items. */
    justify-content: space-between;                                                 /* Controls horizontal distribution of child items. */
    gap: 10px;                                                                      /* Sets the spacing between flex or grid children. */
    padding: 12px 13px;                                                             /* Sets the inside spacing of the element. */
    background: rgba(255, 255, 255, 0.03);                                          /* Sets the element background. */
    border: 1px solid rgba(162, 176, 191, 0.12);                                    /* Sets the element border. */
    border-radius: 12px;                                                            /* Rounds the element corners. */
}

.gun-stats-page .body-location-item span {
    color: var(--muted);                                                            /* Uses the muted secondary text color. */
    font-size: 0.74rem;                                                             /* Sets the text size. */
    font-weight: 850;                                                               /* Sets the text thickness. */
    letter-spacing: 0.05em;                                                         /* Sets spacing between letters. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

.gun-stats-page .body-location-item strong {
    color: #fff;                                                                    /* Sets the text color. */
    font-size: 1rem;                                                                /* Sets the text size. */
    font-weight: var(--number-weight);                                              /* Sets the text thickness. */
}

@media (max-width: 1050px) {
    .gun-stats-page .weapon-category-layout,
    .gun-stats-page .body-location-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));                       /* Defines the grid column layout. */
    }

    .gun-stats-page .compact-grid.four-col {
        grid-template-columns: repeat(2, minmax(120px, 1fr));                       /* Defines the grid column layout. */
    }

    .gun-stats-page[data-gun-player-profile] .profile-player-summary-stats,
    .gun-stats-page[data-gun-player-profile] .compact-grid.four-col.profile-player-summary-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;                /* Defines the grid column layout. */
    }
}

@media (max-width: 700px) {
    .gun-stats-page .profile-overview-grid,
    .gun-stats-page .profile-category-grid,
    .gun-stats-page .weapon-category-layout,
    .gun-stats-page .body-location-grid {
        grid-template-columns: 1fr;                                                 /* Defines the grid column layout. */
    }

    .gun-stats-page .weapon-category-card,
    .gun-stats-page .body-location-category-card {
        min-height: 0;                                                              /* Sets the minimum allowed height. */
    }
}

/* =========================================================
   GUN Stats v0.3.13 table column alignment
   Cleaner, consistent column widths for profile weapon/body tables.
   ========================================================= */
.gun-stats-page .weapon-category-card .gun-compact-table {
    width: 100%;                                                                    /* Sets the element width. */
    table-layout: fixed;                                                            /* Controls table column sizing behavior. */
    border-collapse: collapse;                                                      /* Merges adjacent table borders. */
}

.gun-stats-page .weapon-category-card .gun-compact-table th,
.gun-stats-page .weapon-category-card .gun-compact-table td {
    vertical-align: middle;                                                         /* Aligns table or inline content vertically. */
    white-space: nowrap;                                                            /* Controls text wrapping behavior. */
}

.gun-stats-page .weapon-category-card .gun-compact-table th:first-child,
.gun-stats-page .weapon-category-card .gun-compact-table td:first-child {
    text-align: left;                                                               /* Sets horizontal text alignment. */
    padding-left: 18px;                                                             /* Sets the inside spacing on the left side. */
}

.gun-stats-page .weapon-category-card:not(.body-location-category-card) .gun-compact-table th:nth-child(1),
.gun-stats-page .weapon-category-card:not(.body-location-category-card) .gun-compact-table td:nth-child(1) {
    width: 54% !important;                                                          /* Sets the element width. */
    text-align: left !important;                                                    /* Sets horizontal text alignment. */
}

.gun-stats-page .weapon-category-card:not(.body-location-category-card) .gun-compact-table th:nth-child(2),
.gun-stats-page .weapon-category-card:not(.body-location-category-card) .gun-compact-table td:nth-child(2) {
    width: 20% !important;                                                          /* Sets the element width. */
    text-align: center !important;                                                  /* Sets horizontal text alignment. */
}

.gun-stats-page .weapon-category-card:not(.body-location-category-card) .gun-compact-table th:nth-child(3),
.gun-stats-page .weapon-category-card:not(.body-location-category-card) .gun-compact-table td:nth-child(3) {
    width: 26% !important;                                                          /* Sets the element width. */
    text-align: center !important;                                                  /* Sets horizontal text alignment. */
}

.gun-stats-page .body-location-category-card .gun-compact-table th:nth-child(1),
.gun-stats-page .body-location-category-card .gun-compact-table td:nth-child(1) {
    width: 76% !important;                                                          /* Sets the element width. */
    text-align: left !important;                                                    /* Sets horizontal text alignment. */
}

.gun-stats-page .body-location-category-card .gun-compact-table th:nth-child(2),
.gun-stats-page .body-location-category-card .gun-compact-table td:nth-child(2) {
    width: 24% !important;                                                          /* Sets the element width. */
    text-align: center !important;                                                  /* Sets horizontal text alignment. */
}

.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent {
    font-weight: var(--number-weight);                                              /* Sets the table text weight. */
}

.gun-stats-page .weapon-category-card .gun-compact-table th:nth-child(n+2) {
    letter-spacing: 0.14em;                                                         /* Sets spacing between letters. */
}

/* =========================================================
   GUN Stats v0.3.49 - player profile time/mode filters
   ========================================================= */
.gun-stats-page .gun-player-filter-panel {
    margin-top: -4px;                                                               /* Sets the outside spacing above the element. */
    margin-bottom: 18px;                                                            /* Sets the outside spacing below the element. */
}

.gun-stats-page .profile-category-grid.is-combat-only {
    grid-template-columns: minmax(0, 1fr);                                          /* Defines the grid column layout. */
}

.gun-stats-page .gun-ranking-table .player-cell,
.gun-stats-page .gun-ranking-table .player-meta,
.gun-stats-page .gun-ranking-table .player-meta a {
    min-width: 0;                                                                   /* Sets the minimum allowed width. */
}

.gun-stats-page .gun-ranking-table .player-meta a {
    display: block;                                                                 /* Sets how the element is rendered in the layout. */
    overflow: hidden;                                                               /* Controls content that exceeds the element box. */
    text-overflow: ellipsis;                                                        /* Controls how clipped text is indicated. */
    white-space: nowrap;                                                            /* Controls text wrapping behavior. */
}

/* =========================================================
   GUN Stats v0.3.69 - player profile compact layout
   Keeps the plugin at v0.3.69, but applies the compact v69 stack to player pages.
   ========================================================= */
.gun-stats-page[data-gun-player-profile] .gun-player-profile-mini-header {
    margin: 0 clamp(20px, 2.5vw, 34px) 6px !important;                              /* Sets the outside spacing around the element. */
    padding-top: clamp(16px, 1.8vw, 24px) !important;                               /* Sets the inside spacing at the top. */
    padding-bottom: 0 !important;                                                   /* Sets the inside spacing at the bottom. */
    display: flex !important;                                                       /* Sets how the element is rendered in the layout. */
    align-items: center !important;                                                 /* Controls vertical alignment of child items. */
    justify-content: space-between !important;                                      /* Controls horizontal distribution of child items. */
    gap: 14px !important;                                                           /* Sets the spacing between flex or grid children. */
    flex-wrap: wrap !important;                                                     /* Allows flex items to wrap onto new lines. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-profile-mini-header span {
    color: var(--accent-2);                                                         /* Uses the accent text color. */
    font-size: 0.76rem;                                                             /* Sets the text size. */
    font-weight: 950;                                                               /* Sets the text thickness. */
    letter-spacing: 0.22em;                                                         /* Sets spacing between letters. */
    line-height: 1;                                                                 /* Sets the height of each text line. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-profile-mini-header .gun-back-link {
    color: var(--muted);                                                            /* Uses the muted secondary text color. */
    font-size: 0.76rem;                                                             /* Sets the text size. */
    font-weight: 900;                                                               /* Sets the text thickness. */
    letter-spacing: 0.08em;                                                         /* Sets spacing between letters. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-profile-mini-header .gun-back-link:hover {
    color: #fff;                                                                    /* Sets the active or hover text color. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-profile-heading {
    margin: 0 clamp(20px, 2.5vw, 34px) 0 !important;                                /* Sets the outside spacing around the element. */
    padding: 12px 14px !important;                                                  /* Sets the inside spacing of the element. */
    background: rgba(10, 15, 22, 0.78);                                             /* Sets the element background. */
    border: 1px solid var(--line);                                                  /* Sets the element border. */
    border-radius: 16px;                                                            /* Rounds the element corners. */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);                           /* Adds the element shadow effect. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-profile-title {
    margin: 0 !important;                                                           /* Sets the outside spacing around the element. */
    gap: 12px !important;                                                           /* Sets the spacing between flex or grid children. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-profile-title .avatar {
    width: 38px !important;                                                         /* Sets the width for the icon or logo. */
    height: 38px !important;                                                        /* Sets the height for the icon or logo. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-heading-label {
    display: block;                                                                 /* Sets how the element is rendered in the layout. */
    margin: 0 0 3px;                                                                /* Sets the outside spacing around the element. */
    color: var(--muted);                                                            /* Uses the muted secondary text color. */
    font-size: 0.68rem;                                                             /* Sets the heading text size. */
    font-weight: 950;                                                               /* Sets the heading text weight. */
    letter-spacing: 0.16em;                                                         /* Sets spacing between letters. */
    line-height: 1;                                                                 /* Sets the height of each text line. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

.gun-stats-page[data-gun-player-profile] .player-profile-name {
    margin: 0 !important;                                                           /* Sets the outside spacing around the element. */
    color: #fff;                                                                    /* Sets the text color. */
    font-size: clamp(1.2rem, 2.1vw, 1.75rem) !important;                            /* Sets the text size. */
    font-weight: 950;                                                               /* Sets the text thickness. */
    letter-spacing: 0.01em !important;                                              /* Sets spacing between letters. */
    line-height: 1.1 !important;                                                    /* Sets the height of each text line. */
    text-transform: none !important;                                                /* Changes text casing. */
    text-shadow: none !important;                                                   /* Adds a shadow or glow to text. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-filter-panel {
    margin: 6px clamp(20px, 2.5vw, 34px) 0 !important;                              /* Sets the outside spacing around the element. */
    padding: 10px 14px !important;                                                  /* Sets the card or panel inner spacing. */
    display: flex !important;                                                       /* Sets how the element is rendered in the layout. */
    align-items: center !important;                                                 /* Controls vertical alignment of child items. */
    justify-content: space-between !important;                                      /* Controls horizontal distribution of child items. */
    gap: 14px !important;                                                           /* Sets the spacing between flex or grid children. */
    flex-wrap: wrap !important;                                                     /* Allows flex items to wrap onto new lines. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-filter-panel .gun-stats-filter-row {
    display: flex !important;                                                       /* Sets how the element is rendered in the layout. */
    align-items: center !important;                                                 /* Controls vertical alignment of child items. */
    gap: 12px !important;                                                           /* Sets the spacing between flex or grid children. */
    flex-wrap: wrap !important;                                                     /* Allows flex items to wrap onto new lines. */
}

.gun-stats-page[data-gun-player-profile] .gun-player-filter-panel .gun-stats-filter-row:last-child {
    margin-left: auto !important;                                                   /* Sets the outside spacing on the left side. */
}

.gun-stats-page[data-gun-player-profile] .profile-preview {
    margin: 6px clamp(20px, 2.5vw, 34px) 0 !important;                              /* Sets the outside spacing around the element. */
    padding: 0 !important;                                                          /* Sets the inside spacing of the element. */
    gap: 6px !important;                                                            /* Sets the spacing between flex or grid children. */
}

.gun-stats-page[data-gun-player-profile] .profile-card {
    padding: 14px !important;                                                       /* Sets the card or panel inner spacing. */
}

.gun-stats-page[data-gun-player-profile] .profile-title {
    margin-bottom: 12px;                                                            /* Sets the outside spacing below the element. */
}

.gun-stats-page[data-gun-player-profile] .profile-grid,
.gun-stats-page[data-gun-player-profile] .profile-summary-line {
    gap: 8px !important;                                                            /* Sets spacing between grid items. */
}

.gun-stats-page[data-gun-player-profile] .mini-stat {
    padding: 11px 12px !important;                                                  /* Sets the inside spacing of the element. */
}

.gun-stats-page[data-gun-player-profile] .profile-kpi-pill {
    min-width: 170px !important;                                                    /* Sets the minimum allowed width. */
    padding: 12px 14px !important;                                                  /* Sets the inside spacing of the element. */
    border-radius: 14px !important;                                                 /* Rounds the element corners. */
}

.gun-stats-page[data-gun-player-profile] .weapon-category-layout {
    padding: 0 clamp(20px, 2.5vw, 34px) 0 !important;                               /* Sets the inside spacing of the element. */
    gap: 6px !important;                                                            /* Sets the spacing between flex or grid children. */
    align-items: stretch !important;                                                /* Controls vertical alignment of child items. */
    grid-auto-rows: 1fr !important;                                                 /* Defines automatic grid row sizing. */
}

.gun-stats-page[data-gun-player-profile] .weapon-category-layout .board-shell,
.gun-stats-page[data-gun-player-profile] .profile-table-shell {
    margin: 0 clamp(20px, 2.5vw, 34px) 0 !important;                                /* Sets the outside spacing around the element. */
}

.gun-stats-page[data-gun-player-profile] .weapon-category-layout .board-shell {
    margin: 0 !important;                                                           /* Sets the outside spacing around the element. */
}

@media (max-width: 720px) {
    .gun-stats-page[data-gun-player-profile] .gun-player-filter-panel,
    .gun-stats-page[data-gun-player-profile] .gun-player-filter-panel .gun-stats-filter-row,
    .gun-stats-page[data-gun-player-profile] .gun-player-filter-panel .gun-stats-filter-row:last-child {
        align-items: flex-start !important;                                         /* Controls vertical alignment of child items. */
        flex-direction: column !important;                                          /* Sets the direction of flex children. */
        margin-left: 0 !important;                                                  /* Sets the outside spacing on the left side. */
    }
}

.gun-stats-page .player-meta a,
.gun-stats-page .gun-chat-sender,
.gun-stats-page .gun-chat-recipient,
.gun-stats-page .gun-admin-player-link {
    color: #f8fbff !important;                                                      /* Sets the text color. */
}

.gun-stats-page .player-meta a:hover,
.gun-stats-page .gun-admin-player-link:hover {
    color: var(--accent-2) !important;                                              /* Sets the active or hover text color. */
}

/* Equal height stat cards in every row. */
.gun-stats-page[data-gun-player-profile] .weapon-category-layout,
.gun-stats-page .weapon-category-layout,
.gun-stats-page .body-location-category-layout {
    align-items: stretch !important;                                                /* Controls vertical alignment of child items. */
    grid-auto-rows: 1fr !important;                                                 /* Defines automatic grid row sizing. */
}

.gun-stats-page[data-gun-player-profile] .weapon-category-layout .board-shell,
.gun-stats-page .weapon-category-layout .board-shell,
.gun-stats-page .body-location-category-layout .board-shell,
.gun-stats-page .weapon-category-card,
.gun-stats-page .body-location-category-card {
    height: 100% !important;                                                        /* Sets the element height. */
}

.gun-stats-page .weapon-category-card,
.gun-stats-page .body-location-category-card {
    display: flex !important;                                                       /* Sets how the element is rendered in the layout. */
    flex-direction: column !important;                                              /* Sets the direction of flex children. */
    min-height: 282px;                                                              /* Sets the minimum allowed height. */
}

.gun-stats-page .body-location-category-card {
    min-height: 258px;                                                              /* Sets the minimum allowed height. */
}

.gun-stats-page .weapon-category-card .table-scroll,
.gun-stats-page .body-location-category-card .table-scroll {
    flex: 1 1 auto !important;                                                      /* Controls how the flex item grows or shrinks. */
}

/* Cleaner compact stat table cells and numeric columns. */
.gun-stats-page .weapon-category-card .gun-compact-table,
.gun-stats-page .body-location-category-card .gun-compact-table {
    width: 100% !important;                                                         /* Sets the element width. */
    min-width: 0 !important;                                                        /* Sets the minimum allowed width. */
    table-layout: fixed !important;                                                 /* Controls table column sizing behavior. */
    border-collapse: collapse !important;                                           /* Merges adjacent table borders. */
    border-spacing: 0 !important;                                                   /* Sets spacing between table cells. */
}

.gun-stats-page .weapon-category-card .gun-compact-table th,
.gun-stats-page .weapon-category-card .gun-compact-table td,
.gun-stats-page .body-location-category-card .gun-compact-table th,
.gun-stats-page .body-location-category-card .gun-compact-table td {
    height: 32px;                                                                   /* Sets the element height. */
    padding-top: 0 !important;                                                      /* Sets the inside spacing at the top. */
    padding-bottom: 0 !important;                                                   /* Sets the inside spacing at the bottom. */
    vertical-align: middle !important;                                              /* Aligns table or inline content vertically. */
    border-bottom: 1px solid rgba(148, 163, 184, 0.105) !important;                 /* Sets the table row divider line. */
    background-clip: border-box !important;                                         /* Controls how far the background is painted. */
}

.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent {
    color: #e8b923 !important;                                                      /* Sets the text color. */
    font-family: var(--gun-nav-font) !important;                                    /* Sets the font family stack. */
    font-size: 0.98rem !important;                                                  /* Sets the table text size. */
    font-weight: 800 !important;                                                    /* Sets the table text weight. */
    letter-spacing: 0.06em !important;                                              /* Sets spacing between letters. */
    line-height: 1 !important;                                                      /* Sets the height of each text line. */
}

/* =========================================================
   GUN Stats v0.3.85 - player profile combat bash cleanup
   ========================================================= */
.gun-stats-page .compact-grid.six-col {
    grid-template-columns: repeat(6, minmax(92px, 1fr));                            /* Defines the grid column layout. */
}

@media (max-width: 1100px) {
    .gun-stats-page .compact-grid.six-col {
        grid-template-columns: repeat(3, minmax(110px, 1fr));                       /* Defines the grid column layout. */
    }
}

@media (max-width: 620px) {
    .gun-stats-page .compact-grid.six-col {
        grid-template-columns: repeat(2, minmax(110px, 1fr));                       /* Defines the grid column layout. */
    }

    .gun-stats-page[data-gun-player-profile] .compact-grid.six-col,
    .gun-stats-page[data-gun-player-profile] .compact-grid,
    .gun-stats-page[data-gun-player-profile] .compact-grid.two-col,
    .gun-stats-page[data-gun-player-profile] .compact-grid.four-col {
        grid-template-columns: 1fr !important;                                      /* Defines the grid column layout. */
    }

    .gun-stats-page[data-gun-player-profile] .profile-player-summary-stats,
    .gun-stats-page[data-gun-player-profile] .compact-grid.four-col.profile-player-summary-stats {
        grid-template-columns: 1fr !important;                                      /* Defines the grid column layout. */
    }
}

/* =========================================================
   GUN Stats v0.3.86 - player profile card grid alignment
   ========================================================= */
.gun-stats-page[data-gun-player-profile] .profile-preview.profile-overview-grid,
.gun-stats-page[data-gun-player-profile] .profile-preview.profile-category-grid {
    display: grid !important;                                                       /* Sets how the element is rendered in the layout. */
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;                    /* Defines the grid column layout. */
    align-items: stretch !important;                                                /* Controls vertical alignment of child items. */
    gap: 8px !important;                                                            /* Sets spacing between grid items. */
    width: auto !important;                                                         /* Sets the element width. */
}

.gun-stats-page[data-gun-player-profile] .profile-preview.profile-category-grid.is-combat-only {
    grid-template-columns: minmax(0, 1fr) !important;                               /* Defines the grid column layout. */
}

.gun-stats-page[data-gun-player-profile] .profile-preview > .profile-card,
.gun-stats-page[data-gun-player-profile] .profile-overview-grid > .profile-card,
.gun-stats-page[data-gun-player-profile] .profile-category-grid > .profile-card {
    box-sizing: border-box !important;                                              /* Includes padding and border in element sizing. */
    width: 100% !important;                                                         /* Sets the element width. */
    min-width: 0 !important;                                                        /* Sets the minimum allowed width. */
    height: 100% !important;                                                        /* Sets the element height. */
    margin: 0 !important;                                                           /* Sets the outside spacing around the element. */
}

.gun-stats-page[data-gun-player-profile] .profile-card.stat-category-card,
.gun-stats-page[data-gun-player-profile] .profile-main-card {
    display: flex !important;                                                       /* Sets how the element is rendered in the layout. */
    flex-direction: column !important;                                              /* Sets the direction of flex children. */
}

.gun-stats-page[data-gun-player-profile] .stat-category-card .profile-grid,
.gun-stats-page[data-gun-player-profile] .profile-main-card .profile-summary-line {
    flex: 1 1 auto !important;                                                      /* Controls how the flex item grows or shrinks. */
}

.gun-stats-page[data-gun-player-profile] .profile-main-card .profile-summary-line {
    margin-top: auto !important;                                                    /* Sets the outside spacing above the element. */
}

.gun-stats-page[data-gun-player-profile] .compact-grid,
.gun-stats-page[data-gun-player-profile] .compact-grid.two-col,
.gun-stats-page[data-gun-player-profile] .compact-grid.four-col {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;                    /* Defines the grid column layout. */
}

.gun-stats-page[data-gun-player-profile] .compact-grid.six-col {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;                    /* Defines the grid column layout. */
}

.gun-stats-page[data-gun-player-profile] .mini-stat,
.gun-stats-page[data-gun-player-profile] .profile-kpi-pill {
    box-sizing: border-box !important;                                              /* Includes padding and border in element sizing. */
    min-width: 0 !important;                                                        /* Sets the minimum allowed width. */
}

.gun-stats-page[data-gun-player-profile] .weapon-category-layout .board-shell,
.gun-stats-page[data-gun-player-profile] .profile-table-shell,
.gun-stats-page[data-gun-player-profile] .weapon-category-card,
.gun-stats-page[data-gun-player-profile] .body-location-category-card {
    box-sizing: border-box !important;                                              /* Includes padding and border in element sizing. */
    min-width: 0 !important;                                                        /* Sets the minimum allowed width. */
    width: 100% !important;                                                         /* Sets the element width. */
}

@media (max-width: 1180px) {
    .gun-stats-page[data-gun-player-profile] .compact-grid.six-col {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;                /* Defines the grid column layout. */
    }
}

.gun-stats-page[data-gun-player-profile] .profile-preview.profile-overview-grid.is-single-card {
    grid-template-columns: minmax(0, 1fr) !important;                               /* Defines the grid column layout. */
}

.gun-stats-page[data-gun-player-profile] .profile-player-summary-card {
    gap: 14px !important;                                                           /* Sets the spacing between flex or grid children. */
}

.gun-stats-page[data-gun-player-profile] .profile-player-summary-card .profile-title {
    margin-bottom: 0;                                                               /* Sets the outside spacing below the element. */
}

.gun-stats-page[data-gun-player-profile] .profile-player-summary-card .profile-title > div {
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    flex-direction: column;                                                         /* Sets the direction of flex children. */
    gap: 3px;                                                                       /* Sets the spacing between flex or grid children. */
    min-width: 0;                                                                   /* Sets the minimum allowed width. */
}

.gun-stats-page[data-gun-player-profile] .profile-player-summary-card .profile-title span:not(.avatar) {
    display: block;                                                                 /* Sets how the element is rendered in the layout. */
    color: #7b8799;                                                                 /* Sets the text color. */
    font-size: 0.78rem;                                                             /* Sets the heading text size. */
    font-weight: 650;                                                               /* Sets the heading text weight. */
    letter-spacing: 0.02em;                                                         /* Sets spacing between letters. */
}

.gun-stats-page[data-gun-player-profile] .profile-player-summary-stats,
.gun-stats-page[data-gun-player-profile] .compact-grid.four-col.profile-player-summary-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;                    /* Defines the grid column layout. */
    flex: 0 0 auto !important;                                                      /* Controls how the flex item grows or shrinks. */
}

.gun-stats-page[data-gun-player-profile] .profile-player-summary-stats .mini-stat {
    background: rgba(255, 255, 255, 0.03) !important;                               /* Sets the element background. */
    border-color: rgba(148, 163, 184, 0.14) !important;                             /* Sets the border color. */
    border-radius: 6px !important;                                                  /* Rounds the element corners. */
    box-shadow: none !important;                                                    /* Adds the element shadow effect. */
}

/* ------------------------------------------------------------
   GUN Stats v0.4.14 - player profile insight cards
   ------------------------------------------------------------ */
.gun-stats-page[data-gun-player-profile] .gun-profile-insight-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));                                /* Defines the grid column layout. */
    gap: 10px;                                                                      /* Sets the spacing between grid children. */
}

.gun-stats-page[data-gun-player-profile] .gun-profile-insight-card {
    display: flex;                                                                  /* Sets how the element is rendered in the layout. */
    flex-direction: column;                                                         /* Sets the direction of flex children. */
    align-items: center;                                                            /* Controls horizontal alignment of child items. */
    justify-content: center;                                                        /* Controls vertical alignment of child items. */
    min-height: 128px;                                                              /* Sets the minimum allowed height. */
    text-align: center;                                                             /* Sets horizontal text alignment. */
    gap: 5px;                                                                       /* Sets the spacing between flex children. */
}

.gun-stats-page[data-gun-player-profile] .gun-profile-insight-card-wide {
    grid-column: span 2;                                                            /* Makes the card span two grid columns. */
    min-height: 96px;                                                               /* Sets the minimum allowed height. */
}

.gun-stats-page[data-gun-player-profile] .gun-profile-insight-icon {
    display: inline-flex;                                                           /* Sets how the element is rendered in the layout. */
    align-items: center;                                                            /* Controls vertical alignment of child items. */
    justify-content: center;                                                        /* Controls horizontal alignment of child items. */
    width: 42px;                                                                    /* Sets the element width. */
    height: 42px;                                                                   /* Sets the element height. */
    border-radius: 999px;                                                           /* Rounds the element corners. */
    color: var(--accent-2);                                                         /* Uses the accent text color. */
    background: rgba(216, 181, 78, 0.10);                                           /* Sets the element background. */
    border: 1px solid rgba(216, 181, 78, 0.20);                                     /* Sets the border color. */
    font-size: 1.25rem;                                                             /* Sets the text size. */
}

.gun-stats-page[data-gun-player-profile] .gun-profile-insight-label {
    color: #91a8c6;                                                                 /* Sets the text color. */
    font-size: 0.70rem;                                                             /* Sets the text size. */
    font-weight: 850;                                                               /* Sets the text thickness. */
    letter-spacing: 0.10em;                                                         /* Sets spacing between letters. */
    text-transform: uppercase;                                                      /* Changes text casing. */
}

.gun-stats-page[data-gun-player-profile] .gun-profile-insight-card strong {
    color: var(--accent-2);                                                         /* Uses the accent text color. */
    font-size: 1rem;                                                                /* Sets the text size. */
    line-height: 1.15;                                                              /* Sets the height of each text line. */
    max-width: 100%;                                                                /* Sets the maximum allowed width. */
    overflow: hidden;                                                               /* Clips overflowing content. */
    text-overflow: ellipsis;                                                        /* Adds ellipsis for overflowing text. */
    white-space: nowrap;                                                            /* Controls text wrapping behavior. */
}

.gun-stats-page[data-gun-player-profile] .gun-profile-insight-card span:not(.gun-profile-insight-icon):not(.gun-profile-insight-label) {
    color: var(--muted);                                                            /* Uses the muted secondary text color. */
    font-size: 0.80rem;                                                             /* Sets the text size. */
}

@media (max-width: 1000px) {
    .gun-stats-page[data-gun-player-profile] .gun-profile-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));                            /* Defines the grid column layout. */
    }
}

@media (max-width: 640px) {
    .gun-stats-page[data-gun-player-profile] .gun-profile-insight-grid {
        grid-template-columns: 1fr;                                                  /* Defines the grid column layout. */
    }

    .gun-stats-page[data-gun-player-profile] .gun-profile-insight-card-wide {
        grid-column: auto;                                                          /* Resets the grid placement. */
    }
}

.gun-stats-page .mini-stat strong,
.gun-stats-page .profile-card .mini-stat strong,
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent {
    font-size: 1.10rem !important;                                                  /* Sets the table text size. */
}

.gun-stats-page .mini-stat span,
.gun-stats-page .profile-card .mini-stat span,
.gun-stats-page .gun-kpi-label,
.gun-stats-page .gun-small-label {
    font-size: 0.78rem !important;                                                  /* Sets the text size. */
    line-height: 1.35 !important;                                                   /* Sets the height of each text line. */
}

/* =========================================================
   GUN Stats v0.3.90 - leaderboard polish, player icon and admin login cleanup
   ========================================================= */
/* Compact stat numbers: keep gold, but use normal readable weight. */
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent {
    color: #e8b923 !important;                                                      /* Sets the text color. */
    font-weight: 600 !important;                                                    /* Sets the table text weight. */
    letter-spacing: 0 !important;                                                   /* Sets spacing between letters. */
    text-shadow: none !important;                                                   /* Adds a shadow or glow to text. */
    background: transparent !important;                                             /* Sets the card or panel background. */
    border-bottom: 1px solid rgba(148, 163, 184, 0.13) !important;                  /* Sets the table row divider line. */
}

.gun-stats-page .gun-ranking-table .player-cell.no-avatar .player-meta {
    gap: 0 !important;                                                              /* Sets spacing between navigation items. */
}

/* Compact tables: clearer body text, stronger row separation and less visual noise. */
.gun-stats-page .weapon-category-card .gun-compact-table,
.gun-stats-page .body-location-category-card .gun-compact-table {
    color: #d6e1ee !important;                                                      /* Sets the text color. */
}

.gun-stats-page .weapon-category-card .gun-compact-table th,
.gun-stats-page .body-location-category-card .gun-compact-table th {
    color: #91a8c6 !important;                                                      /* Sets the text color. */
    border-bottom-color: rgba(148, 163, 184, 0.18) !important;                      /* Sets the bottom border color. */
    text-shadow: none !important;                                                   /* Adds a shadow or glow to text. */
}

.gun-stats-page .weapon-category-card .gun-compact-table td,
.gun-stats-page .body-location-category-card .gun-compact-table td {
    color: #c6d1df !important;                                                      /* Sets the text color. */
    border-bottom-color: rgba(148, 163, 184, 0.14) !important;                      /* Sets the bottom border color. */
}

.gun-stats-page .weapon-category-card .gun-compact-table tbody tr:nth-child(even),
.gun-stats-page .body-location-category-card .gun-compact-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.022) !important;                              /* Sets the card or panel background. */
}

.gun-stats-page .weapon-category-card .gun-compact-table tbody tr:hover,
.gun-stats-page .body-location-category-card .gun-compact-table tbody tr:hover {
    background: rgba(232, 185, 35, 0.06) !important;                               /* Sets the active or hover background. */
}

/* Main fix: numeric stat values stay gold, but become easier to read. */
.gun-stats-page .num-accent,
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent,
.gun-stats-page .gun-ranking-table td.num-accent {
    color: var(--stat-gold) !important;                                        /* Sets the text color. */
    font-family: var(--gun-ui-font) !important;                                     /* Sets the font family stack. */
    font-size: 13px !important;                                                     /* Sets the table text size. */
    font-weight: 650 !important;                                                    /* Sets the table text weight. */
    letter-spacing: 0.01em !important;                                              /* Sets spacing between letters. */
    line-height: 1.2 !important;                                                    /* Sets the height of each text line. */
    text-align: center !important;                                                  /* Sets horizontal text alignment. */
    text-shadow: none !important;                                                   /* Adds a shadow or glow to text. */
    font-variant-numeric: tabular-nums lining-nums;                                 /* Improves numeric alignment and readability. */
    -webkit-font-smoothing: antialiased;                                            /* Improves font rendering in WebKit browsers. */
    text-rendering: geometricPrecision;                                             /* Hints how the browser should render text. */
}

/* Real values should attract attention; zeros should not look as important as actual stats. */
.gun-stats-page .num-accent.has-value,
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent.has-value,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent.has-value,
.gun-stats-page .gun-ranking-table td.num-accent.has-value {
    color: var(--stat-gold-strong) !important;                                 /* Sets the text color. */
    font-weight: 650 !important;                                                    /* Sets the table text weight. */
}

.gun-stats-page .num-accent.is-zero,
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent.is-zero,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent.is-zero,
.gun-stats-page .gun-ranking-table td.num-accent.is-zero {
    color: var(--stat-zero) !important;                                             /* Sets the text color. */
    font-weight: 500 !important;                                                    /* Sets the table text weight. */
    opacity: 0.82 !important;                                                       /* Sets the element transparency. */
}

/* Do not let older compact-table rules make the values too large again. */
.gun-stats-page .mini-stat strong,
.gun-stats-page .profile-card .mini-stat strong {
    text-shadow: none !important;                                                   /* Adds a shadow or glow to text. */
}

/* Numeric stat values: still gold, but deliberately less fluorescent. */
.gun-stats-page .num-accent,
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent,
.gun-stats-page .gun-ranking-table td.num-accent,
.gun-stats-page .mini-stat strong,
.gun-stats-page .profile-card .mini-stat strong {
    color: var(--stat-gold) !important;                                        /* Sets the text color. */
    background: transparent !important;                                             /* Sets the card or panel background. */
    border-color: transparent !important;                                           /* Sets the border color. */
    box-shadow: none !important;                                                    /* Adds the element shadow effect. */
    text-shadow: none !important;                                                   /* Adds a shadow or glow to text. */
}

.gun-stats-page .num-accent.has-value,
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent.has-value,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent.has-value,
.gun-stats-page .gun-ranking-table td.num-accent.has-value {
    color: var(--stat-gold-strong) !important;                                 /* Sets the text color. */
    font-weight: 600 !important;                                                    /* Sets the table text weight. */
}

/* =========================================================
   GUN Stats v0.3.93 - compact stat table numeric cell borders
   ---------------------------------------------------------
   v0.3.92 muted the numeric cells with border-color: transparent,
   which also made the Kills/Headshots row separators disappear.
   Restore the bottom separator specifically while keeping the
   muted gold color palette.
   ========================================================= */
.gun-stats-page .weapon-category-card .gun-compact-table td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table td.num-accent,
.gun-stats-page .gun-ranking-table td.num-accent {
    border-top-color: transparent !important;                                       /* Sets the top border color. */
    border-right-color: transparent !important;                                     /* Sets the right border color. */
    border-left-color: transparent !important;                                      /* Sets the left border color. */
    border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;                  /* Sets the table row divider line. */
}

.gun-stats-page .weapon-category-card .gun-compact-table tbody tr:last-child td.num-accent,
.gun-stats-page .body-location-category-card .gun-compact-table tbody tr:last-child td.num-accent {
    border-bottom-color: rgba(148, 163, 184, 0.14) !important;                      /* Sets the bottom border color. */
}
