/* Warden Stats (stats.wardenrce.com, web/stats.js). Loaded after style.css.
 * Liquid glass, dark: glass cards over the shared backdrop, vibrant accents for
 * highlights and charts, text kept on --text / --muted for contrast. */

/* Accent tokens for this site. Filled controls (active tabs, filters, primary buttons)
 * use the solid --fill colour with white text. */
.stats-site {
  --glass-tint: rgba(255, 255, 255, .045);
  --glass-field: rgba(9, 7, 16, .5);
  --hairline: rgba(255, 255, 255, .08);
}

/* Player lookup (/players) */
.players { padding-top: 48px; padding-bottom: 80px; }
.players-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.players-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; }
.player-search { position: relative; display: flex; gap: 10px; margin-top: 22px; }
.player-search input {
  flex: 1; min-width: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--glass-border-strong);
  background: var(--glass-field); color: var(--text); font: inherit; font-size: 16px;
  box-shadow: var(--glass-highlight); transition: border-color .15s ease, box-shadow .15s ease;
}
.player-search input::placeholder, .server-tools input::placeholder { color: #948daa; opacity: 1; }
.player-search input:focus, .server-tools input:focus, .server-tools select:focus {
  outline: none; border-color: rgba(56, 225, 255, .65);
  box-shadow: 0 0 0 3px rgba(56, 225, 255, .18);
}
.player-search .docs-results { text-align: left; }
.player-search .docs-results span { display: inline; margin-left: 8px; font-size: 13px; }
.player-search .docs-results b { display: inline; }
.profile-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.profile-head h2 { font-size: clamp(26px, 4vw, 36px); margin: 0; word-break: break-word; }
.profile-head p { margin: 4px 0 0; }
.online-pill {
  display: inline-flex; align-items: center; color: var(--green); font-weight: 700;
  padding: 3px 12px; border-radius: 99px; border: 1px solid rgba(62, 224, 122, .4);
  background: #13291d;
}
.view-tabs {
  display: inline-flex; background: var(--glass-tint); border: 1px solid var(--glass-border); border-radius: 12px; padding: 3px;
  box-shadow: var(--glass-highlight);
}
.view-tabs button { border: 0; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 14.5px; padding: 7px 14px; border-radius: 9px; cursor: pointer; transition: color .15s ease, background .15s ease; }
.view-tabs button:hover { color: var(--text); }
.view-tabs button.on { background: var(--fill); color: #fff; }
.view-tabs button.on:hover { background: var(--fill-hover); color: #fff; }
.stat-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 34px; }
.stat-tile {
  position: relative; overflow: hidden; --accent: var(--rust);
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: transform .15s ease, border-color .15s ease;
}
/* A thin accent line per tile, cycling through the palette. */
.stat-tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); }
.stat-tile:nth-child(4n+2) { --accent: var(--pink); }
.stat-tile:nth-child(4n+3) { --accent: var(--violet); }
.stat-tile:nth-child(4n+4) { --accent: var(--cyan); }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.stat-label { color: var(--muted); font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.section-title { font-size: 18px; margin: 0 0 12px; }
.server-card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.server-card-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.server-card-head h3 { margin: 0; font-size: 17px; }
/* Offline: a quiet pill, not a warning. */
.server-card-head > span.muted.small {
  padding: 3px 12px; border-radius: 99px; border: 1px solid var(--hairline); background: rgba(255, 255, 255, .03);
}
.table-scroll {
  overflow-x: auto; background: rgba(9, 7, 16, .28); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
}
.server-card .table-scroll { background: none; border: 0; border-radius: 0; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14.5px; white-space: nowrap; }
.stat-table th, .stat-table td { padding: 9px 12px; text-align: right; border-top: 1px solid var(--hairline); transition: background .12s ease; }
.stat-table thead th { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; border-top: 0; background: rgba(167, 139, 250, .09); }
.stat-table tbody tr:hover > th, .stat-table tbody tr:hover > td { background: rgba(255, 255, 255, .05); }
.stat-table th[scope="row"] { text-align: left; font-weight: 600; }
.stat-table tr.past { color: #d9d3e6; }
.stat-table tr.total { font-weight: 800; }
.stat-table tr.total th, .stat-table tr.total td { border-top: 1px solid var(--rust-2); }
.fine-print { margin-top: 22px; }
.empty-state { text-align: center; padding: 30px 0; }
@media (max-width: 600px) {
  .player-search { flex-direction: column; }
  .profile-head { align-items: flex-start; }
}
.players { min-height: calc(100vh - 220px); }
.player-search .btn { justify-content: center; }

/* Warden Stats (stats.wardenrce.com, web/stats.js) */
.stats-main { padding-top: 36px; padding-bottom: 80px; min-height: calc(100vh - 220px); }
.stats-site .nav {
  background: rgba(10, 8, 18, .55); border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
}
.stats-nav a { position: relative; padding: 4px 0; }
.stats-nav a.on { color: var(--text); }
.stats-nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--rust); }
.stats-hero { max-width: 760px; margin: 0 auto 30px; text-align: center; }
.stats-hero h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 8px; line-height: 1.15; color: var(--text); }
.stats-section { margin: 38px 0; }
.section-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-row h2, .section-row h3 { margin: 0; }
.stats-section h2 { font-size: 22px; }
.stat-note { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.podium { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.podium a, .server-grid a { color: inherit; }
.podium a:hover, .server-grid a:hover { text-decoration: none; }
.podium-card, .server-mini {
  position: relative; overflow: hidden; --accent: var(--rust);
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 18px; height: 100%;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.podium-card::before, .server-mini::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: .85; }
/* Top three get gold, silver and bronze accent lines. */
.podium a:nth-child(1) .podium-card { --accent: var(--hazard); }
.podium a:nth-child(2) .podium-card { --accent: #d7dce6; }
.podium a:nth-child(3) .podium-card { --accent: #e0894f; }
.podium a:hover .podium-card, .server-grid a:hover .server-mini {
  border-color: var(--glass-border-strong); transform: translateY(-3px);
  box-shadow: var(--glass-highlight), 0 18px 44px rgba(0, 0, 0, .5);
}
.podium-rank { font-size: 28px; line-height: 1; font-weight: 800; color: var(--muted); }
.podium-rank.rank-1 { color: var(--hazard); }
.podium-rank.rank-2 { color: #d7dce6; }
.podium-rank.rank-3 { color: #e0894f; }
.podium-name { font-weight: 800; font-size: 19px; margin: 8px 0 2px; word-break: break-word; }
.podium-kd { font-size: 30px; font-weight: 800; color: var(--rust-2); }
.podium-kd span { font-size: 14px; color: var(--muted); font-weight: 700; }
.server-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.server-mini-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.server-mini-players { font-weight: 700; margin: 6px 0 2px; color: var(--text); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #5b5470; display: inline-block; flex: none; margin-right: 6px; }
.status-dot.on { background: var(--green); }
.platform {
  display: inline-block; margin-left: 10px; padding: 2px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em;
  vertical-align: 6px; border: 1px solid var(--glass-border-strong); color: var(--text); background: rgba(255, 255, 255, .07);
}
.platform.xbox { color: var(--green); border-color: rgba(62, 224, 122, .4); background: rgba(62, 224, 122, .12); }
.platform.playstation { color: var(--cyan); border-color: rgba(56, 225, 255, .4); background: rgba(56, 225, 255, .12); }
.server-card-head .platform { vertical-align: 2px; margin-left: 8px; }
.two-col { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin: 14px 0; }
.panel-box {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; min-width: 0;
  box-shadow: var(--glass-highlight), var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.two-col .panel-box { margin-bottom: 0; }
.panel-box h3 { margin: 0 0 10px; font-size: 17px; }
.panel-box h4 { margin: 0 0 6px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rivals { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rank-list { margin: 0; padding-left: 22px; }
.rank-list li { padding: 3px 0; }
.rank-list.numbered li::marker { color: var(--cyan); font-weight: 800; }
.cause-bars { display: grid; gap: 8px; }
.cause-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 14.5px; }
.cause-label { color: var(--text); }
.cause-track { height: 10px; background: rgba(255, 255, 255, .07); border: 1px solid var(--hairline); border-radius: 99px; overflow: hidden; }
/* Each cause gets its own solid accent from the palette. */
.cause-fill { display: block; height: 100%; background: var(--rust); border-radius: 99px; min-width: 2px; }
.cause-row:nth-child(2) .cause-fill { background: var(--cyan); }
.cause-row:nth-child(3) .cause-fill { background: var(--pink); }
.cause-row:nth-child(4) .cause-fill { background: var(--violet); }
.cause-row:nth-child(5) .cause-fill { background: var(--hazard); }
.cause-value { white-space: nowrap; font-weight: 700; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--glass-border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
/* Population: a cyan line over a translucent violet wash. */
.chart .area { fill: rgba(167, 139, 250, .2); }
.chart .line { fill: none; stroke: var(--cyan); stroke-width: 2.25; stroke-linejoin: round; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker { fill: var(--cyan); stroke: var(--bg); stroke-width: 2; }
/* Hour bars: violet for playtime, cyan for the server's busiest hours. */
.chart .bar { fill: var(--violet); }
.chart svg[aria-label^="Average players"] .bar { fill: var(--cyan); }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(255, 255, 255, .05); }
.chart-tip {
  position: absolute; pointer-events: none; background: var(--glass-strong); border: 1px solid var(--glass-border-strong); border-radius: 10px;
  padding: 6px 10px; font-size: 13px; white-space: nowrap; box-shadow: var(--glass-shadow); z-index: 5;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.chart-empty { padding: 30px 0; text-align: center; }
.inline-gap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chips a {
  background: var(--glass-tint); border: 1px solid var(--glass-border); border-radius: 99px; padding: 3px 11px; font-size: 14px; color: var(--text);
  transition: border-color .15s ease, background .15s ease;
}
.chips a:hover { text-decoration: none; border-color: var(--glass-border-strong); background: var(--glass-2); }
.center-tabs { margin-top: 18px; }
.center-tabs a { text-decoration: none; }
.center-tabs .tab { display: inline-block; color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 7px 14px; border-radius: 9px; transition: color .15s ease, background .15s ease; }
.center-tabs a:hover .tab:not(.on) { color: var(--text); }
.center-tabs .tab.on { background: var(--fill); color: #fff; }
.center-tabs a:hover .tab.on { background: var(--fill-hover); }
.stat-table.board td.hl { color: var(--rust-2); font-weight: 800; }
.stat-table.board td:first-child { text-align: left; color: var(--muted); width: 40px; }
/* Top three on the leaderboard: gold, silver, bronze rank numbers. */
.stat-table.board tbody tr:nth-child(1) td:first-child { color: var(--hazard); font-weight: 800; }
.stat-table.board tbody tr:nth-child(2) td:first-child { color: #d7dce6; font-weight: 800; }
.stat-table.board tbody tr:nth-child(3) td:first-child { color: #e0894f; font-weight: 800; }
.stats-main > a[data-link]:first-child { display: inline-block; margin-bottom: 8px; }
@media (max-width: 600px) {
  .cause-row { grid-template-columns: 1fr auto; }
  .cause-track { grid-column: 1 / -1; grid-row: 2; }
}
/* Tiles: four to a row on wide screens, two on phones - never one left over. */
.stats-site .stat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-site .stat-value { font-size: 24px; white-space: nowrap; }
@media (max-width: 700px) { .stats-site .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats-site .stat-value { font-size: 20px; } }
.stat-table.board th.hl { color: var(--rust-2); }
/* Highlighted column: a faint tint so the sort key reads at a glance. */
.stat-table td.hl { background: rgba(255, 106, 43, .07); }
.stat-table th.hl { background: rgba(255, 106, 43, .1); }
/* Phones: the stats menu moves under the logo instead of disappearing. */
@media (max-width: 760px) {
  .stats-site .nav .wrap { flex-wrap: wrap; row-gap: 4px; height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 8px; }
  .stats-site .stats-nav { display: flex; order: 3; flex: 1 1 auto; width: auto; margin: 0; gap: 4px; padding-bottom: 0; }
  .stats-site .stats-nav a { padding: 5px 12px; }
  /* The globe sits at the end of the menu row, so the logo and wardenrce.com keep the top row. */
  .stats-site .nav .lang-pick { order: 4; margin-left: auto; }
  .stats-site .nav .btn { margin-left: auto; }
  .stats-site .nav .wrap::after { content: ""; order: 2; flex-basis: 100%; }
}
.stats-site section.stats-hero, .stats-site section.stats-section { padding: 0; }
.stats-site footer { border-top: 1px solid var(--glass-border); }
.stats-site footer .note { color: #9a93ad; }

/* Server listings on the stats site */
.tag-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.tag-chip {
  font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; color: #e4dff0;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-border);
}
.tag-chip.more { color: var(--muted); }
.server-desc { color: #d9d3e6; margin-top: 6px; }
.server-about { max-width: 720px; margin: 10px 0 4px; line-height: 1.55; }
.join-box { text-align: right; max-width: 320px; }
.join-box .btn { margin-bottom: 6px; }
.server-tools { display: flex; gap: 10px; margin-bottom: 14px; }
.server-tools input, .server-tools select {
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--glass-border-strong); background: var(--glass-field); color: var(--text);
  font: inherit; font-size: 15px; box-shadow: var(--glass-highlight); transition: border-color .15s ease, box-shadow .15s ease;
}
.server-tools select option { background: #15121f; color: var(--text); }
.server-tools input { flex: 1; min-width: 0; }
.filters {
  display: grid; gap: 8px; margin-bottom: 14px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--glass-highlight);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { color: var(--muted); font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; min-width: 92px; }
.filter-chip {
  background: rgba(255, 255, 255, .05); color: var(--muted); border: 1px solid var(--glass-border); border-radius: 99px; padding: 4px 11px;
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.filter-chip:hover { color: var(--text); border-color: var(--glass-border-strong); }
.filter-chip.on { background: var(--fill); color: #fff; border-color: transparent; }
.filter-chip.on:hover { background: var(--fill-hover); color: #fff; }
@media (max-width: 600px) {
  .server-tools { flex-direction: column; }
  .join-box { text-align: left; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .podium a:hover .podium-card, .server-grid a:hover .server-mini { transform: none; }
}

/* The next page is loading: the current one stays, dimmed a little, until it swaps in. */
#app.switching { opacity: .6; transition: opacity .15s ease .1s; pointer-events: none; }

.server-map { display: block; width: 100%; max-width: 512px; height: auto; border-radius: 12px; margin: 4px 0 8px; }

/* Bans the server chose to show (web/stats.js banBox). */
.ban-box { border-color: rgba(255, 90, 106, .35); }
.ban-box h3 { color: var(--red); }
.ban-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ban-list li { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); min-width: 0; overflow-wrap: anywhere; }
.ban-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ban-cat { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(255, 90, 106, .16); color: var(--red); vertical-align: 1px; }

/* ---- 2026-11 refresh ---- */
/* Desktop nav: room between the links (they ran together). */
@media (min-width: 721px) { .stats-nav { gap: 22px; } }
/* Leaderboard: the Player header sits over the names, not over the numbers. */
.stat-table.board thead th:nth-child(2) { text-align: left; }
/* Busiest right now: a capacity bar per server. */
.busy-list { list-style: none; counter-reset: busy; margin: 0; padding: 0; display: grid; gap: 8px; }
.busy-list li {
  counter-increment: busy; display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(80px, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 16px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  box-shadow: var(--glass-highlight);
}
.busy-list li::before { content: counter(busy); color: var(--muted); font-weight: 800; }
.busy-list li:nth-child(1)::before { color: var(--hazard); }
.busy-list li > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busy-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.busy-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.busy-count { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 150px; text-align: right; }
@media (max-width: 600px) { .busy-count { min-width: 0; } }
.busy-count small { color: var(--muted); font-weight: 600; }
@media (max-width: 600px) {
  .busy-list li { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 8px; }
  .busy-bar { grid-column: 2 / -1; grid-row: 2; }
}
/* Server page: the four top lists two by two, never one left over. */
@media (min-width: 761px) { .stats-site .two-col.top-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
