/**
 * Copyright (C) 2026 Pascal 'JamesDaRock' Neumann
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * This file is part of GunGame AMXX 3++ - pur3gaming Edition.
 *
 * See LICENSE for the full license text.
 */
/* Portal shell and responsive navigation */
body.portal{background:#101216;color:#edf0f5;min-height:100vh;--gold:#ff9e43;--panel:#1b1e25;--line:#30343e}
.portal-sidebar{position:fixed;inset:0 auto 0 0;width:235px;background:#17191f;border-right:1px solid #30343e;padding:28px 18px;display:flex;flex-direction:column;gap:24px;overflow:auto}
.portal-brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none;font-weight:850;letter-spacing:1px}.portal-brand img{width:45px;height:45px;object-fit:contain}.portal-brand b{color:#ff9e43}.portal-brand small{display:block;font-size:10px;letter-spacing:0;font-weight:400}
.portal-sidebar nav{display:grid;gap:5px}.portal-sidebar nav a{display:block;padding:13px 15px;border-radius:8px;color:#aab1bf;text-decoration:none;font-weight:600}.portal-sidebar nav a:hover,.portal-sidebar nav a[aria-current=page]{background:#30251e;color:#ffad60}.portal-languages{margin-top:auto;display:flex;gap:12px}.portal-languages a{color:#aab1bf}.portal-languages a[aria-current=true]{color:#ff9e43}
.portal-main{margin-left:235px;padding:28px clamp(18px,4vw,55px);max-width:1700px;min-width:0}.portal-top{display:flex;justify-content:space-between;gap:12px;color:#aab1bf;font-size:12px;letter-spacing:1px;border-bottom:1px solid #30343e;padding-bottom:18px;margin-bottom:28px}.portal h1{font-size:clamp(28px,4vw,46px);letter-spacing:-1.5px;margin-bottom:24px}.portal .overview-title{display:block}.portal .stats article,.portal .panel,.portal .filters,.portal .podium-card,.portal .server-card{background:#1b1e25;border-color:#30343e;border-radius:12px}.portal .stats article{border-top:2px solid #ff9e43}.portal .accent,.portal .stat-icon,.portal .winner,.portal a:hover{color:#ff9e43}.portal input,.portal select,.portal .profile-grid div{background:#121419;border-color:#363b46}.portal button{background:#ff9e43;color:#17191f}.portal td,.portal th{border-color:#30343e}.portal tbody tr:hover{background:#242832}.portal .podium-card{min-height:150px}.portal .section-title a,.portal .pagination a{color:#ff9e43}.portal a:focus-visible{outline:2px solid #ff9e43;outline-offset:3px}
@media(max-width:850px){.portal-sidebar{position:static;width:auto;padding:16px;gap:12px;border-right:0;border-bottom:1px solid #30343e}.portal-sidebar nav{display:flex;flex-wrap:wrap;gap:4px}.portal-sidebar nav a{padding:9px 11px}.portal-main{margin:0;padding:20px 14px}.portal-languages{margin:0}.portal-sidebar>small{display:none}}

/* Live server rows and expandable public player information. */
.portal .server-grid { grid-template-columns: minmax(0,1fr); }
.portal .server-card { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); align-items:center; }
.portal .server-map-tile img,.portal .server-map-placeholder { height:110px; }
.server-player-list { grid-column:1/-1; border-top:1px solid #30343e; padding-top:12px; min-width:0; }
.server-player-list summary { cursor:pointer; color:#ffb454; padding:5px 0; }
.server-player-list .table-scroll { margin-top:12px; }
/* Compact latest-match summaries. */
.latest-matches { margin:28px 0; }
.match-card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr)); gap:16px; }
.match-summary-card { margin:0; display:flex; flex-direction:column; gap:14px; }
.match-summary-body { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:14px; align-items:start; }
.match-summary-body img { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; }
.match-summary-facts { display:flex; flex-direction:column; gap:5px; overflow-wrap:anywhere; }
.match-summary-facts small,.match-winners small { color:#aab1bf; }
.match-winners { display:flex; align-items:center; gap:14px; padding:12px; border:1px solid #665033; border-radius:8px; background:#29251d; }
.match-winners i { color:#ffb454; font-size:26px; }
.match-winners div { display:flex; flex-direction:column; gap:4px; min-width:0; overflow-wrap:anywhere; }
.match-detail-link { margin-top:auto; align-self:flex-end; color:#ffb454; }
@media(max-width:1050px) { .portal .server-card { display:flex; } }
@media(max-width:600px) { .portal .server-map-tile img,.portal .server-map-placeholder { height:72px; } .match-summary-body { grid-template-columns:1fr; } }

/* Sticky horizontal navigation and shared map thumbnail proportions. */
body.portal { background:radial-gradient(ellipse at 90% -10%,#223348 0%,transparent 45%),#0b111b; --gold:#ffb454; --panel:#151f2e; --line:#2b3a4d; }
.portal-header { position:sticky; top:0; z-index:100; margin:0; background:#0d1622; border-bottom:1px solid var(--line); box-shadow:0 4px 18px #0003; }
.portal-header-inner { max-width:1700px; margin:auto; padding:14px clamp(14px,3vw,34px); display:flex; align-items:center; gap:20px; flex-wrap:wrap; }
.portal-header .brand { margin-right:auto; flex-shrink:0; }
.portal-navigation { display:flex; align-items:center; gap:clamp(10px,1.5vw,24px); flex-wrap:wrap; }
.portal-navigation a { color:#91a9c2; text-decoration:none; font-size:13px; font-weight:650; padding:8px 0; border-bottom:2px solid transparent; }
.portal-navigation a[aria-current=page] { color:var(--gold); border-bottom-color:var(--gold); }
.portal-language { display:flex; align-items:center; gap:8px; }
.portal-language select { width:auto; padding:7px; font-size:12px; }
.portal-main { margin:0 auto; padding:24px clamp(14px,3vw,34px); }
.portal .stats article,.portal .panel,.portal .filters,.portal .podium-card,.portal .server-card { background:#151f2e; border-color:#2b3a4d; }
.portal .podium-card.place-1 { border-top-color:var(--gold); }
.portal .podium-card.place-2 { border-top-color:#aebdce; }
.portal .podium-card.place-3 { border-top-color:#bd8a64; }
.portal .server-grid { grid-template-columns:minmax(0,1fr); }
.portal .server-map-tile img,.portal .server-map-placeholder,.portal .match-summary-body img { width:100%; max-width:240px; height:auto; aspect-ratio:12/7; object-fit:contain; justify-self:center; background:#0b111b; }
.portal .match-summary-body { grid-template-columns:minmax(0,240px) minmax(0,1fr); }
.portal .match-card-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,480px),1fr)); }
.portal .back-to-top { position:fixed; bottom:22px; right:22px; z-index:90; width:46px; height:46px; padding:0; font-size:24px; background:var(--gold); color:#101720; box-shadow:0 4px 16px #0005; }
.portal .back-to-top[hidden] { display:none; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
html { scroll-padding-top:var(--portal-header-height,100px); }
@media(max-width:850px) { .portal-header-inner { gap:8px 14px; padding:8px 14px; } .portal-navigation { order:3; width:100%; flex-wrap:nowrap; overflow-x:auto; white-space:nowrap; } .portal-header .brandmark { width:145px; height:40px; } }
@media(max-width:480px) { .portal-header .brand { gap:5px; font-size:14px; } .portal-header .brandmark { width:105px; } .portal-language select { max-width:110px; } .portal .match-summary-body { grid-template-columns:1fr; } }

/* ==========================================================================
 * Latest match cards and project footer
 * ========================================================================== */
.portal .match-card-grid { grid-template-columns: minmax(0, 1fr); }
.portal .match-summary-card { gap: 16px; }
.portal .match-summary-card .section-title { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.portal .match-summary-card .section-title strong { overflow-wrap: anywhere; min-width: 0; }
.portal .match-mode { background: #202e3d; color: #b7c8da; border-radius: 5px; padding: 3px 10px; font-size: 11px; text-transform: uppercase; }
.portal .match-summary-body { grid-template-columns: minmax(0, 240px) minmax(0, 1fr) minmax(140px, 24%); align-items: center; gap: clamp(16px, 3vw, 36px); }
.match-map { margin: 0; min-width: 0; }
.match-map img { display: block; }
.match-map figcaption { margin-top: 6px; font-weight: 700; overflow-wrap: anywhere; }
.portal .match-summary-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.match-summary-facts dt { color: #91a2b8; font-size: 12px; margin-bottom: 4px; }
.match-summary-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.match-summary-facts .match-metric { font-size: clamp(18px, 2vw, 25px); font-variant-numeric: tabular-nums; }
.portal .match-winners { background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 8px 12px; min-height: 120px; flex-direction: column; justify-content: center; text-align: center; gap: 8px; }
.match-trophy { width: 42px; height: 42px; color: var(--gold); flex-shrink: 0; }
.portal .match-winners a, .portal .match-winners strong { color: var(--gold); font-size: 20px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.portal .match-winners a:hover { text-decoration: underline; }
.match-summary-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap; }
.match-completed { display: inline-flex; align-items: center; gap: 6px; color: #91a2b8; font-size: 12px; }
.match-completed svg { width: 16px; height: 16px; color: #69c891; }
.portal .match-detail-link { margin: 0 0 0 auto; padding: 7px 12px; border-radius: 6px; background: #202e3d; color: var(--gold); text-decoration: none; font-size: 13px; }
.portal .match-detail-link:hover { background: #2b3a4d; }
.portal-footer { color: #91a2b8; }
.portal-footer .footer-project { color: #e8eef8; font-weight: 700; }
.portal-footer .footer-links a { color: var(--gold); text-decoration: none; }
.portal-footer .footer-links a:hover { text-decoration: underline; }
@media (max-width: 800px) {
    .portal .match-summary-body { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
    .portal .match-winners { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); min-height: 0; flex-direction: row; }
}
@media (max-width: 520px) {
    .portal .match-summary-body { grid-template-columns: minmax(0, 1fr); }
    .match-map { justify-self: center; text-align: center; }
    .portal .match-summary-facts { gap: 12px; }
}

/* ========================================================================== 
 * Responsive server cards and compact team-aware match results.
 * ========================================================================== */
.portal .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal .server-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.portal .server-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal .server-card, .portal .server-card:only-child { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; gap: 12px 24px; }
.server-card-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.server-card-heading h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.server-map-column { min-width: 0; display: grid; gap: 12px; }
.portal .server-map-tile img, .portal .server-card:only-child .server-map-tile img, .portal .server-card:only-child .server-map-placeholder { height: auto; aspect-ratio: 12 / 7; }
.server-map-column .server-actions { justify-content: flex-end; }
.portal .match-summary-card { padding: 16px; gap: 10px; }
.portal .match-summary-body { gap: 18px; grid-template-columns: minmax(0, 240px) minmax(0, 1fr) minmax(150px, 24%); }
.portal .match-summary-footer { padding-top: 8px; }
.match-team-list { border-top: 1px solid var(--line); padding-top: 8px; }
.match-team-list summary { cursor: pointer; color: var(--gold); }
.match-team-members { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; padding-top: 10px; }
.match-team-members a { background: #202e3d; padding: 8px; border-radius: 5px; color: var(--gold); overflow-wrap: anywhere; text-decoration: none; }
.portal .team-name.team-1 { color: #e78b8b; }
.portal .team-name.team-2 { color: #8ab9f5; }
.overview-mode { display: flex; gap: 8px; margin-bottom: 12px; }
.overview-mode a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 6px; color: #aab9ca; text-decoration: none; }
.overview-mode a[aria-current=page] { color: var(--gold); border-color: var(--gold); }
@media (max-width: 800px) {
    .portal .server-card, .portal .server-card:only-child { grid-template-columns: minmax(0, 1fr); }
    .portal .match-summary-body { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
}
@media (max-width: 520px) { .portal .match-summary-body { grid-template-columns: minmax(0, 1fr); } }

/* Two server cards on desktop; keep equal map sizes within each card. */
.portal .server-grid:not(:has(> :only-child)) .server-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 12px; }
.portal .server-maps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.portal .server-map-tile { grid-template-rows: minmax(30px, auto) auto auto; }
@media (max-width: 1100px) {
    .portal .server-grid, .portal .server-grid:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
    .portal .server-grid:not(:has(> :only-child)) .server-card { grid-template-columns: minmax(0, 1fr); }
}

/* Full-width server content with compact pill actions and centered countdown. */
.portal .server-card, .portal .server-card:only-child,
.portal .server-grid:not(:has(> :only-child)) .server-card {
    display:grid; grid-template-columns:minmax(0,1fr); align-content:start; align-items:start; gap:10px;
}
.portal .server-card-heading { grid-column:1; }
.portal .server-status-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; }
.portal .server-status-row .server-actions { display:flex; flex-wrap:wrap; gap:6px; }
.portal .server-status-row .server-action { background:#0b111b; padding:4px 10px; border-radius:20px; font-size:12px; font-weight:700; }
.portal .server-status-row a.server-action:hover { background:#263341; }
.portal .server-address-row { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:6px; }
.portal .server-address-row .server-countdown { grid-column:2; color:var(--gold); text-align:center; font-variant-numeric:tabular-nums; }
.portal .server-card .server-progress { width:100%; margin:0; }
.portal .server-card .server-map-column { display:block; min-width:0; }
.portal .server-card .server-maps { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.portal .server-card .server-map-tile { grid-template-rows:auto auto auto; gap:5px; }
.portal .server-card .server-map-tile img, .portal .server-card .server-map-placeholder { width:100%; max-width:240px; height:auto; aspect-ratio:12/7; object-fit:contain; }
@media(max-width:420px) { .portal .server-address-row { grid-template-columns:1fr auto; } }

.portal .server-live-mode { grid-column:3; grid-row:1; text-align:right; color:var(--gold); font-weight:600; }
.portal .server-rule-panel { grid-column:1 / -1; }
@media(max-width:420px) { .portal .server-live-mode { grid-column:2; grid-row:2; } }

/* Preview 13: compact full-row cards for a single server or an odd final server. */
.portal .server-grid .server-card-wide { grid-column:1 / -1; }
.portal .server-card-wide .server-address-row { grid-template-columns:minmax(0,1fr) auto; }
.portal .server-card-wide .server-live-mode { grid-column:2; grid-row:1; }
.portal .server-card-wide .server-map-column .server-countdown { display:block; text-align:center; color:var(--gold); margin-top:8px; font-variant-numeric:tabular-nums; }
@media (min-width:1101px) {
    .portal .server-grid .server-card-wide:not(.server-card-offline) {
        grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);
        column-gap:24px;
    }
    .portal .server-card-wide .server-card-heading { grid-column:1 / -1; }
    .portal .server-card-wide .server-status-row { grid-column:1; grid-row:2; }
    .portal .server-card-wide .server-body { grid-column:1; grid-row:3; }
    .portal .server-card-wide .server-facts { grid-column:1; grid-row:4; }
    .portal .server-card-wide .server-progress { grid-column:1; grid-row:5; }
    .portal .server-card-wide .server-map-column { grid-column:2; grid-row:2 / 6; align-self:center; }
    .portal .server-card-wide .server-player-list { grid-column:1 / -1; grid-row:6; }
}

/* Preview 14: centered metadata block with shared left alignment. */
.portal .server-card .server-address-row { grid-template-columns: minmax(0,1fr) minmax(0,auto) minmax(0,1fr); align-items:start; }
.portal .server-identity, .portal .server-live-info { display:grid; gap:6px; min-width:0; text-align:left; }
.portal .server-live-info { grid-column:2; }
.portal .server-address-row .server-countdown { grid-column:auto; text-align:left; min-height:1em; }
.portal .server-live-info .server-live-mode { color:var(--gold); font-weight:600; }
@media(max-width:520px) {
    .portal .server-card .server-address-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
    .portal .server-live-info { overflow-wrap:anywhere; }
}

/* Preview 15: align metadata with population columns and refine player toggle. */
.portal .server-card .server-address-row { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.portal .server-card .server-live-info { grid-column:2 / -1; overflow-wrap:anywhere; }
.portal .server-card .server-identity { overflow-wrap:anywhere; }
.portal .server-card .server-progress { appearance:none; -webkit-appearance:none; height:6px; border:0; border-radius:999px; overflow:hidden; background:#344454; }
.portal .server-progress::-webkit-progress-bar { background:#344454; border-radius:999px; }
.portal .server-progress::-webkit-progress-value { background:var(--gold); border-radius:999px; }
.portal .server-progress::-moz-progress-bar { background:var(--gold); border-radius:999px; }
.portal .server-player-list summary { display:flex; align-items:center; gap:8px; list-style:none; border-radius:4px; }
.portal .server-player-list summary::-webkit-details-marker { display:none; }
.portal .server-player-list summary::marker { content:''; }
.portal .server-player-list summary svg { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.portal .server-player-chevron { margin-left:auto; }
.portal .server-player-list[open] .server-player-chevron { transform:rotate(180deg); }
.portal .server-player-list summary:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
@media(max-width:420px) {
    .portal .server-card .server-address-row { grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); }
    .portal .server-card .server-live-info { grid-column:2; }
}

/* Match history: independent filters and compact chronological results. */
.portal .match-history { margin-top: 24px; }
.portal .history-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end; margin:0 0 20px; }
.portal .history-filters label { min-width:0; }
.portal .history-filters input,.portal .history-filters select { width:100%; min-width:0; }
.history-pagination { display:flex; justify-content:center; align-items:center; gap:20px; margin-top:18px; }
@media(max-width:700px) { .portal .history-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:420px) { .portal .history-filters { grid-template-columns:1fr; } }
/* Preview 17: shared match results and compact history controls. */
.portal .history-filters { padding:12px; gap:10px; }
.portal .history-actions { grid-column:1/-1; display:flex; align-items:end; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.portal .history-actions label { width:auto; }
.portal .history-actions button { width:auto; min-width:100px; }
.portal .match-team-list summary { display:flex; align-items:center; gap:8px; list-style:none; }
.portal .match-team-list summary::-webkit-details-marker { display:none; }
.portal .match-team-list summary::marker { content:''; }
.portal .match-team-list summary svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.portal .match-chevron { margin-left:auto; }
.portal .match-team-list[open] .match-chevron { transform:rotate(180deg); }
.portal .match-team-list summary:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
.portal .match-result-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:12px; }
.portal .match-result-groups > :only-child { grid-column:1/-1; }
.portal .match-result-team { min-width:0; border:1px solid var(--line); border-radius:8px; padding:10px; }
.portal .team-panel-1 { border-color:#784347; }
.portal .team-panel-2 { border-color:#365777; }
.portal .match-results { margin-top:24px; }
.portal .match-results h2 { margin-bottom:16px; }
.portal .match-result-team h3 { margin:0 0 8px; }
.portal .match-result-team td,.portal .match-result-team th { padding:10px 8px; }
.portal .match-result-team a { color:#9abbd2; overflow-wrap:anywhere; }
.portal .match-winning-row a,.portal .solo-winner { color:var(--gold); font-weight:600; }
.portal .match-winning-row { background:#202b38; }
@media(max-width:1000px) { .portal .match-result-groups { grid-template-columns:1fr; } }

/* Preview 18: match-only layout refinements; keep live server cards unchanged. */
.portal .portal-page-title { display:block; }
.portal .history-actions > label { flex:0 1 145px; width:145px; min-width:0; }
.portal .history-actions > div { display:flex; align-items:stretch; gap:8px; flex-wrap:wrap; }
.portal .history-actions .match-detail-link,.portal .history-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; margin:0; align-self:stretch; }
.portal .history-filters .search { min-width:0; }
.portal .history-table table { table-layout:fixed; white-space:normal; }
.portal .history-table th,.portal .history-table td { padding:12px 8px; overflow-wrap:anywhere; }
.portal .history-table th { letter-spacing:0; }
.portal .history-table td:nth-child(6),.portal .history-table td:nth-child(7),.portal .history-table th:nth-child(6),.portal .history-table th:nth-child(7),.portal .history-table td:last-child,.portal .history-table th:last-child { text-align:center; }
.portal .history-table .match-detail-link { display:inline-block; padding:7px 5px; font-size:12px; }
.portal .match-solo-results .match-result-team { border:0; padding:0; }
.portal .match-result-team table { white-space:normal; }
.portal .match-result-team th,.portal .match-result-team td { text-align:center; overflow-wrap:anywhere; }
.portal .match-solo-results th:nth-child(2),.portal .match-solo-results td:nth-child(2),.portal .match-result-groups .match-result-team th:first-child,.portal .match-result-groups .match-result-team td:first-child { text-align:left; }
.portal .match-result-team a { text-decoration:none; }
.portal .match-result-team a:hover { text-decoration:underline; }
.portal .match-winning-row,.portal .match-winning-row:hover { background:#ffad5810; }
.portal .match-rank-trophy { width:16px; height:16px; color:var(--gold); vertical-align:-3px; margin-right:5px; }
.portal .match-solo-members { grid-template-columns:repeat(4,minmax(0,1fr)); }
.portal .match-solo-members a { color:#b9cfdf; border:1px solid transparent; }
.portal .match-solo-members .match-member-winner { color:var(--gold); border-color:#ffad5880; background:#ffad5810; font-weight:700; }
.portal .match-team-list summary { border-radius:6px; padding:5px 2px; }
.portal .match-team-list summary:focus:not(:focus-visible) { outline:none; }
.portal .match-team-list summary:focus-visible { outline:2px solid #ffad58a0; outline-offset:2px; }
@media(max-width:1000px) { .portal .history-table table { min-width:950px; } }
@media(max-width:700px) { .portal .match-solo-members { grid-template-columns:repeat(2,minmax(0,1fr)); } .portal .match-result-team table { min-width:480px; } }
@media(max-width:420px) { .portal .match-solo-members { grid-template-columns:1fr; } }

/* Hall of Fame: compact text rankings, independent card heights. */
.portal .hall-filters label { min-width:0; flex:1; }
.portal .hall-filters select { width:100%; }
.portal .hall-section { margin:28px 0; }
.portal .hall-highlights,.portal .hall-grid { display:grid; gap:16px; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; }
.portal .hall-highlight,.portal .hall-list { min-width:0; margin:0; padding:16px; }
.portal .hall-highlight { display:flex; flex-direction:column; gap:8px; border-top:3px solid #ffad58; }
.portal .hall-highlight h3,.portal .hall-list h3 { margin:0 0 8px; font-size:1.05rem; }
.portal .hall-highlight strong { font-size:2rem; color:#ffad58; }
.portal .hall-icon { color:#ffad58; display:inline-flex; vertical-align:middle; flex-shrink:0; }
.portal .hall-list h3 { display:flex; align-items:center; gap:9px; }
.portal .hall-list ol { list-style:none; padding:0; margin:0; }
.portal .hall-list li { display:grid; grid-template-columns:22px minmax(0,1fr) auto; align-items:center; gap:7px; padding:7px 0; border-bottom:1px solid #283745; }
.portal .hall-list li:last-child { border-bottom:0; }
.portal .hall-rank { color:#91a9bc; font-weight:700; text-align:center; }
.portal .hall-rank-1 { color:#ffbf60; }.portal .hall-rank-2 { color:#c0cbd6; }.portal .hall-rank-3 { color:#cd956d; }
.portal .hall-name,.portal .hall-highlight a { overflow-wrap:anywhere; }
.portal .hall-list a,.portal .hall-highlight a { color:inherit; text-decoration:none; font-weight:600; }
.portal .hall-list a:hover,.portal .hall-highlight a:hover { color:#ffad58; text-decoration:underline; }
.portal .hall-list small,.portal .hall-highlight small { display:block; font-size:.75rem; color:#91a9bc; margin-top:3px; overflow-wrap:anywhere; }
.portal .hall-value { color:#ffad58; font-weight:700; text-align:right; font-variant-numeric:tabular-nums; }
.portal .hall-note { font-size:.85rem; margin:10px 0; }
.portal .hall-page-title { font-size:clamp(24px,3vw,32px); }
@media (max-width:1199px) {
    .portal .hall-grid,.portal .hall-highlights { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .portal .hall-grid > :last-child:nth-child(odd),.portal .hall-highlights > :last-child:nth-child(odd) { grid-column:1 / -1; }
}
@media (max-width:767px) {
    .portal .hall-grid,.portal .hall-highlights { grid-template-columns:minmax(0,1fr); }
}

/* Leaderboard: compact responsive filters and stable ranking columns. */
.portal .leader-filters { margin-bottom:20px; }
.leader-actions,.leader-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; }
.leader-pagination { justify-content:center; margin:12px 0; }
.leader-table { width:100%; table-layout:fixed; }
.leader-table th:first-child { width:9%; }
.leader-table th:nth-child(2) { width:34%; }
.leader-table th:last-child { width:21%; }
.leader-table td,.leader-table th { padding:10px 12px; overflow-wrap:anywhere; white-space:normal; }
.leader-table th a { color:inherit; }
.leader-table .leader-active { color:#ffac55; }
.leader-table .leader-rank-1 { color:#ffb45c; }
.leader-table .leader-rank-2 { color:#c0cbd8; }
.leader-table .leader-rank-3 { color:#cd956e; }
.leader-scope { font-size:12px; margin-top:14px; }
@media(max-width:700px) { .leader-table { min-width:650px; } .leader-actions { flex-wrap:wrap; } }


/* Optional global artwork. The image URL is set directly on the body in index.php
 * so relative paths resolve against the portal URL, including subdirectories. */
body.portal.portal-themed {
    background-color:#0b111b;
    background-position:center top;
    background-size:cover;
    background-repeat:no-repeat;
    background-attachment:fixed;
}
.portal-themed .portal-header { background:rgba(13,22,34,.95); }
.portal.portal-themed .stats article,.portal.portal-themed .panel,.portal.portal-themed .filters,
.portal.portal-themed .podium-card,.portal.portal-themed .server-card { background:rgba(21,31,46,var(--theme-panel-opacity)); }
.portal-themed thead { background:rgba(16,26,40,.90); }
.portal-themed .portal-footer { background:rgba(11,17,27,.85); border-radius:8px; }
/* Leaderboard controls share the match-history secondary button treatment. */
.portal .leader-actions .detail-button,.portal .leader-pagination .detail-button {
    display:inline-flex; align-items:center; justify-content:center; padding:8px 12px;
    background:#202e3d; color:var(--gold); border-radius:6px; text-decoration:none; font-size:13px;
}
.portal .leader-actions .detail-button { min-height:44px; }
.portal .leader-actions .detail-button:hover,.portal .leader-pagination .detail-button:hover { background:#2b3a4d; }
.portal .leader-table th a { text-decoration:none; }
.portal .leader-table th a:hover { color:var(--gold); }

/* Player directory: no rank column. */
.leader-table.directory-table th:first-child { width:43%; }
.leader-table.directory-table th:nth-child(2) { width:12%; }

/* Server directory totals and compact public address controls. */
.portal .server-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:0 0 20px; }
.portal .server-totals[hidden] { display:none; }
.portal .server-totals article { min-width:0; }
.portal .server-totals article strong { display:block; font-size:clamp(20px,3vw,32px); margin-top:8px; }
.portal .server-copy-row { display:flex; align-items:center; gap:5px; flex-wrap:wrap; }
.portal button.server-copy { background:transparent; color:var(--gold); padding:0 4px; min-height:0; font-size:15px; line-height:1; }
.portal button.server-copy:focus-visible { outline:2px solid var(--gold); }
.portal .server-card .server-live-info { grid-column:2; }
.portal .server-mode-field { grid-column:3; color:var(--gold); font-weight:600; }
@media(max-width:700px) { .portal .server-totals { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:420px) { .portal .server-mode-field { grid-column:2; } }

/* Public GunGame rules: stable columns and readable localized explanations. */
.portal .server-rules-table { width:100%; table-layout:fixed; white-space:normal; }
.portal .server-rules-table thead th:first-child { width:27%; }
.portal .server-rules-table thead th:nth-child(2) { width:20%; }
.portal .server-rules-table th,.portal .server-rules-table td { text-align:left; white-space:normal; overflow-wrap:anywhere; vertical-align:top; padding:12px; }
.portal .server-rules-table .server-rule-group th { color:#ffb454; background:rgba(0,0,0,.18); }
.portal .server-rules-table .server-rule-value { color:#ffb454; }
@media(max-width:600px) { .portal .server-rules-table { min-width:600px; } }
