/* GS - GameScape Online: netplay presence HUD (see netplay-hud.js) */
.gs-np {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 2600;
  width: 300px;
  max-width: calc(100vw - 28px);
  border: 1px solid rgb(34 228 255 / 40%);
  border-radius: 3px;
  background-image:
    linear-gradient(180deg, rgb(255 255 255 / 12%) 0%, rgb(255 255 255 / 3%) 46%, transparent 48%),
    linear-gradient(180deg, rgb(14 12 40 / 86%), rgb(5 4 15 / 90%));
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 0 18px rgb(34 228 255 / 16%), 0 12px 30px rgb(0 0 0 / 55%);
  color: #e8ecff;
  font: 500 13px/1.3 "Exo 2", system-ui, sans-serif;
  opacity: .92;
  transition: opacity .2s;
}
.gs-np:hover { opacity: 1; }
.gs-np[hidden] { display: none !important; }

.gs-np__head {
  all: unset;
  box-sizing: border-box;
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px 12px 8px;
  cursor: pointer;
  border-bottom: 1px solid rgb(120 140 255 / 18%);
}
.gs-np__head:focus-visible { outline: 2px solid #5ff3ff; outline-offset: -2px; }
.gs-np__top { display: flex; align-items: center; gap: 8px; }
.gs-np__top b {
  font: 700 11px/1 "Orbitron", system-ui, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
}
.gs-np__live {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #22e4ff;
  box-shadow: 0 0 0 0 rgb(34 228 255 / 60%);
  animation: gs-np-pulse 2s infinite;
}
.gs-np__count {
  margin-left: auto;
  font: 700 12px/1 "Orbitron", system-ui, sans-serif;
  color: #a9f3ff;
}
.gs-np__game { font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-np__game:empty, .gs-np__room:empty { display: none; }
.gs-np__room { font-size: 11.5px; color: rgb(215 222 255 / 60%); }

.gs-np__list { list-style: none; margin: 0; padding: 6px 0; }
.gs-np__slot {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-left: 3px solid var(--slot);
}
.gs-np__slot + .gs-np__slot { margin-top: 2px; }
.gs-np__p { font: 800 11px/1 "Orbitron", system-ui, sans-serif; color: var(--slot); text-shadow: 0 0 8px var(--slot); }
.gs-np__name { display: flex; align-items: center; min-width: 0; font-weight: 600; }
.gs-np__nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-np__tag { flex: none; }
.gs-np__slot.is-empty { border-left-color: rgb(120 140 255 / 25%); }
.gs-np__slot.is-empty .gs-np__p { color: rgb(200 205 255 / 35%); text-shadow: none; }
.gs-np__slot.is-empty .gs-np__name { font-weight: 400; font-style: italic; color: rgb(200 205 255 / 45%); }
.gs-np__tag {
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid rgb(34 228 255 / 45%);
  border-radius: 2px;
  font: 700 9.5px/1.4 "Orbitron", system-ui, sans-serif;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a9f3ff;
}
.gs-np__tag--you { border-color: rgb(224 60 255 / 50%); color: #f3b3ff; }
.gs-np__state { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgb(215 222 255 / 80%); white-space: nowrap; }
.gs-np__state i { width: 7px; height: 7px; border-radius: 1px; background: #8a90b8; }
.gs-np__state--ok i, .gs-np__state--you i { background: #22e4ff; box-shadow: 0 0 6px #22e4ff; }
.gs-np__state--slow i { background: #ff3ecf; }
.gs-np__state--wait i { background: #4f7bff; animation: gs-np-blink 1s infinite; }
.gs-np__state--drop i { background: #ff3ecf; animation: gs-np-blink .6s infinite; }
.gs-np__state--bad i { background: #ff2d7a; }
.gs-np__state--bad { color: #ff6fa3; }

/* Minimised: a small pill */
.gs-np.is-min { width: auto; }
.gs-np.is-min .gs-np__list,
.gs-np.is-min .gs-np__game,
.gs-np.is-min .gs-np__room { display: none; }
.gs-np.is-min .gs-np__head { border-bottom: 0; padding: 8px 12px; }

/* Toasts, bottom-left, Rocket League style */
.gs-np-toasts {
  position: fixed;
  left: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 2600;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.gs-np-toast {
  padding: 8px 14px 8px 12px;
  border-left: 3px solid #22e4ff;
  border-radius: 2px;
  background: rgb(8 6 26 / 90%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgb(0 0 0 / 50%);
  color: #fff;
  font: 600 13px/1.3 "Exo 2", system-ui, sans-serif;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .3s, transform .3s;
}
.gs-np-toast.in { opacity: 1; transform: none; }
.gs-np-toast--leave, .gs-np-toast--warn { border-left-color: #e03cff; }
.gs-np-toast--bad { border-left-color: #ff2d7a; }

@keyframes gs-np-pulse { 70%, 100% { box-shadow: 0 0 0 7px rgb(34 228 255 / 0%); } }
@keyframes gs-np-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .gs-np__live, .gs-np__state i { animation: none !important; }
  .gs-np-toast { transition: none; }
}
@media (width < 600px) {
  .gs-np { width: 220px; top: auto; bottom: 72px; }
}
