/* ══════════════════════════════════════════════════════════════════════
   /status and /players: shared styles
   ══════════════════════════════════════════════════════════════════════ */
.pfx, .pfx-ui {
  --pf-pixel: 'Pixelify Sans', 'Karla', sans-serif;
  --pf-heading: #fff;
  --pf-muted: rgba(255,255,255,.55);
  --pf-radius: 10px;
  --pf-panel: var(--theme-main-color);
  --pf-inset: rgba(0,0,0,.22);
  --ok: #55e07a; --warn: #f5c542; --bad: #ff5f5f; --nodata: rgba(255,255,255,.12);
  font-variant-ligatures: none;
}
.pfx { padding: 34px 0 70px; }
body.pf-light .pfx, body.pf-light .pfx-ui { --pf-heading: #141a2b; --pf-muted: rgba(20,26,43,.6); --pf-inset: rgba(0,0,0,.06); --nodata: rgba(0,0,0,.12); }
.pfx * { min-width: 0; }
.pfx h2 { font-family: var(--pf-pixel); color: var(--pf-heading); font-size: 24px; line-height: 1.15; display: flex; align-items: center; gap: 10px; }
.pfx h2 i { color: var(--main-color); font-size: 18px; }
.pfx .muted { color: var(--pf-muted); }
.pfx .panel { background: var(--pf-panel); border: 1px solid var(--theme-border-light); border-radius: var(--pf-radius); padding: 22px 24px; }
.pfx .panel + .panel, .pfx .gap { margin-top: 22px; }
.pfx .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pfx .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.pfx .grid-2 > .panel { margin-top: 0; }
.pfx .skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: pfx-shine 1.2s linear infinite; border-radius: 6px; }
@keyframes pfx-shine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pfx .skeleton { animation: none; } }

/* stat tiles */
.pfx .tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.pfx .tile { background: var(--pf-panel); border: 1px solid var(--theme-border-light); border-radius: var(--pf-radius); padding: 16px 18px; position: relative; overflow: hidden; }
.pfx .tile::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--main-color); opacity: .8; }
.pfx .tile b { display: block; font-family: var(--pf-pixel); color: var(--pf-heading); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pfx .tile span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pf-muted); }
.pfx .tile small { display: block; font-size: 12px; color: var(--pf-muted); margin-top: 2px; }

/* segmented control */
.pfx .seg { display: inline-flex; background: var(--pf-inset); border-radius: 8px; padding: 3px; gap: 2px; }
.pfx .seg button { background: none; border: 0; color: var(--pf-muted); font: 700 13px Karla, sans-serif; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.pfx .seg button.on { background: var(--main-color); color: var(--pf-on-accent, #1d1404); }

/* buttons */
.pfx .btn, .pfx-ui .btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: 800 14px Karla, sans-serif; padding: 10px 16px; border-radius: 8px; background: var(--main-color); color: var(--pf-on-accent, #1d1404); box-shadow: 0 4px 0 var(--main-color-dark); transition: transform .15s; white-space: nowrap; }
.pfx .btn:hover, .pfx-ui .btn:hover { transform: translateY(-2px); color: var(--pf-on-accent, #1d1404); }
.pfx .btn.ghost, .pfx-ui .btn.ghost { background: rgba(255,255,255,.08); color: var(--pf-heading); box-shadow: 0 4px 0 rgba(0,0,0,.3); }
body.pf-light .pfx .btn.ghost, body.pf-light .pfx-ui .btn.ghost { background: rgba(0,0,0,.06); }

/* ── Status: Minecraft server-list entry ───────────────────────────── */
.mc-entry { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: center; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.12); border-radius: 4px; padding: 10px 14px 10px 10px; font-family: var(--pf-pixel); }
.mc-entry img, .mc-entry .mc-icon { width: 72px; height: 72px; image-rendering: pixelated; border-radius: 2px; background: rgba(255,255,255,.06); }
.mc-entry .mc-name { color: #fff; font-size: 19px; }
.mc-entry .mc-motd { color: #aaa; font-size: 15px; line-height: 1.3; margin-top: 4px; min-height: 2.6em; overflow-wrap: anywhere; }
.mc-entry .mc-right { text-align: right; color: #aaa; font-size: 15px; align-self: start; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mc-entry .mc-right b { color: #fff; font-weight: 500; }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.bars i { width: 3px; background: #3a3a3a; display: block; }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 7px; } .bars i:nth-child(3) { height: 10px; } .bars i:nth-child(4) { height: 13px; } .bars i:nth-child(5) { height: 16px; }
.bars.q5 i { background: #55ff55; } .bars.q4 i:nth-child(-n+4) { background: #55ff55; } .bars.q3 i:nth-child(-n+3) { background: #ffff55; } .bars.q2 i:nth-child(-n+2) { background: #ffaa00; } .bars.q1 i:nth-child(1) { background: #ff5555; }
.bars.q0 i { background: #ff5555; opacity: .35; }

.status-hero { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: center; }
.status-line { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.status-line h2 { font-size: 28px; }
.pulse { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(85,224,122,.6); animation: pfx-pulse 2s infinite; flex-shrink: 0; }
.pulse.down { background: var(--bad); animation: none; box-shadow: 0 0 12px rgba(255,95,95,.6); }
.pulse.wait { background: var(--nodata); animation: none; }
@keyframes pfx-pulse { 70% { box-shadow: 0 0 0 12px rgba(85,224,122,0); } 100% { box-shadow: 0 0 0 0 rgba(85,224,122,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.status-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.checked { font-size: 12px; color: var(--pf-muted); text-align: center; }

/* notices */
.notice { display: flex; gap: 14px; align-items: flex-start; border-radius: var(--pf-radius); padding: 14px 18px; margin-bottom: 18px; border: 1px solid; }
.notice i { font-size: 18px; margin-top: 2px; }
.notice b { color: var(--pf-heading); display: block; }
.notice.info { background: rgba(96,165,250,.1); border-color: rgba(96,165,250,.35); } .notice.info i { color: #60a5fa; }
.notice.maintenance { background: rgba(245,197,66,.1); border-color: rgba(245,197,66,.4); } .notice.maintenance i { color: var(--warn); }
.notice.outage { background: rgba(255,95,95,.1); border-color: rgba(255,95,95,.4); } .notice.outage i { color: var(--bad); }

/* chart */
.chart { position: relative; height: 230px; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--theme-border-light); }
.chart .grid text, .chart .xl text { fill: var(--pf-muted); font: 11px Karla, sans-serif; }
.chart .area { fill: url(#pfx-grad); }
.chart .line { fill: none; stroke: var(--main-color); stroke-width: 2; stroke-linejoin: round; }
.chart .peakline { fill: none; stroke: var(--main-color); stroke-width: 1; stroke-dasharray: 3 3; opacity: .45; }
.chart .gapband { fill: var(--nodata); opacity: .5; }
.chart .cursor { stroke: var(--pf-muted); stroke-dasharray: 2 3; }
.chart .dot { fill: var(--main-color); stroke: var(--theme-main-color); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; background: var(--theme-main-color-dark); border: 1px solid var(--theme-border-light); border-radius: 6px; padding: 6px 10px; font-size: 12px; color: var(--pf-heading); white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.chart-tip small { color: var(--pf-muted); display: block; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--pf-muted); font-size: 14px; padding: 20px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--pf-muted); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--main-color); vertical-align: middle; margin-right: 6px; }
.legend i.dash { border-top: 1px dashed var(--main-color); opacity: .6; }

/* uptime bars */
.uptime-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 38px; }
.uptime-bars span { border-radius: 2px; background: var(--nodata); position: relative; cursor: default; }
.uptime-bars span.ok { background: var(--ok); } .uptime-bars span.warn { background: var(--warn); } .uptime-bars span.bad { background: var(--bad); }
.uptime-bars span:hover { filter: brightness(1.25); }
.uptime-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--pf-muted); margin-top: 8px; }

/* services */
.svc { list-style: none; margin: 0; padding: 0; }
.svc li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--theme-border-light); }
.svc li:last-child { border-bottom: 0; padding-bottom: 0; }
.svc li:first-child { padding-top: 0; }
.svc .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--pf-inset); color: var(--main-color); }
.svc b { color: var(--pf-heading); display: block; }
.svc small { color: var(--pf-muted); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 999px; background: var(--pf-inset); color: var(--pf-muted); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(85,224,122,.1); } .pill.bad { color: var(--bad); background: rgba(255,95,95,.1); } .pill.warn { color: var(--warn); background: rgba(245,197,66,.1); }

.incidents { list-style: none; margin: 0; padding: 0; }
.incidents li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--theme-border-light); font-size: 14px; }
.incidents li:last-child { border-bottom: 0; }
.incidents i { color: var(--bad); margin-top: 3px; }
.incidents b { color: var(--pf-heading); }

/* heads row */
.heads { display: flex; flex-wrap: wrap; gap: 8px; }
.heads a { display: block; width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--pf-inset); transition: transform .15s; }
.heads a:hover { transform: translateY(-3px); }
.heads img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }

/* ── Players ───────────────────────────────────────────────────────── */
.p-search { position: relative; max-width: 640px; margin: 0 auto; }
.p-search .field { display: flex; align-items: center; gap: 12px; background: var(--pf-panel); border: 2px solid var(--theme-border-light); border-radius: 12px; padding: 6px 6px 6px 18px; transition: border-color .2s; }
.p-search .field:focus-within { border-color: var(--main-color); }
.p-search .field i { color: var(--pf-muted); }
.p-search input { flex: 1; background: none; border: 0; outline: none; color: var(--pf-heading); font: 600 17px Karla, sans-serif; padding: 10px 0; min-width: 0; }
.p-search input::placeholder { color: var(--pf-muted); font-weight: 400; }
.p-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--theme-main-color-dark); border: 1px solid var(--theme-border-light); border-radius: 10px; overflow: hidden; z-index: 30; box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.p-suggest a { display: flex; align-items: center; gap: 12px; padding: 9px 14px; color: var(--pf-heading); font-weight: 700; }
.p-suggest a img { width: 28px; height: 28px; border-radius: 4px; image-rendering: pixelated; }
.p-suggest a small { color: var(--pf-muted); font-weight: 400; margin-left: auto; font-size: 12px; }
.p-suggest a.on, .p-suggest a:hover { background: var(--pf-panel); color: var(--main-color); }
.p-suggest .none { padding: 12px 14px; color: var(--pf-muted); font-size: 14px; }
.p-hint { text-align: center; color: var(--pf-muted); font-size: 13px; margin-top: 10px; }

.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcard { display: flex; align-items: center; gap: 10px; background: var(--pf-inset); border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; color: var(--pf-heading); transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--main-color); transform: translateY(-2px); color: var(--pf-heading); }
.pcard img { width: 34px; height: 34px; border-radius: 4px; image-rendering: pixelated; flex-shrink: 0; }
.pcard b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard small { color: var(--pf-muted); font-size: 12px; }
.pcard .live { color: var(--ok); }

.profile { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.p-card { text-align: center; position: relative; overflow: hidden; }
.p-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 55%; background: radial-gradient(ellipse at 50% 100%, rgba(var(--pf-glow-a, 239,186,77), .28), transparent 70%); pointer-events: none; }
.p-card .body { position: relative; height: 260px; display: grid; place-items: end center; margin-bottom: 14px; }
.p-card .body img { max-height: 250px; image-rendering: pixelated; filter: drop-shadow(0 10px 10px rgba(0,0,0,.45)); }
.p-card h1 { font-family: var(--pf-pixel); color: var(--pf-heading); font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; }
.p-badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; border-radius: 6px; background: var(--pf-inset); border: 1px solid currentColor; }
.p-card .facts { text-align: left; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--theme-border-light); }
.p-card .facts li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--theme-border-light); font-size: 13px; }
.p-card .facts li span { color: var(--pf-muted); }
.p-card .facts li b { color: var(--pf-heading); text-align: right; overflow-wrap: anywhere; }
.p-card .links { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.p-card .links .btn { padding: 8px 12px; font-size: 13px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--pf-inset); border-radius: 8px; padding: 12px 14px; }
.stat b { display: block; font-family: var(--pf-pixel); font-size: 22px; color: var(--pf-heading); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--pf-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

.record-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.clean { display: flex; align-items: center; gap: 12px; color: var(--ok); font-weight: 700; }
.clean i { font-size: 22px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ptable th { text-align: left; color: var(--pf-muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; padding: 0 10px 8px 0; }
.ptable td { padding: 9px 10px 9px 0; border-top: 1px solid var(--theme-border-light); vertical-align: top; }
.ptable td:first-child { white-space: nowrap; }
.ptable .tag { font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--pf-inset); }
.ptable .tag.ban { color: var(--bad); } .ptable .tag.mute { color: var(--warn); } .ptable .tag.warning { color: #60a5fa; } .ptable .tag.kick { color: #c4a7ff; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.banned-note { display: flex; gap: 10px; align-items: center; background: rgba(255,95,95,.1); border: 1px solid rgba(255,95,95,.35); color: var(--pf-heading); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.banned-note i { color: var(--bad); }

.lb-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.lb-board ol { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.lb-board li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--theme-border-light); counter-increment: r; font-size: 14px; }
.lb-board li::before { content: counter(r); width: 22px; font-family: var(--pf-pixel); color: var(--pf-muted); text-align: center; }
.lb-board li:nth-child(1)::before { color: #ffd34d; } .lb-board li:nth-child(2)::before { color: #d6dde6; } .lb-board li:nth-child(3)::before { color: #e09a5a; }
.lb-board li b { color: var(--pf-heading); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-board li span { font-variant-numeric: tabular-nums; color: var(--main-color); font-weight: 700; }

.err-box { text-align: center; padding: 40px 20px; }
.err-box i { font-size: 34px; color: var(--pf-muted); margin-bottom: 12px; }
.err-box h3 { font-family: var(--pf-pixel); color: var(--pf-heading); font-size: 22px; margin-bottom: 6px; }

@media (max-width: 991px) {
  .pfx .tiles { grid-template-columns: repeat(2, 1fr); }
  .pfx .grid-2 { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pfx { padding-top: 22px; }
  .pfx .panel { padding: 18px 16px; }
  .status-hero { grid-template-columns: 1fr; }
  .mc-entry { grid-template-columns: 52px 1fr; gap: 12px; }
  .mc-entry img, .mc-entry .mc-icon { width: 52px; height: 52px; }
  .mc-entry .mc-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .mc-entry .mc-name { font-size: 17px; } .mc-entry .mc-motd { font-size: 13px; }
  .uptime-bars { gap: 2px; height: 30px; }
  .chart { height: 200px; }
  .pfx .tile b { font-size: 24px; }
  .pcards { grid-template-columns: repeat(2, 1fr); }
}

/* realms */
.stat-group { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--pf-muted); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.realm-pane > .stat-group:first-child { margin-top: 0; }
.stat-group i { color: var(--main-color); }
.realm-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 5px 10px; border-radius: 6px; color: var(--rc); background: var(--pf-inset); border: 1px solid var(--rc); }
.lb-h { font-family: var(--pf-pixel); color: var(--pf-heading); font-size: 18px; margin-bottom: 8px; }
.lb-h small { font-family: Karla, sans-serif; font-size: 12px; font-weight: 400; }
.lb-board .lb-name { display: flex; align-items: center; gap: 8px; flex: 1; color: var(--pf-heading); font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-board .lb-name:hover { color: var(--main-color); }
.lb-board .lb-name img { width: 20px; height: 20px; border-radius: 3px; image-rendering: pixelated; }
@media (max-width: 640px) { .realm-tabs { width: 100%; } .realm-tabs button { flex: 1; } }
.lb-board li.muted::before { content: none; }
.svc-sub:not(:empty) { margin: 0 0 0 22px; border-left: 2px solid var(--theme-border-light); padding-left: 12px; }
.svc-sub li { padding: 9px 0; }
.svc-sub li:first-child { padding-top: 9px; }
.svc-sub .ic { width: 28px; height: 28px; font-size: 12px; }
.svc ~ .svc > li:first-child { padding-top: 12px; border-top: 1px solid var(--theme-border-light); }
