/* Zombie (zombie.aigame3d.com) theme: "dead hour" — night teal-black, toxic green, blood red, bone.
   Applies to the home page only (.menu-screen:not(.overlay)); the in-game pause menu keeps the CS look. */
:root {
  --hn-bg: #07100d; --hn-card: rgba(10, 22, 17, .72); --hn-line: rgba(124, 255, 79, .28);
  --hn-green: #8dff5a; --hn-green-2: #3fbf2a; --hn-red: #e5453a; --hn-bone: #ece6d6; --hn-dim: #9db3a4;
}

.menu-screen:not(.overlay) {
  background:
    radial-gradient(ellipse 60% 50% at 82% 8%, rgba(229, 69, 58, .30), transparent 60%),
    radial-gradient(ellipse 80% 60% at 20% 100%, rgba(63, 191, 42, .16), transparent 65%),
    linear-gradient(180deg, #0a1511 0%, #060b09 100%);
  color: var(--hn-bone); font-family: "Segoe UI", Tahoma, Arial, sans-serif; overflow: hidden;
}

/* ---- atmosphere ---- */
.hn-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.menu-screen.overlay .hn-bg { display: none; }
.hn-bg .moon { position: absolute; right: 9%; top: 7%; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #ff7d6e, #c92a22 58%, #6a0f0c); box-shadow: 0 0 80px 30px rgba(229, 69, 58, .35); opacity: .9; animation: hn-moon 7s ease-in-out infinite; }
@keyframes hn-moon { 50% { box-shadow: 0 0 110px 44px rgba(229, 69, 58, .5); } }
.hn-bg .fog { position: absolute; left: -30%; width: 160%; height: 36%; background: radial-gradient(ellipse at center, rgba(160, 220, 170, .10), transparent 70%); filter: blur(18px); }
.hn-bg .fog.f1 { bottom: 14%; animation: hn-fog 38s linear infinite; }
.hn-bg .fog.f2 { bottom: 2%; animation: hn-fog 56s linear infinite reverse; opacity: .8; }
@keyframes hn-fog { from { transform: translateX(-10%); } to { transform: translateX(10%); } }
.hn-bg .stars { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 12% 18%, #cfe 50%, transparent), radial-gradient(1px 1px at 33% 9%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 58% 21%, #cfe 50%, transparent), radial-gradient(1px 1px at 71% 12%, #fff 50%, transparent), radial-gradient(1px 1px at 90% 30%, #cfe 50%, transparent), radial-gradient(1px 1px at 22% 36%, #fff 50%, transparent); opacity: .7; }
.hn-bg .horde { position: absolute; right: 0; bottom: 150px; width: min(62vw, 880px); height: auto; opacity: .95; }
.hn-bg .horde use { transform-box: fill-box; transform-origin: 50% 100%; animation: hn-sway 3.4s ease-in-out infinite; }
.hn-bg .horde use:nth-child(2n) { animation-duration: 4.1s; animation-delay: -1.2s; }
.hn-bg .horde use:nth-child(3n) { animation-duration: 2.9s; animation-delay: -2s; }
@keyframes hn-sway { 0%, 100% { transform: rotate(-1.6deg) translateX(0); } 50% { transform: rotate(1.6deg) translateX(5px); } }

.menu-screen:not(.overlay) > .logo, .menu-screen:not(.overlay) > .main-buttons, .menu-screen:not(.overlay) > .hn-sub, .menu-screen:not(.overlay) > .home-rotate { position: relative; z-index: 1; }
.menu-screen:not(.overlay) > #hn-side, .menu-screen:not(.overlay) > #home-maps, .menu-screen:not(.overlay) > .lang-switch { z-index: 2; }
.menu-screen:not(.overlay) { padding-left: 6%; }

/* ---- logo ---- */
:root { --hn-display: Anton, "Segoe UI Black", "Arial Black", Impact, sans-serif; }   /* Anton covers Vietnamese; the others are only a fallback while it loads */
/* the logo is plain capitals ("ZOMBIE"): chrome-style letters with a hard highlight line, a dark outline,
   a solid extrusion and a glow, tilted a little like a game title */
.menu-screen:not(.overlay) .hn-logo { font: 400 86px/0.95 var(--hn-display); letter-spacing: 4px; margin-bottom: 18px; text-shadow: none; text-transform: uppercase; }
.hn-logo .hn-a, .hn-logo .hn-b { display: inline-block; transform: skewX(-7deg); text-shadow: none; color: transparent;   /* text-shadow would show through the clipped gradient: the depth comes from drop-shadow below */ -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 2.5px #03100a; paint-order: stroke fill; }
.hn-logo .hn-a { background-image: linear-gradient(180deg, #ffffff 0%, #efe8d2 44%, #a39878 50%, #d6cdb0 62%, #f3ecd6 100%); filter: drop-shadow(0 4px 0 #000) drop-shadow(0 7px 10px rgba(0, 0, 0, .55)); }
.hn-logo .hn-b { background-image: linear-gradient(180deg, #f2ffb8 0%, #9cff62 42%, #1f9a17 50%, #5fe03c 62%, #a4ff70 100%); filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 20px rgba(141, 255, 90, .65)); animation: hn-flicker 6s infinite; }
.hn-logo i { font: 700 22px "Segoe UI", Tahoma, sans-serif; color: var(--hn-red); margin-left: 6px; letter-spacing: 1px; text-shadow: 0 0 12px rgba(229, 69, 58, .6); }
.hn-logo small { display: block; margin-top: 12px; max-width: 540px; font: 600 15px/1.45 "Segoe UI", Tahoma, sans-serif; letter-spacing: .5px; color: var(--hn-dim); }
@keyframes hn-flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .55; } 95% { opacity: 1; } 97% { opacity: .7; } }

/* ---- buttons ---- */
.menu-screen:not(.overlay) .main-buttons { width: min(430px, 92vw); display: flex; flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.menu-screen:not(.overlay) .main-buttons button { font: 600 15px "Segoe UI", Tahoma, sans-serif; color: var(--hn-bone); border: 1px solid var(--hn-line); border-radius: 12px; background: var(--hn-card); backdrop-filter: blur(6px); padding: 10px 14px; transition: transform .12s, border-color .12s, background .12s; }
.menu-screen:not(.overlay) .main-buttons button:hover { background: rgba(141, 255, 90, .14); border-color: var(--hn-green); transform: translateY(-2px); color: #fff; }
.menu-screen:not(.overlay) .main-buttons .play-now { flex: 1 0 100%; position: relative; border: none; color: #08200a; text-align: center; font: 400 28px/1.1 var(--hn-display); letter-spacing: 3px; padding: 17px 20px 15px;
  background: linear-gradient(180deg, #b6ff7c, #4fd433); box-shadow: 0 0 0 0 rgba(141, 255, 90, .6), 0 8px 28px rgba(63, 191, 42, .35); animation: hn-pulse 2.2s infinite; text-transform: uppercase; }
.menu-screen:not(.overlay) .main-buttons .play-now::before { content: '\2620\00a0\00a0'; }
.menu-screen:not(.overlay) .main-buttons .play-now:hover { background: linear-gradient(180deg, #d0ff9f, #66e84a); color: #000; transform: translateY(-2px) scale(1.01); }
@keyframes hn-pulse { 70% { box-shadow: 0 0 0 16px rgba(141, 255, 90, 0), 0 8px 28px rgba(63, 191, 42, .35); } 100% { box-shadow: 0 0 0 0 rgba(141, 255, 90, 0), 0 8px 28px rgba(63, 191, 42, .35); } }
.menu-screen:not(.overlay) .main-buttons .squad { flex: 1 1 calc(50% - 5px); text-align: center; border-color: rgba(236, 230, 214, .35); font-weight: 700; }
.menu-screen:not(.overlay) .main-buttons .squad::before { content: '\1F465\00a0'; }
.menu-screen:not(.overlay) .main-buttons .chip { flex: 0 0 auto; padding: 6px 12px; font-size: 12px; border-radius: 999px; color: var(--hn-dim); }
.menu-screen:not(.overlay) .main-buttons button.hidden { display: none; }
.menu-screen:not(.overlay) .hn-sub { color: var(--hn-dim); font-size: 12px; max-width: 430px; }

/* ---- side card: squad identity, join by code, live squads ---- */
#hn-side { position: absolute; right: 24px; top: 70px; width: 340px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--strip) - 100px); overflow: auto; }
.menu-screen.overlay #hn-side { display: none; }
.hn-card { background: var(--hn-card); border: 1px solid var(--hn-line); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(8px); }
.hn-card h3 { margin: 0 0 8px; font: 800 13px "Segoe UI", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hn-green); }
#hn-emblems { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
#hn-emblems button { color: var(--hn-bone); width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--hn-line); background: rgba(0, 0, 0, .3); font-size: 18px; padding: 0; text-align: center; cursor: pointer; }
#hn-emblems button.on { border-color: var(--hn-green); background: rgba(141, 255, 90, .18); box-shadow: 0 0 10px rgba(141, 255, 90, .3); }
.hn-card input { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, .35); border: 1px solid var(--hn-line); border-radius: 9px; color: var(--hn-bone); padding: 8px 10px; font: 600 14px "Segoe UI", sans-serif; }
.hn-card input:focus { outline: none; border-color: var(--hn-green); }
.hn-row { display: flex; gap: 8px; margin-top: 8px; }
.hn-row button { border: 1px solid var(--hn-green-2); background: rgba(63, 191, 42, .22); color: var(--hn-bone); border-radius: 9px; padding: 8px 14px; font: 700 13px "Segoe UI", sans-serif; cursor: pointer; }
.hn-row button:hover { background: rgba(63, 191, 42, .45); }
#hn-code { text-transform: uppercase; letter-spacing: 3px; }
.menu-screen:not(.overlay) #home-live { position: static; width: auto; max-height: none; background: var(--hn-card); border: 1px solid var(--hn-line); border-radius: 14px; backdrop-filter: blur(8px); padding: 14px 16px; }
.menu-screen:not(.overlay) #home-live h3 { font: 800 13px "Segoe UI", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hn-green); }
.menu-screen:not(.overlay) #home-live .msg { color: var(--hn-dim); }

/* ---- journey strip ---- */
.menu-screen:not(.overlay) #home-maps { background: linear-gradient(0deg, rgba(3, 8, 6, .92) 0%, rgba(3, 8, 6, .55) 70%, transparent 100%); }
.menu-screen:not(.overlay) #home-maps h3 { font: 800 13px "Segoe UI", sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hn-green); }
.menu-screen:not(.overlay) .map-card { background: rgba(10, 22, 17, .8); border: 1px solid var(--hn-line); border-radius: 12px; }
.menu-screen:not(.overlay) .map-card .mc-name { color: var(--hn-bone); }
.menu-screen:not(.overlay) .map-card.lvl.current { border-color: var(--hn-green); box-shadow: 0 0 18px rgba(141, 255, 90, .4); }
.menu-screen:not(.overlay) .map-card.lvl.current .mc-status { color: var(--hn-green); }
.menu-screen:not(.overlay) .map-card.lvl:not(.locked):not(.current) .mc-status { color: #6fcf60; }
.menu-screen:not(.overlay) .map-card.lvl .mc-type { color: var(--hn-red); }
.menu-screen:not(.overlay) .map-card:hover { border-color: var(--hn-green); }
.menu-screen:not(.overlay) .map-card .stars { color: #ffd34a; padding: 0 8px; font-size: 12px; letter-spacing: 2px; }
.menu-screen:not(.overlay) .lang-switch select { background: var(--hn-card); border-color: var(--hn-line); color: var(--hn-bone); border-radius: 999px; }

/* ---- invite dialog ---- */
#menu-invite { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, 94vw); background: rgba(8, 18, 14, .96); border: 1px solid var(--hn-line); border-radius: 16px; color: var(--hn-bone); }
#menu-invite h2 { color: var(--hn-green); }
#invite-code { font: 900 38px Impact, sans-serif; letter-spacing: 8px; text-align: center; color: var(--hn-bone); margin: 4px 0 10px; }
#invite-link { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, .4); border: 1px solid var(--hn-line); border-radius: 9px; color: var(--hn-bone); padding: 8px 10px; font: 13px Consolas, monospace; }
#menu-invite .row { flex-wrap: wrap; justify-content: stretch; }
#menu-invite .row button { flex: 1 1 30%; border-radius: 9px; text-align: center; }

/* ---- live background (client/demo.js): let the 3D scene show through the menu and keep the text readable ---- */
body.has-demo .menu-screen:not(.overlay) {
  background:
    linear-gradient(90deg, rgba(4, 9, 7, .86) 0%, rgba(4, 9, 7, .45) 48%, rgba(4, 9, 7, .55) 100%),
    linear-gradient(180deg, rgba(4, 9, 7, .45) 0%, rgba(4, 9, 7, 0) 30%, rgba(4, 9, 7, .55) 100%);
}
body.has-demo .hn-bg .horde, body.has-demo .hn-bg .fog, body.has-demo .hn-bg .stars { display: none; }
body.has-demo .hn-bg .moon { opacity: .35; }

/* ---- home page layout polish: sidebar order (what people come back for first), emblem grid, "More" menu, phone header ---- */
#hn-side > * { flex-shrink: 0; }   /* when the column is too tall it scrolls; cards must not squash */
#hn-myrooms { order: 1; } #hn-joincode { order: 2; } #home-live { order: 3; } #hn-daily { order: 4; } #hn-board { order: 5; } #hn-squad { order: 6; }
#hn-emblems, .sq-emblems { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
#hn-emblems button, .sq-emblems button { width: 100%; height: 34px; font-size: 17px; }
@media (max-width: 600px) {
  body .menu-screen:not(.overlay) { padding-top: 56px; }   /* room for the language switch above the logo ("body" beats the 900px rule further down) */
  body .menu-screen:not(.overlay) .lang-switch { top: 10px; right: 12px; }
  body .menu-screen:not(.overlay) .lang-switch select { padding: 5px 10px; font-size: 13px; }
  body .menu-screen:not(.overlay) .hn-logo { font-size: 46px; }
  .menu-screen:not(.overlay) .main-buttons .chip { flex: 1 1 0; text-align: center; padding: 9px 6px; }   /* Statistics / Options / Controls share one row */
}

/* the buy menu's close button (phones have no Esc / B key to close it) */
#buy-close { position: absolute; top: 6px; right: 6px; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; text-align: center; z-index: 2; }
#menu-buy h2 { padding-right: 44px; }

/* a close X that stays in view while a long dialog scrolls (sticky + float: it sits at the top right of the scrolling box) */
.dlg-x { position: absolute; top: 8px; right: 8px; z-index: 3; width: 40px; height: 40px; padding: 0; border-radius: 50%; font-size: 18px; line-height: 1; text-align: center; background: rgba(8, 18, 14, .95); }

/* ---- Armory: weapon guide ---- */
#menu-armory:not(.hidden) { display: flex; flex-direction: column; }   /* only the weapon list scrolls; title, filters and the X stay put */
#menu-armory { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(860px, 96vw); height: min(640px, 90vh); overflow: hidden; box-sizing: border-box; background: rgba(8, 18, 14, .97); border: 1px solid var(--hn-line); border-radius: 16px; color: var(--hn-bone); }
#menu-armory h2 { color: var(--hn-green); }
#menu-armory h2 { flex: none; padding-right: 48px; }
#armory-body { text-align: left; display: flex; flex-direction: column; flex: 1; min-height: 0; }
#armory-body > .ar-filters { flex: none; }
.ar-list { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
@media (max-height: 520px) {   /* phones held sideways: keep the fixed part small */
  #menu-armory h2 { margin: 0 0 4px; font-size: 16px; }
  #menu-armory .ar-filters { margin-bottom: 4px; flex-direction: row; gap: 10px; }
  .ar-filters .ar-row { flex: 1; min-width: 0; }
  #menu-armory .ar-row { flex-wrap: nowrap; overflow-x: auto; }
  .ar-row button { flex: none; padding: 3px 10px; }
}
.ar-how { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--hn-line); border-radius: 12px; background: rgba(0, 0, 0, .28); font-size: 14px; line-height: 1.45; }
.ar-how summary { cursor: pointer; font-weight: 700; color: var(--hn-green); }
.ar-how ol { margin: 6px 0 2px; padding-left: 20px; }
.ar-filters { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.ar-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-row button { border-radius: 999px; padding: 5px 12px; font-size: 13px; text-align: center; }
.ar-row button.on { background: rgba(79, 168, 58, .55); border-color: var(--hn-green); }
.ar-cat { margin: 14px 0 6px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--hn-dim); }
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ar-card { padding: 8px; border: 1px solid var(--hn-line); border-radius: 12px; background: rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 4px; }
.ar-card:hover { border-color: var(--hn-green); }
.ar-pic { position: relative; height: 88px; border-radius: 8px; background: radial-gradient(ellipse at 50% 60%, #1c2a22, #0a120e); overflow: hidden; }
.ar-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ar-keys { position: absolute; top: 4px; left: 4px; z-index: 1; font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.25; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .7); border: 1px solid var(--hn-line); color: var(--hn-green); letter-spacing: .06em; }
.ar-keys small { font-size: 10px; font-weight: 400; color: var(--hn-dim); letter-spacing: 0; }
.ar-team { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .6); }
.ar-team.T { color: #ffb86b; } .ar-team.CT { color: #7db4ff; }
.ar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ar-price { color: #7f7; font-weight: 700; }
.ar-stat { display: grid; grid-template-columns: 78px 1fr 62px; align-items: center; gap: 6px; font-size: 11px; color: var(--hn-dim); }
.ar-stat i { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; display: block; }
.ar-stat u { display: block; height: 100%; background: linear-gradient(90deg, #4fa83a, #b7ff5a); }
.ar-stat b { text-align: right; font-weight: 600; color: var(--hn-bone); }
@media (max-width: 520px) { .ar-grid { grid-template-columns: 1fr 1fr; } .ar-stat { grid-template-columns: 1fr 44px; } .ar-stat i { display: none; } .ar-pic { height: 64px; } }

/* ---- "Find a squad" window: squad cards ---- */
#menu-servers { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(640px, 94vw); max-height: 88vh; overflow: auto; box-sizing: border-box; background: rgba(8, 18, 14, .96); border: 1px solid var(--hn-line); border-radius: 16px; color: var(--hn-bone); }
#menu-servers h2 { color: var(--hn-green); }
.sf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.sf-bar button { border-radius: 9px; text-align: center; }
.sf-open { margin-left: auto; font-size: 13px; color: var(--hn-dim); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.squad-cards { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding-right: 2px; }
.sq-card { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--hn-line); border-radius: 12px; background: rgba(0, 0, 0, .28); }
.sq-card:hover { border-color: var(--hn-green); }
.sq-card.full { opacity: .55; }
.sq-card img { width: 84px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: #0a120e; }
.sq-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sq-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.sq-info small { color: var(--hn-dim); }
.sq-info .seats { font-size: 12px; color: var(--hn-green); letter-spacing: 1px; }
.sq-info .seats em { font-style: normal; letter-spacing: 0; color: var(--hn-bone); }
.sq-card > button { flex: none; min-width: 72px; text-align: center; border-radius: 9px; font-weight: 800; }
.sf-empty { padding: 22px 14px; text-align: center; color: var(--hn-dim); border: 1px dashed var(--hn-line); border-radius: 12px; }
.sf-empty p { margin: 0 0 12px; line-height: 1.5; }
.sf-empty .row { justify-content: center; flex-wrap: wrap; }
.sf-adv { margin-top: 12px; font-size: 13px; }
.sf-adv summary { cursor: pointer; color: var(--hn-dim); }
.sf-adv #server-list { margin: 8px 0; }
@media (max-width: 520px) { .sq-card img { width: 64px; height: 44px; } .sf-open { margin-left: 0; width: 100%; } }

/* ---- phone fixes for the dialogs (these come after the base dialog rules on purpose) ---- */
#menu-squad label:not(.sq-check) { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
#menu-squad .sq-emblems { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
#menu-squad .sq-emblems button { width: 100%; height: 36px; font-size: 17px; }
#menu-squad .sq-check { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
#menu-squad .sq-check input, .sf-bar .sf-open input { width: auto; flex: none; margin: 0; }
.sf-bar .sf-open { justify-content: flex-start; gap: 8px; }

/* ---- fullscreen button next to the language switch ---- */
.lang-switch { align-items: center; }
.fs-btn { width: 34px; height: 30px; padding: 0; border-radius: 999px; border: 1px solid var(--hn-line); background: var(--hn-card); color: var(--hn-bone); font-size: 16px; line-height: 1; cursor: pointer; text-align: center; }
.fs-btn:hover, .fs-btn.on { border-color: var(--hn-green); color: var(--hn-green); background: rgba(141, 255, 90, .14); }
.fs-btn.hidden { display: none; }

/* ---- in-game menus on short screens (phones held sideways are ~320-375 px high): they scroll instead of running off the screen,
   so the title and the Cancel line stay reachable; the pause menu gets a small logo ---- */
body.touch-mode #hn-lobby { left: 12px; top: auto; bottom: 58px; transform: none; width: min(44vw, 340px); max-height: 46vh; overflow: auto; z-index: 5; background: rgba(8, 18, 14, .95); }   /* phones: out of the way of the buttons, the radar and the centre message; above the chat lines */
.tb-chat, .tb-radio { top: 10px; width: 44px; height: 44px; font-size: 18px; }
.tb-chat { left: calc(50% - 130px); } .tb-radio { left: calc(50% - 184px); }
/* radio menu: outside #hud now, so it can sit above the touch controls and be tapped */
#radio-menu { position: fixed; z-index: 36; }
body.touch-mode #radio-menu { left: 8px; top: 8px; width: min(320px, 56vw); max-height: calc(100vh - 16px); overflow-y: auto; box-sizing: border-box; padding: 6px; background: rgba(8, 18, 14, .95); border: 1px solid var(--hn-line); border-radius: 10px; }
body.touch-mode #radio-menu .rm-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
body.touch-mode #radio-menu button { display: block; width: 100%; text-align: left; margin: 0 0 4px; padding: 10px 10px; font: 600 14px "Segoe UI", Tahoma, sans-serif; color: var(--hn-bone); background: rgba(0, 0, 0, .35); border: 1px solid var(--hn-line); border-radius: 8px; }
body.touch-mode #radio-menu .rm-tabs button { text-align: center; margin: 0; padding: 6px 4px; font-size: 11px; }
body.touch-mode #radio-menu .rm-tabs button.rm-x { flex: 0 0 34px; width: 34px; font-size: 14px; color: #ff8a7a; }
body.touch-mode #radio-menu .rm-tabs button.on { border-color: var(--hn-green); color: var(--hn-green); background: rgba(141, 255, 90, .14); }
body.touch-mode #radio-menu button b { color: var(--hn-green); margin-right: 4px; }
/* class menu: why a class is locked is written on its button */
#menu-class button:disabled { opacity: .75; }
#menu-class button .lock { display: block; margin-top: 4px; font-size: 11px; font-weight: 400; line-height: 1.3; color: #e8b866; }
.tb-ready { left: auto; right: 14px; top: 8px; width: 60px; height: 60px; font-size: 28px; border-color: var(--hn-green); color: var(--hn-green); }   /* the lobby "ready" tick, top right where nothing else is */
/* the pause menu sits over the running game: a dark veil keeps the radar, wave text and health bar from showing through its buttons;
   the site links at the bottom are for the home page only */
.menu-screen.overlay { background: rgba(4, 9, 7, .86); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.menu-screen.overlay .version { display: none; }
#scoreboard { z-index: 40; pointer-events: none; }   /* above the touch buttons (z 30) so they do not cover its columns; taps pass through to them */
#menu-buy, #menu-class, #menu-team { max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; box-sizing: border-box; }
@media (max-height: 500px) {
  #menu-buy { min-height: 0; padding: 10px 14px; }
  #menu-buy h2, #menu-class h2, #menu-team h2 { margin: 0 0 6px; font-size: 16px; }
  #menu-buy .buy-foot { margin-top: 6px; }
  #menu-class, #menu-team { padding: 10px 14px; }
  .menu-screen.overlay { overflow-y: auto; }
  .menu-screen.overlay .hn-logo { font-size: 34px; margin-bottom: 4px; }
  .menu-screen.overlay .hn-logo small { display: none; }
}

/* ---- edit-squad mode of the same dialog ---- */
#menu-squad[data-mode=edit] .sq-create-only, #menu-squad:not([data-mode=edit]) .sq-edit-only { display: none; }
#menu-squad button.danger { border-color: rgba(229, 69, 58, .6); color: #ff8a7a; flex: 0 1 auto; }
#menu-squad button.danger:hover { background: rgba(229, 69, 58, .25); color: #fff; }
#hn-myrooms .live-row button.edit { border-color: var(--hn-line); background: transparent; padding: 6px 8px; }

/* ---- top squads tabs (All time / This week) ---- */
.hn-tabs { display: flex; gap: 6px; margin: 0 0 8px; }
.hn-tabs button { flex: 1; text-align: center; padding: 5px 8px; font: 700 12px "Segoe UI", sans-serif; border: 1px solid var(--hn-line); border-radius: 8px; background: transparent; color: var(--hn-dim); cursor: pointer; }
.hn-tabs button.on { border-color: var(--hn-green); color: var(--hn-bone); background: rgba(141, 255, 90, .14); }

/* ---- create-squad dialog and "my squads" ---- */
#menu-squad { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, 94vw); background: rgba(8, 18, 14, .96); border: 1px solid var(--hn-line); border-radius: 16px; color: var(--hn-bone); }
#menu-squad h2 { color: var(--hn-green); }
#menu-squad label { display: block; }
#menu-squad input[type=text], #sq-name { width: 100%; box-sizing: border-box; margin-top: 4px; background: rgba(0, 0, 0, .4); border: 1px solid var(--hn-line); border-radius: 9px; color: var(--hn-bone); padding: 9px 10px; font: 600 15px "Segoe UI", sans-serif; }
.sq-emblems { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.sq-emblems button { width: 38px; height: 38px; padding: 0; text-align: center; font-size: 19px; border-radius: 10px; border: 1px solid var(--hn-line); background: rgba(0, 0, 0, .3); }
.sq-emblems button.on { border-color: var(--hn-green); background: rgba(141, 255, 90, .18); box-shadow: 0 0 10px rgba(141, 255, 90, .3); }
.sq-label { margin: 10px 0 6px; font-weight: 700; }
.sq-slots { display: flex; gap: 8px; }
.sq-slots button { flex: 1; text-align: center; font-size: 18px; padding: 10px 0; border-radius: 10px; border: 1px solid var(--hn-line); background: rgba(0, 0, 0, .3); }
.sq-slots button.on { border-color: var(--hn-green); background: rgba(141, 255, 90, .2); color: #fff; }
.sq-check { margin: 12px 0 2px; font-size: 13px; color: var(--hn-dim); }
.sq-check input { width: auto; margin-right: 6px; }
#menu-squad .row { flex-wrap: wrap; justify-content: stretch; }
#menu-squad .row button, #invite-enter { flex: 1 1 auto; text-align: center; border-radius: 9px; }
button.primary { background: rgba(63, 191, 42, .35); border-color: var(--hn-green); color: #fff; }
#hn-myrooms .live-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(124, 255, 79, .12); }
#hn-myrooms .live-row:first-child { border-top: 0; }
#hn-myrooms .live-row > div { flex: 1; min-width: 0; }
#hn-myrooms .live-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hn-myrooms .live-row small { color: var(--hn-dim); }
#hn-myrooms .live-row.closed { opacity: .55; }
#hn-myrooms .live-row button { border: 1px solid var(--hn-green-2); background: rgba(63, 191, 42, .22); color: var(--hn-bone); border-radius: 9px; padding: 6px 10px; font: 700 13px "Segoe UI", sans-serif; cursor: pointer; }
#hn-myrooms .live-row button.del { border-color: var(--hn-line); background: transparent; padding: 6px 8px; }

@media (max-width: 900px) {
  .hn-bg .horde { width: 120vw; bottom: auto; top: 30%; opacity: .35; }
  .hn-bg .moon { width: 90px; height: 90px; }
  .menu-screen:not(.overlay) { padding-left: 16px; padding-right: 16px; overflow-y: auto; justify-content: flex-start; padding-top: 18px; }
  #hn-side { position: static; width: auto; max-height: none; margin-top: 14px; }
  .menu-screen:not(.overlay) .hn-logo { font-size: 52px; }
}
@media (max-height: 800px) and (min-width: 901px) {
  .menu-screen:not(.overlay) .hn-logo { font-size: 58px; margin-bottom: 8px; }
  .menu-screen:not(.overlay) .hn-logo small { font-size: 13px; margin-top: 6px; }
  .menu-screen:not(.overlay) .main-buttons { gap: 7px; }
  .menu-screen:not(.overlay) .main-buttons .play-now { font-size: 22px; padding: 13px 16px; }
  .menu-screen:not(.overlay) .main-buttons button { padding: 8px 12px; }
  .menu-screen:not(.overlay) .main-buttons .chip { padding: 5px 10px; }
  .menu-screen:not(.overlay) .hn-sub { display: none; }
  .hn-bg .horde { bottom: 120px; }
}

/* ---- in-game squad lobby ---- */
#hn-lobby { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: min(420px, 90vw); background: rgba(8, 18, 14, .86); border: 1px solid rgba(124, 255, 79, .35); border-radius: 14px; padding: 14px 18px; color: #ece6d6; font: 14px "Segoe UI", Tahoma, sans-serif; text-align: center; pointer-events: none; }
#hn-lobby h3 { margin: 0 0 8px; color: #8dff5a; letter-spacing: 2px; text-transform: uppercase; font-size: 14px; }
#hn-lobby .lb-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
#hn-lobby .lb-row em { font-style: normal; color: #999; } #hn-lobby .lb-row.ok em { color: #8dff5a; font-weight: bold; }
#hn-lobby .hn-lobby-hint { margin-top: 10px; color: #9db3a4; font-size: 12px; }

/* ---- daily challenge card, endless card ---- */
#hn-daily { display: block; width: 100%; text-align: left; cursor: pointer; color: var(--hn-bone); border-color: rgba(229, 69, 58, .55); background: linear-gradient(135deg, rgba(229, 69, 58, .22), rgba(10, 22, 17, .75)); }
#hn-daily b { display: block; font: 800 14px "Segoe UI", sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #ff8a70; }
#hn-daily small { display: block; margin-top: 4px; color: var(--hn-dim); font-size: 12px; }
#hn-daily:hover { border-color: #ff8a70; }
#hn-daily.done { opacity: .6; }
.menu-screen:not(.overlay) .map-card.endless { background: radial-gradient(circle at 30% 20%, rgba(141, 255, 90, .18), rgba(10, 22, 17, .85)); justify-content: center; }
.menu-screen:not(.overlay) .map-card.endless .mc-name { font-size: 20px; color: var(--hn-green); padding-top: 28px; }

/* ---- leaderboard ---- */
#hn-board .lb-line { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); font-size: 13px; }
#hn-board .lb-line span { color: var(--hn-green); width: 18px; font-weight: 800; }
#hn-board .lb-line b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hn-board .lb-line em { font-style: normal; color: var(--hn-dim); font-size: 12px; white-space: nowrap; }

/* ---- whole-game palette: toxic green instead of CS amber (HUD, dialogs, scoreboard, pause menu) ---- */
:root {
  --hud: rgba(160, 255, 110, 0.9); --hud-dim: rgba(160, 255, 110, 0.45); --hud-red: rgba(255, 70, 55, 0.95);
  --vgui-bg: rgba(6, 14, 11, 0.84); --vgui-border: #4fa83a; --vgui-text: #9bf06a;
}
* { scrollbar-color: rgba(124, 255, 79, .5) transparent; }
.vgui { border-radius: 12px; backdrop-filter: blur(6px); }
.vgui button:hover, .main-buttons button:hover { background: rgba(79, 168, 58, .35); }

/* ---- Tab scoreboard: fits small screens; co-op shows one squad table up top instead of two CS teams ---- */
#scoreboard { width: min(720px, 94vw); max-height: 86vh; overflow: auto; box-sizing: border-box; }
#sb-coop { display: none; }
#scoreboard.coop { top: 14%; transform: translateX(-50%); width: min(560px, 94vw); background: rgba(6, 14, 11, 0.72); }
#scoreboard.coop #sb-coop { display: block; color: var(--hud); font-weight: bold; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--vgui-border); }
#scoreboard.coop .sb-team.ct, #scoreboard.coop .sb-team.t .sb-head { display: none; }
#scoreboard.coop .sb-team.t td { color: #b9f27c; }
#scoreboard.coop .sb-team tr.dead td { color: #ff7a6a; opacity: .8; }
#scoreboard.coop .sb-team tr.h td { color: var(--hud-dim) !important; }
@media (max-width: 600px) { #scoreboard .sb-team td { padding: 2px 3px; font-size: 12px; } #scoreboard.coop { top: 8%; } }

/* ---- SEO text: readable by crawlers and screen readers, not painted over the game; footer links to the guide pages ---- */
.seo-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.version a { color: var(--hn-dim); text-decoration: none; margin-right: 12px; }
.version a:hover { color: var(--hn-green); text-decoration: underline; }