/* ps2tracker.com/rage: the look of the talks (Space Grotesk, near-black, gradient buttons and glass) in red */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-display: swap; font-weight: 300 700;
  src: url("space-grotesk.woff2") format("woff2");   /* next to this file (under the base path) */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #07070c; --fg: #f6f4ff; --muted: #a9a6c0; --dim: #8d8aa5; --faint: #5f5c75; --line: #2a2938; --glass: rgba(26, 25, 38, .62);
  --vs: #b77cff; --nc: #4aa3ff; --tr: #ff5c5c; --nso: #cfd2dc; --rage: #ff2b4a;
  --hot: linear-gradient(120deg, #ff5ab4, #ffb347); --cool: linear-gradient(120deg, #7cf8ff, #7b61ff);
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.live { overflow: hidden; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.blobs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* the four factions: TR red, NC blue, VS purple, NSO grey, drifting slowly */
.blobs .b {
  position: absolute; width: 54vmax; height: 54vmax; border-radius: 50%; filter: blur(90px); opacity: .16;
  will-change: transform; animation: drift 40s ease-in-out infinite alternate;
}
.blobs .tr { background: #ff2b4a; top: -27vmax; left: -19vmax; }
.blobs .nc { background: #2f80ff; top: -27vmax; right: -19vmax; animation-delay: -10s; }
.blobs .vs { background: #9d4dff; bottom: -29vmax; left: -17vmax; animation-delay: -20s; }
.blobs .nso { background: #b9bdc9; bottom: -31vmax; right: -19vmax; opacity: .1; animation-delay: -30s; }
@keyframes drift { 50% { transform: translate(5vmax, 3vmax) scale(1.06); } 100% { transform: translate(-3vmax, 4vmax) scale(.96); } }

/* the title: how many rage quits */
.top { position: fixed; top: max(18px, env(safe-area-inset-top)); left: 0; right: 0; text-align: center; padding: 0 16px; z-index: 4; }
#title { margin: 0; font-weight: 700; font-size: clamp(26px, 4.6vw, 58px); line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; }
#title .num {
  display: inline-block; background: linear-gradient(90deg, #ff2b4a, #ff5ab4, #ffb347, #ff2b4a); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 6s linear infinite;
  font-variant-numeric: tabular-nums;
}
#title .num.bump { animation: flow 6s linear infinite, bump .6s cubic-bezier(.2, 1.6, .4, 1); }
#qperiod { color: var(--dim); font-weight: 500; }
/* the last 24 hours, under the title */
.day {
  margin: 8px auto 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px;
  font-size: clamp(13px, 1.5vw, 15px); color: var(--muted);
}
.day b { color: var(--fg); font-size: 1.15em; }
.d-bar { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.d-seg { padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .06); font-weight: 700; font-size: .92em; }
.d-seg.lead { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px currentColor; }
.d-most { font-weight: 700; }
.d-link { color: #7cf8ff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.d-link:hover { text-decoration: underline; }
#where { margin: 6px 0 0; color: var(--faint); font-size: clamp(13px, 1.5vw, 16px); letter-spacing: .02em; }
@keyframes flow { to { background-position: 300% 0; } }
@keyframes bump { 40% { transform: scale(1.35); } }

/* Gradients: a chip with a transparent border gets background-origin: border-box, or the gradient repeats under the
   border and shows its first colour as a thin bar at the right end; sliding gradients run at 90deg, as an angled one
   leaves a seam where its repeats meet (owner, 2026-11-30: "annoying vertical bar at the end of this button"). */
/* sound: a big gradient button until it's on (browsers play sound only after a tap), then a small toggle */
#sound { border: 0; color: #12101c; display: inline-flex; align-items: center; gap: .55em; font-weight: 700; }
#sound.cta {
  margin-top: 14px; padding: 13px 24px; border-radius: 14px; font-size: 18px; max-width: calc(100vw - 32px);
  background: linear-gradient(90deg, #ff2b4a, #ff5ab4, #ffb347, #ff2b4a); background-size: 300% 100%;
  box-shadow: 0 0 0 0 rgba(255, 90, 180, .55), 0 10px 34px rgba(255, 43, 74, .35);
  animation: flow 5s linear infinite, ring 1.8s ease-out infinite;
}
#sound.cta b { font-weight: 800; letter-spacing: .02em; }
#sound.cta:hover { filter: brightness(1.08); }
#sound.small {
  position: fixed; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); margin: 0;
  padding: 9px 12px; border-radius: 12px; font-size: 17px; color: var(--fg); background: var(--glass);
  border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
#sound.small .tx { display: none; }
#sound.small[aria-pressed="true"] { border-color: transparent; background: var(--hot) padding-box; color: #12101c; }
#sound:focus-visible, #servers button:focus-visible, .links a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes ring { 70% { box-shadow: 0 0 0 16px rgba(255, 90, 180, 0), 0 10px 34px rgba(255, 43, 74, .35); } }

/* the feed: between the title and the buttons (app.js sets top and bottom from their sizes); newest at the top,
   older ones slide down and fade out before the buttons */
main {
  position: fixed; left: 0; right: 0; top: 34%; bottom: 120px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 55%, transparent 100%);
}
#feed {
  position: absolute; top: 6px; left: 0; right: 0; margin: 0 auto; width: min(94vw, 1040px); text-align: center;
  will-change: transform; contain: layout paint; transition: opacity .25s;
}
.l { font-size: clamp(16px, 2.1vw, 25px); line-height: 1.35; padding: .14em 4px; text-wrap: balance; overflow-wrap: anywhere; }
.l:first-child { font-size: clamp(17px, 2.5vw, 30px); }
.l:nth-child(n+4) { opacity: .8; }
.l:nth-child(n+8) { opacity: .58; }
.l:nth-child(n+13) { opacity: .38; }
.l b, .l a.pl { font-weight: 700; }
/* names link to the player pages (ps2tracker.com/<name>): no underline until hovered */
a.pl { text-decoration: none; font-weight: 700; }
a.pl:hover { text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: .08em; }
a.pl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 3px; }
.f1 { color: var(--vs); } .f2 { color: var(--nc); } .f3 { color: var(--tr); } .f4, .f0 { color: var(--nso); }
/* NSO fight for one of the three empires: grey name, then the team they're playing as */
.tm { font-size: .7em; font-weight: 700; margin-left: .28em; letter-spacing: .02em; }
.t1 { color: var(--vs); } .t2 { color: var(--nc); } .t3 { color: var(--tr); }
.v { color: var(--dim); font-style: italic; margin: 0 .4em; font-weight: 400; }
.v1 { color: #ffd166; font-style: normal; font-weight: 700; }
.v2 { color: #ff9f43; }
.v3 { color: #5eead4; }
.w { color: var(--faint); font-size: .68em; margin-left: .55em; white-space: nowrap; }
.l.rq { font-weight: 700; }
.l.rq .x { color: var(--rage); letter-spacing: .03em; margin: 0 .4em; text-shadow: 0 0 14px rgba(255, 43, 74, .55); }
#empty { position: absolute; top: 10px; left: 0; right: 0; text-align: center; color: var(--faint); margin: 0; padding: 0 16px; }
body.has-lines #empty { display: none; }

/* RAGE QUIT */
#rage {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; pointer-events: none;
  opacity: 0; transition: opacity .18s; padding: 0 16px; text-align: center; z-index: 6;
}
#rage::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 50% 48%, rgba(255, 20, 50, .3), transparent 70%);
}
#rage.show { opacity: 1; }
#rage.show .who { pointer-events: auto; }   /* the names are links */
body.raging #feed { opacity: .22; }
#rage .big {
  font: 900 clamp(64px, 15vw, 220px)/.9 Impact, "Anton", "Arial Black", var(--font); color: var(--rage);
  text-transform: uppercase; text-shadow: 0 0 24px rgba(255, 0, 40, .65), 0 0 90px rgba(255, 0, 40, .4), 0 6px 0 #5a0012;
}
#rage.show .big { animation: shake .55s cubic-bezier(.36, .07, .19, .97) both, slam .3s ease-out both; }
#rage .who {
  margin-top: .7em; font-size: clamp(15px, 2.4vw, 26px); padding: .45em 1em; border-radius: 18px; max-width: min(92vw, 900px);
  background: rgba(14, 13, 22, .92); border: 1px solid var(--line); text-wrap: balance;
}
#rage .who .nw { white-space: nowrap; }
@keyframes slam { from { transform: scale(1.9); opacity: 0; } }
@keyframes shake {
  10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 0; } 30%, 50%, 70% { translate: -8px 0; } 40%, 60% { translate: 8px 0; }
}

/* servers and links */
footer { position: fixed; left: 0; right: 0; bottom: max(12px, env(safe-area-inset-bottom)); text-align: center; padding: 0 16px; z-index: 4; }
#servers { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#servers button {
  font-size: 14px; font-weight: 600; color: var(--muted); padding: 7px 15px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: color .15s, border-color .15s, transform .15s;
}
#servers button:hover { color: var(--fg); border-color: #3d3b52; transform: translateY(-1px); }
#servers button[aria-pressed="true"] {
  color: #0b0b12; border-color: transparent; background: var(--cool); box-shadow: 0 6px 22px rgba(123, 97, 255, .35); background-origin: border-box;
}
/* one line above the links on the feed page: the owner's other PlanetSide 2 site */
.ra { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ra a { color: var(--fg); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.ra a:hover { text-decoration-color: currentColor; }
.ra a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.links { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; }
.links a { color: var(--dim); text-decoration: none; }
.links a:hover { color: var(--fg); }
.links .sep { color: var(--faint); }
.nojs { position: fixed; top: 40%; left: 0; right: 0; text-align: center; color: var(--muted); padding: 0 16px; }

/* About, Terms, Privacy */
body.page { overflow: auto; }
.page .wrap { max-width: 780px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 16px 40px; }
.page .back {
  display: inline-flex; align-items: center; gap: .5em; text-decoration: none; font-weight: 700; color: #12101c;
  padding: 9px 16px; border-radius: 12px; background: var(--hot);
}
.page h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.05; letter-spacing: -.02em; margin: 26px 0 8px; }
.page h1 .grad {
  background: linear-gradient(90deg, #ff2b4a, #ff5ab4, #ffb347, #ff2b4a); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: flow 6s linear infinite;
}
.page .updated { color: var(--faint); margin: 0 0 22px; }
.page .card {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; margin: 0 0 16px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 17px; line-height: 1.6;
}
.page .card h2 { font-size: 21px; margin: 0 0 8px; }
.page .card p, .page .card ul { margin: 0 0 10px; color: #dedbf0; }
.page .card p:last-child, .page .card ul:last-child { margin-bottom: 0; }
.page .card a { color: #7cf8ff; }
.page .card code { font-size: .92em; background: rgba(255, 255, 255, .07); padding: 1px 6px; border-radius: 6px; }
.page footer { position: static; margin-top: 26px; }

/* Who rage quit (/quitters) */
.q-stats { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; margin: 0 0 16px; }
.q-card {
  background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.q-total { display: flex; flex-direction: column; justify-content: center; }
.q-num {
  font-size: clamp(34px, 6vw, 52px); font-weight: 700; line-height: 1; letter-spacing: -.02em;
  background: linear-gradient(100deg, #ff2b4a, #ff5ab4, #ffb347); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.q-num.q-on { background: linear-gradient(100deg, #3ddc84, #7cf8ff); -webkit-background-clip: text; background-clip: text; }
.q-label { color: var(--muted); font-size: 14px; margin-top: 6px; }
.q-factions .q-label { display: block; margin: 0 0 8px; color: var(--fg); font-weight: 700; font-size: 15px; }
.q-frow { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; margin: 5px 0; font-size: 14px; }
.q-fname { font-weight: 700; }
.q-fbar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.q-fill { display: block; height: 100%; border-radius: 6px; background: currentColor; transition: width .4s; }
.q-fn { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.q-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.q-filters button {
  font-size: 14px; font-weight: 600; color: var(--muted); padding: 7px 15px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line);
}
.q-filters button[aria-pressed="true"] { color: #0b0b12; border-color: transparent; background: var(--cool); background-origin: border-box; }
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.q-item {
  display: grid; grid-template-columns: 172px 1fr auto; align-items: center; gap: 14px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px;
}
.q-item.is-on { border-color: rgba(61, 220, 132, .45); box-shadow: 0 0 0 1px rgba(61, 220, 132, .15), 0 8px 28px rgba(61, 220, 132, .08); }
.q-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.q-state.on { color: #3ddc84; } .q-state.off { color: var(--dim); } .q-state.unk { color: var(--faint); }
.q-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.q-state.on .q-dot { box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: online 1.8s infinite; }
@keyframes online { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 132, 0); } }
.q-name { font-size: 19px; overflow-wrap: anywhere; }
.q-name a.pl, .q-how a.pl { font-weight: 700; }
.otag { color: var(--muted); font-weight: 600; font-size: .86em; letter-spacing: .02em; }
.q-how { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.q-weapon { color: var(--dim); }
.q-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--dim); white-space: nowrap; }
.q-server { color: var(--muted); font-weight: 600; }
.q-empty { text-align: center; color: var(--muted); margin: 30px 0; font-size: 17px; }
.q-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 18px 0 4px; }
.q-more[hidden] { display: none; }
.q-more button {
  font-size: 15px; font-weight: 700; color: var(--fg); padding: 10px 22px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line);
}
.q-more button:hover { border-color: #3d3b52; }
.q-more button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.q-count { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.q-table-card { margin: 0 0 14px; }
.q-table-card h2 { font-size: 16px; margin: 0 0 10px; }
.q-table-wrap { overflow-x: auto; }
.q-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.q-table th, .q-table td { padding: 8px 10px; text-align: right; white-space: nowrap; }
.q-table th:first-child { text-align: left; font-weight: 600; color: var(--fg); }
.q-table thead th { font-size: 13px; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.q-table tbody tr, .q-table tfoot tr { cursor: pointer; }
.q-table tbody tr:hover, .q-table tfoot tr:hover { background: rgba(255, 255, 255, .04); }
.q-table tr.sel { background: rgba(124, 248, 255, .08); box-shadow: inset 3px 0 0 #7cf8ff; }
.q-table tr:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.q-table tfoot th, .q-table tfoot td { border-top: 1px solid var(--line); font-weight: 700; }
.q-table td.zero { color: var(--faint); }
.q-table td.lead { font-weight: 800; }
.q-table td.lead::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-left: 6px; vertical-align: middle; }
.q-table td.q-all { color: var(--fg); font-weight: 700; }
.q-only { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--muted); font-size: 14px; cursor: pointer; }
.q-only input { accent-color: #3ddc84; width: 16px; height: 16px; }

@media (max-width: 760px) {
  .q-table { font-size: 14px; }
  .q-table th, .q-table td { padding: 7px 6px; }
  .q-stats { grid-template-columns: 1fr 1fr; }
  .q-factions { grid-column: 1 / -1; }
  .q-item { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .q-state { grid-column: 1 / -1; }
  .q-meta { grid-row: 2; grid-column: 2; }
}
@media (max-width: 560px) {
  #sound.cta { font-size: 16px; padding: 12px 18px; }
  #servers button { font-size: 13px; padding: 6px 12px; }
  .page .card { padding: 18px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
