/* /cs/play/ - Counter-Strike 1.6 in the browser, in the SWEDEN CODES look.
   Tokens = site/css/style.css :root. Server cards = the homepage CS monitors (cspub-20261017.css + the ZP world card,
   measured 2026-11-07): 8px card, photo head, accent band with players/map, two icon highlights, 48px Chakra button.
   Accents through --cp-* only: ZP red (--c-zombie #E8414D, label #FF8DA1, band #4B1B2B), PUBLIC deep purple (#9A34E6,
   owner's pick 2026-10-17). Fonts are the site's own files (/assets/fonts), same origin for the page CSP. */

@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("/assets/fonts/chakra-petch-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("/assets/fonts/chakra-petch-700-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/inter-400-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400 800; font-display: swap; src: url("/assets/fonts/inter-400-latin-ext.woff2") format("woff2"); unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/jetbrains-mono-400-latin.woff2") format("woff2"); }

:root {
  --c-void: #060A12; --c-void-2: #03060C; --c-panel: #0B1220; --c-panel-2: #0E1729; --c-grid: #1B2840;
  --c-hot: #F7FAFF; --c-white: #EAF0F7; --c-body: #B9C6D8; --c-gray: #8295AC; --c-gray-dim: #5C6B82;
  --c-brand: #E9F2FA; --c-good: #46D6A0; --c-red: #FF3B47;
  --font-display: "Chakra Petch", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --maxw: 1180px;
}

/* one accent set per server */
.t-zp {
  --cp-accent: #ff8da1; --cp-strong: #e8414d; --cp-button: #c0303d; --cp-hover: #a42733; --cp-band: #4b1b2b;
  --cp-rgb: 232, 65, 77; --cp-accent-rgb: 255, 141, 161; --cp-band-rgb: 75, 27, 43;
  --cp-photo: url("/assets/cs-art-20260911/zombie-survival.webp");
}
.t-pub {
  --cp-accent: #c9a0ff; --cp-strong: #9a34e6; --cp-button: #7526b4; --cp-hover: #611e96; --cp-band: #26103d;
  --cp-rgb: 154, 52, 230; --cp-accent-rgb: 201, 160, 255; --cp-band-rgb: 38, 16, 61;
  --cp-photo: url("/assets/cspub-20261017/scene.webp");
}
.t-zp, .t-pub { --cp-line: rgba(var(--cp-accent-rgb), .42); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--c-void); color: var(--c-white); font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--c-brand); color: var(--c-void); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------------------------------------ page */
#menu {
  position: relative; min-height: 100vh; isolation: isolate;
  background:
    radial-gradient(900px 480px at 18% -8%, rgba(232, 65, 77, .13), transparent 70%),
    radial-gradient(900px 480px at 88% -4%, rgba(154, 52, 230, .14), transparent 70%),
    linear-gradient(180deg, #070b13 0%, var(--c-void) 60%);
}
#menu::before {   /* the site's faint grid */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(140, 170, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 170, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000 0%, transparent 70%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 max(16px, calc((100vw - var(--maxw)) / 2));
  background: rgba(6, 10, 18, .72); border-bottom: .8px solid rgba(140, 170, 255, .1);
  backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--c-white); text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.wordmark { font: 700 15px/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--c-hot); white-space: nowrap; }
.wordmark span { color: var(--c-brand-dim, #7E92A8); }
.topbar__right { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 7px;
  border: .8px solid rgba(181, 209, 236, .22); background: linear-gradient(rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  color: var(--c-body); font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
}
a.chip:hover { color: var(--c-hot); border-color: rgba(233, 242, 250, .5); }
.chip--beta { color: #bcdfcd; }
.chip--beta i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-good); box-shadow: 0 0 0 3px rgba(70, 214, 160, .18); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.hero { padding: 56px 0 28px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--c-gray); font: 600 12px/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--c-gray); }
.hero h1 { margin: 0; font: 700 clamp(34px, 5vw, 56px)/1.02 var(--font-display); letter-spacing: .02em; text-transform: uppercase; color: var(--c-hot); }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ff8da1, #c9a0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 16px 0 0; max-width: 560px; color: var(--c-body); font-size: 16px; line-height: 1.6; }

.namebox { padding: 16px; border-radius: 8px; border: .8px solid var(--c-grid); background: linear-gradient(rgba(14, 23, 41, .82), rgba(11, 18, 32, .82)); }
.namebox label { display: block; margin-bottom: 8px; color: var(--c-gray); font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.namebox input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 7px; border: .8px solid rgba(181, 209, 236, .22);
  background: rgba(3, 6, 12, .7); color: var(--c-hot); font: 600 16px/1 var(--font-body); outline: none;
}
.namebox input:focus { border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(214, 234, 255, .14); }
.namebox small { display: block; margin-top: 8px; color: var(--c-gray); font-size: 12px; line-height: 1.45; }

/* ------------------------------------------------------------------------------------------------ server cards */
.servers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-bottom: 28px; }
.card {
  position: relative; isolation: isolate; overflow: hidden; min-width: 0; display: flex; flex-direction: column;
  border: .8px solid var(--cp-line); border-radius: 8px; background: #080a0d; box-shadow: 0 16px 40px rgba(0, 0, 0, .333);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card.is-picked { border-color: rgba(var(--cp-accent-rgb), .9); box-shadow: 0 0 0 2px rgba(var(--cp-rgb), .85), 0 18px 60px -18px rgba(var(--cp-rgb), .8); }
.card:hover { border-color: rgba(var(--cp-accent-rgb), .75); box-shadow: 0 18px 46px rgba(0, 0, 0, .4), 0 0 0 1px rgba(var(--cp-rgb), .18), 0 14px 60px -24px rgba(var(--cp-rgb), .55); }
.card__head {
  position: relative; min-height: 152px; aspect-ratio: 3.2 / 1; padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  background: var(--cp-photo) 80% 32% / cover no-repeat;
}
.card__head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 9, 12, .12) 0%, rgba(7, 9, 12, 0) 38%, rgba(7, 9, 12, .82) 100%), linear-gradient(90deg, rgba(7, 9, 12, .6) 0%, rgba(7, 9, 12, 0) 62%);
}
.tag {
  position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 4px;
  border: .8px solid rgba(var(--cp-accent-rgb), .55); background: var(--cp-band); color: var(--cp-accent);
  font: 600 11px/1.2 var(--font-body); text-transform: uppercase;
}
.tag svg { width: 14px; height: 14px; flex: none; }
.live {
  position: relative; display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 5px 9px; border-radius: 4px;
  border: .8px solid rgba(255, 255, 255, .15); background: rgba(11, 16, 23, .91); color: #bcdfcd; font: 500 11px/1.2 var(--font-body);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: #8295ac; flex: none; }
[data-state="online"] .dot { background: var(--c-good); box-shadow: 0 0 0 3px rgba(70, 214, 160, .18); }
[data-state="offline"] .dot { background: var(--c-red); box-shadow: 0 0 0 3px rgba(255, 59, 71, .18); }
.identity { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.emblem { width: 48px; height: 48px; flex: none; color: var(--cp-strong); filter: drop-shadow(0 0 10px rgba(var(--cp-rgb), .55)); object-fit: contain; }
.card h2 { margin: 0; font: 750 28px/34px var(--font-body); color: #f7f9fc; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.card h2 span { display: block; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--cp-accent); }

.card__body { position: relative; isolation: isolate; flex: 1 1 auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow: hidden; }
.card__body::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--cp-photo) 70% 50% / cover no-repeat; filter: blur(3px); transform: scale(1.04); }
.card__body::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(4, 7, 10, .5) 0%, rgba(4, 7, 10, .68) 55%, rgba(4, 7, 10, .76) 100%); }
.lobby {
  margin: -18px -18px 0; padding: 14px 18px 12px; background: rgba(var(--cp-band-rgb), .6);
  border-top: .8px solid rgba(var(--cp-accent-rgb), .65); border-bottom: .8px solid rgba(255, 255, 255, .15);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 8px 18px; align-items: start;
}
.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font: 700 30px/36px var(--font-body); color: var(--cp-accent); font-variant-numeric: tabular-nums; }
.stat b small { font-size: 15px; font-weight: 500; color: #e0dfe6; margin-left: 5px; }
.stat em { font: 400 13px/20px var(--font-body); color: #f0f2f7; font-style: normal; }
.stat--map { padding: 6px 0 0 18px; gap: 5px; border-left: .8px solid rgba(255, 255, 255, .098); }
.stat--map em { font-size: 12px; line-height: 18px; color: #d1d5df; }
.stat--map b { font: 600 14px/21px var(--font-body); color: #fff; overflow-wrap: anywhere; }
.highlights { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.highlights li { display: flex; align-items: center; gap: 10px; min-width: 0; font: 500 14px/20px var(--font-body); color: #f2f5f9; }
.tick { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(var(--cp-band-rgb), .8); border: .8px solid rgba(var(--cp-accent-rgb), .32); color: var(--cp-accent); }
.tick svg { width: 18px; height: 18px; }

.play {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  min-height: 54px; padding: 12px 16px 12px 18px; border-radius: 7px; cursor: pointer; text-align: left;
  color: #fff; border: .8px solid rgba(var(--cp-accent-rgb), .7);
  background: var(--cp-button) linear-gradient(rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .02) 52%, rgba(0, 0, 0, .12) 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .3), inset 0 -1px rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -14px rgba(var(--cp-rgb), .9);
  font: 700 14px/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase;
  transition: background-color .15s ease, transform .15s ease;
}
.play:hover { background-color: var(--cp-hover); }
.play:active { transform: translateY(1px); }
.play:focus-visible { outline: 2px solid #e3f0ff; outline-offset: 3px; }
.play svg { width: 34px; height: 20px; padding-left: 12px; flex: none; border-left: .8px solid rgba(255, 255, 255, .7); box-sizing: content-box; }
.ipline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; border-top: .8px solid rgba(255, 255, 255, .15); padding-top: 8px; }
.ipline span { font-size: 12px; line-height: 16px; color: #c5d2df; text-transform: uppercase; letter-spacing: .04em; }
.ipline code { grid-column: 1; font: 500 13px/20px var(--font-mono); color: #f1f5fa; }
.ipline button {
  grid-column: 2; grid-row: 1 / span 2; height: 34px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  border: .8px solid rgba(var(--cp-accent-rgb), .35); background: rgba(var(--cp-band-rgb), .55); color: var(--cp-accent);
  font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.ipline button:hover { border-color: var(--cp-accent); }

/* ------------------------------------------------------------------------------------------------ info tiles */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 8px 0 28px; }
.fact { display: flex; gap: 12px; padding: 16px; border-radius: 8px; border: .8px solid var(--c-grid); background: linear-gradient(rgba(14, 23, 41, .7), rgba(11, 18, 32, .7)); }
.fact svg { width: 22px; height: 22px; flex: none; color: var(--c-brand); margin-top: 2px; }
.fact b { display: block; font: 600 14px/1.3 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--c-hot); }
.fact span { display: block; margin-top: 4px; color: var(--c-gray); font-size: 13px; line-height: 1.5; }
.foot { padding: 18px 0 40px; border-top: .8px solid rgba(140, 170, 255, .08); color: var(--c-gray-dim); font-size: 12px; line-height: 1.6; }
.foot a { color: var(--c-gray); }

/* ------------------------------------------------------------------------------------------------ game stage */
#stage { position: fixed; inset: 0; background: #000; }
#canvas { width: 100%; height: 100%; display: block; background: #000; outline: none; }
/* phones: the engine reads every touch itself (no page scroll, zoom, text selection or long-press menu over the game) */
#canvas { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
#loading { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; overflow: hidden; background: var(--c-void); }
#loading::before { content: ""; position: absolute; inset: -20px; background: var(--cp-photo) 70% 40% / cover no-repeat; filter: blur(14px) saturate(1.1); opacity: .5; transform: scale(1.05); }
#loading::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 45%, rgba(6, 10, 18, .45), rgba(6, 10, 18, .92)); }
.load {
  position: relative; z-index: 1; width: min(520px, 100%); overflow: hidden; border-radius: 8px;
  border: .8px solid var(--cp-line); background: rgba(8, 10, 13, .82); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.load__head { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--cp-photo) 75% 35% / cover no-repeat; min-height: 110px; }
.load__head::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 9, 12, .88) 0%, rgba(7, 9, 12, .35) 100%); }
.load__head > * { position: relative; }
.load__head h2 { margin: 0; font: 750 24px/30px var(--font-body); color: #f7f9fc; }
.load__head h2 span { display: block; font-size: 12px; line-height: 18px; font-weight: 600; color: var(--cp-accent); }
.load__body { padding: 18px 20px 20px; border-top: .8px solid rgba(var(--cp-accent-rgb), .65); }
#status { color: var(--c-hot); font: 600 14px/1.4 var(--font-body); min-height: 20px; overflow-wrap: anywhere; }
#track { height: 6px; margin-top: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .08); }
#bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--cp-strong), var(--cp-accent)); box-shadow: 0 0 14px rgba(var(--cp-rgb), .7); transition: width .25s ease; }
.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--c-gray-dim); font: 500 12px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.steps li i { width: 18px; height: 18px; flex: none; border-radius: 50%; border: .8px solid currentColor; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.steps li.is-active { color: var(--c-hot); }
.steps li.is-active i { border-color: var(--cp-accent); color: var(--cp-accent); box-shadow: 0 0 0 3px rgba(var(--cp-rgb), .2); }
.steps li.is-done { color: var(--c-body); }
.steps li.is-done i { border-color: var(--c-good); color: var(--c-good); }
.load__tip { margin: 16px 0 0; padding-top: 12px; border-top: .8px solid rgba(255, 255, 255, .08); color: var(--c-gray); font-size: 13px; line-height: 1.5; }
.load__tip b { color: var(--c-body); font-weight: 600; }

/* in-game controls: small, out of the way, brighter on hover */
.hud { position: fixed; right: 10px; bottom: 10px; z-index: 2100; display: flex; gap: 6px; opacity: .55; transition: opacity .2s ease; }
.hud:hover, .hud:focus-within { opacity: 1; }
.hud button {
  height: 30px; padding: 0 10px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  border: .8px solid rgba(181, 209, 236, .22); background: rgba(8, 12, 20, .78); color: var(--c-body);
  font: 600 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hud button:hover { color: var(--c-hot); border-color: rgba(var(--cp-accent-rgb, 233, 242, 250), .6); }
.hud svg { width: 14px; height: 14px; }
#log {
  position: fixed; left: 10px; right: 10px; bottom: 48px; height: 40vh; z-index: 2100; margin: 0; overflow: auto;
  background: rgba(3, 6, 12, .9); color: #cfd8e3; font: 12px/1.4 var(--font-mono); padding: 10px; border-radius: 8px;
  border: .8px solid var(--c-grid); white-space: pre-wrap;
}

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .servers { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .topbar { height: 56px; }
  .chip--back { display: none; }
  .card__head { padding: 14px 16px; }
  .identity { left: 16px; right: 16px; }
  .card h2 { font-size: 26px; line-height: 32px; }
  .emblem { width: 40px; height: 40px; }
  .highlights { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------------------------------------ phones and tablets */
:root:not(.is-touch) .only-touch, .is-touch .only-mouse { display: none; }
/* .namebox small sets display: block, so these need the .namebox scope to win */
.namebox .ios-tip { display: none; }
.is-ios.is-touch .namebox .ios-tip { display: block; margin-top: 8px; }
.ios-tip b { color: var(--c-hot); font-weight: 600; }
/* the touch layout (cstrike/touch.cfg) keeps the top-left corner free: the in-game buttons go there, icon only */
.is-touch .hud { top: calc(6px + env(safe-area-inset-top)); left: calc(6px + env(safe-area-inset-left)); right: auto; bottom: auto; opacity: .7; }
.is-touch .hud button { width: 34px; height: 34px; padding: 0; justify-content: center; }
.is-touch .hud .lbl, .is-touch #logToggle { display: none; }
#rotate { display: none; }
@media (orientation: portrait) {
  .is-touch.in-game #rotate {
    position: fixed; inset: 0; z-index: 3000; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 24px; text-align: center; background: var(--c-void); color: var(--c-body);
  }
  #rotate svg { width: 64px; height: 64px; color: var(--c-brand); }
  #rotate b { font: 700 20px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--c-hot); }
  #rotate span { font-size: 14px; color: var(--c-gray); }
}
