:root {
  --bg: #081116;
  --panel: rgba(11, 23, 30, 0.74);
  --panel-strong: rgba(9, 19, 25, 0.92);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eaf3f6;
  --muted: #93a9b4;
  --green: #7bd389;
  --green-dark: #3f9e5a;
  --amber: #ffd166;
  --bird: #6fc3ff;
  --human: #ffd166;
  --danger: #ff6b6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font-family: inherit;
}

#view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

/* ------------------------------------------------------------ фон и меню */

#vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.42) 100%);
  z-index: 2;
  opacity: 0.85;
}

#menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 8%, rgba(72, 130, 150, 0.2), rgba(4, 10, 14, 0.58) 72%),
    linear-gradient(180deg, rgba(5, 12, 17, 0.28), rgba(5, 12, 17, 0.7));
  backdrop-filter: blur(1.5px);
  overflow-y: auto;
}

.menu-card {
  width: min(620px, 100%);
  background: linear-gradient(165deg, rgba(16, 32, 41, 0.95), rgba(8, 18, 24, 0.97));
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 30px 34px 26px;
  box-shadow: var(--shadow);
  position: relative;
  animation: cardIn 0.5s ease-out both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-badge {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(123, 211, 137, 0.35);
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(123, 211, 137, 0.08);
}

.logo {
  font-size: 15px;
  letter-spacing: 0.55em;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 6px;
}

.menu-card h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #ffffff, #b9e8c4 60%, #7bd389);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.motd {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  min-height: 20px;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

#nameInput {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

#nameInput:focus {
  border-color: rgba(123, 211, 137, 0.65);
  box-shadow: 0 0 0 3px rgba(123, 211, 137, 0.13);
}

#playBtn {
  width: 100%;
  margin-top: 4px;
  padding: 15px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #8fe79d, #4fb56c);
  color: #082014;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(80, 190, 110, 0.25);
  transition: transform 0.15s, filter 0.15s;
}

#playBtn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

#playBtn:active {
  transform: translateY(0);
}

#playBtn:disabled {
  opacity: 0.6;
  cursor: wait;
}

#onlineInfo {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.role-card {
  display: flex;
  gap: 10px;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.role-card b {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 2px;
}

.role-card.bird {
  border-color: rgba(111, 195, 255, 0.22);
  background: linear-gradient(160deg, rgba(111, 195, 255, 0.09), rgba(255, 255, 255, 0.02));
}

.role-card.human {
  border-color: rgba(255, 209, 102, 0.2);
  background: linear-gradient(160deg, rgba(255, 209, 102, 0.08), rgba(255, 255, 255, 0.02));
}

.rc-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.menu-foot a {
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}

.menu-foot a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------ загрузка */

#loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: #081116;
}

.loader {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(123, 211, 137, 0.2);
  border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}

.loading-text {
  color: var(--muted);
  font-size: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#errorBox {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  max-width: min(680px, 92vw);
  background: rgba(50, 12, 16, 0.95);
  border: 1px solid rgba(255, 107, 107, 0.45);
  border-radius: 14px;
  padding: 14px 18px;
  color: #ffd9d9;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--shadow);
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #081116;
  z-index: 100;
}

/* ------------------------------------------------------------ HUD */

#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

#profile {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 268px;
  padding: 14px 15px 12px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.role-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.role-icon.bird {
  background: rgba(111, 195, 255, 0.14);
  border-color: rgba(111, 195, 255, 0.3);
}

.role-icon.human {
  background: rgba(255, 209, 102, 0.12);
  border-color: rgba(255, 209, 102, 0.26);
}

.profile-name {
  flex: 1;
  min-width: 0;
}

#playerName {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#roleHint {
  font-size: 11px;
  margin-top: 2px;
}

.score-box {
  text-align: right;
  flex: 0 0 auto;
}

.score-box span {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
  display: block;
}

.score-box small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pips {
  display: flex;
  gap: 4px;
  margin-top: 10px;
  min-height: 12px;
  flex-wrap: wrap;
}

.pip {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pip.hp {
  background: linear-gradient(180deg, #ff8a8a, #e14b4b);
  border-color: rgba(255, 120, 120, 0.55);
  box-shadow: 0 0 9px rgba(255, 80, 80, 0.3);
}

.pip.ammo {
  background: linear-gradient(180deg, #fff6d8, #e7d59a);
  border-color: rgba(255, 240, 190, 0.4);
}

.pip.ammo.empty {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.pips .pip.heal {
  background: linear-gradient(180deg, #9be8a8, #55b872);
  border-color: rgba(120, 220, 150, 0.5);
}

.mushroom-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 13px;
  color: #ffd9e8;
}

.mushroom-row .mush-icon {
  font-size: 16px;
  line-height: 1;
}

.mushroom-row b {
  color: #ff9fc0;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.mushroom-row small {
  color: var(--muted);
  font-size: 11px;
}

.boost-row {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.boost-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}

.boost-line span:first-child {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#boostValue {
  font-variant-numeric: tabular-nums;
  color: #a9e7ff;
}

#boostFill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ee3ff, #4fa8e0);
  transition: width 0.08s linear, background 0.2s;
}

#boostFill.warn {
  background: linear-gradient(90deg, #ffd166, #f0a63c);
}

#boostFill.danger {
  background: linear-gradient(90deg, #ff8a8a, #e14b4b);
}

#leaderboard {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 238px;
  padding: 12px 14px 10px;
}

.panel-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
}

.leader-section {
  margin-bottom: 8px;
}

.leader-section:last-child {
  margin-bottom: 0;
}

.leader-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.leader-row:last-child {
  border-bottom: none;
}

.leader-row .idx {
  color: var(--muted);
  width: 14px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.leader-row .nm {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leader-row .val {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--green);
}

.leader-row.me .nm {
  color: var(--green);
}

.leader-empty {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 0 4px;
}

#feed {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: min(430px, 60vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.feed-item {
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(8, 18, 24, 0.75);
  border: 1px solid var(--border);
  color: #d8e7ec;
  animation: feedIn 0.25s ease-out both;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.feed-item b {
  font-weight: 700;
}

.feed-item.kill {
  border-color: rgba(255, 209, 102, 0.35);
  color: #ffe8ad;
}

.feed-item.join {
  color: #a8e6b4;
}

.feed-item.leave {
  color: #9fb0b8;
}

@keyframes feedIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

#crosshair .dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

#crosshair .ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.38);
}

#crosshair.bird .ring {
  border-color: rgba(255, 236, 170, 0.6);
  border-style: dashed;
}

#statusBar {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(430px, 52vw);
  padding: 10px 14px 11px;
  opacity: 0.98;
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 7px;
  color: #dcebf0;
}

#statusValue {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

#statusFill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ee39c, #4fb56c);
  transition: width 0.08s linear, background 0.2s;
}

#statusFill.warn {
  background: linear-gradient(90deg, #ffd166, #f0a63c);
}

#statusFill.danger {
  background: linear-gradient(90deg, #ff8a8a, #e14b4b);
}

#minimapPanel {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px;
  width: 196px;
}

#minimap {
  width: 180px;
  height: 180px;
  display: block;
  border-radius: 10px;
  background: #0e2016;
}

#lagPanel {
  position: absolute;
  right: 224px;
  bottom: 16px;
  width: 172px;
  padding: 10px 12px;
  font-size: 11px;
  pointer-events: none;
}

.lag-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  color: var(--muted);
}

.lag-row b {
  color: #d8edf3;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

#lagPanel.bad .lag-row b {
  color: #ffb1a6;
}

.minimap-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.lg {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.lg.bird { background: var(--bird); }
.lg.human { background: var(--human); }
.lg.granny { background: #ffb347; margin-left: 4px; }

#help {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 252px;
  padding: 10px 12px;
  pointer-events: auto;
}

.help-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}

#helpToggle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

#help.collapsed #helpBody {
  display: none;
}

#helpBody {
  margin-top: 8px;
}

.help-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  padding: 3px 0;
}

.help-row span {
  margin-right: 4px;
}

.help-note {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  line-height: 1.45;
  color: rgba(147, 169, 180, 0.75);
}

kbd {
  display: inline-block;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom-width: 2px;
  color: #dfe9ed;
  font-size: 10px;
  font-family: inherit;
  line-height: 1.2;
}

#deathOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(40, 6, 8, 0.18), rgba(30, 4, 6, 0.62));
  animation: fadeIn 0.3s ease-out both;
  pointer-events: none;
}

.death-card {
  text-align: center;
  padding: 26px 40px;
  border-radius: 20px;
  background: rgba(20, 7, 9, 0.82);
  border: 1px solid rgba(255, 120, 120, 0.28);
  box-shadow: var(--shadow);
}

.death-title {
  font-size: 34px;
  font-weight: 800;
  color: #ffb3b3;
  letter-spacing: -0.01em;
}

.death-sub {
  color: #d9a6a6;
  font-size: 13px;
  margin-top: 5px;
}

.death-timer {
  margin-top: 16px;
  font-size: 14px;
  color: #f0d4d4;
}

.death-timer span {
  font-size: 26px;
  font-weight: 800;
  color: #ffe1a6;
  font-variant-numeric: tabular-nums;
}

#lockHint {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(8, 18, 24, 0.82);
  border: 1px solid var(--border);
  font-size: 12px;
  color: #dcebf0;
  animation: pulseSoft 2s ease-in-out infinite;
}

#winOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle, rgba(60, 45, 8, 0.12), rgba(20, 14, 4, 0.5));
  animation: fadeIn 0.25s ease-out both;
}

.win-card {
  text-align: center;
  padding: 30px 46px;
  border-radius: 22px;
  background: rgba(24, 21, 7, 0.88);
  border: 1px solid rgba(255, 209, 102, 0.45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  animation: revealPop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.win-icon {
  font-size: 54px;
  line-height: 1;
}

.win-title {
  font-size: 40px;
  font-weight: 900;
  color: #ffe08a;
  margin-top: 4px;
}

.win-sub {
  font-size: 15px;
  color: #fff0c4;
  margin-top: 4px;
}

.win-hint {
  font-size: 12px;
  color: #cdbb8c;
  margin-top: 10px;
}

@keyframes pulseSoft {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

#connBadge {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  background: rgba(8, 18, 24, 0.55);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#connBadge .dotlive {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

#connBadge.bad .dotlive {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

/* ------------------------------------------------------------ подписи */

#labels {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.player-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  will-change: transform;
}

.player-label .nm {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(7, 16, 21, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f0f8fa;
}

.player-label .sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.player-label.bird .nm {
  border-color: rgba(111, 195, 255, 0.35);
  color: #cfeeff;
}

.player-label.human .nm {
  border-color: rgba(255, 209, 102, 0.28);
  color: #fff0c9;
}

.player-label.granny .nm {
  background: rgba(54, 38, 10, 0.72);
  border-color: rgba(255, 190, 80, 0.4);
  color: #ffe3a3;
}

.player-label.self {
  opacity: 0.85;
}

.player-label.dead {
  opacity: 0.35;
  filter: grayscale(1);
}

/* ------------------------------------------------------------ прочее */

#roleReveal {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(8, 16, 20, 0.2), rgba(8, 16, 20, 0.55));
  animation: fadeIn 0.25s ease-out both;
}

.reveal-card {
  text-align: center;
  animation: revealPop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.reveal-icon {
  font-size: 86px;
  line-height: 1;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

.reveal-title {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.reveal-sub {
  font-size: 15px;
  color: #d7e6eb;
  margin-top: 6px;
}

@keyframes revealPop {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  background: rgba(12, 26, 33, 0.94);
  border: 1px solid rgba(123, 211, 137, 0.3);
  color: #dff5e4;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease-out both;
  max-width: 90vw;
}

#toast.danger {
  border-color: rgba(255, 107, 107, 0.4);
  color: #ffdada;
}

#toast.admin {
  border-color: rgba(111, 195, 255, 0.4);
  color: #d8f0ff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* урон по экрану */
#vignette.hurt {
  animation: hurtFlash 0.35s ease-out;
}

@keyframes hurtFlash {
  0% { box-shadow: inset 0 0 120px rgba(255, 40, 40, 0.5); }
  100% { box-shadow: inset 0 0 0 rgba(255, 40, 40, 0); }
}

/* ------------------------------------------------------------ адаптив */

@media (max-width: 980px) {
  #leaderboard {
    width: 200px;
  }
  #lagPanel {
    right: 196px;
    width: 156px;
  }
  #minimapPanel {
    width: 168px;
  }
  #minimap {
    width: 152px;
    height: 152px;
  }
}

@media (max-width: 760px) {
  #leaderboard,
  #help,
  #lagPanel {
    display: none;
  }
  #profile {
    width: 220px;
    padding: 10px 12px;
  }
  #statusBar {
    width: 76vw;
    bottom: 14px;
  }
  #minimapPanel {
    width: 132px;
    bottom: 12px;
    right: 12px;
  }
  #minimap {
    width: 116px;
    height: 116px;
  }
  .minimap-legend {
    display: none;
  }
  #feed {
    top: 44px;
    width: 74vw;
  }
  .role-cards {
    grid-template-columns: 1fr;
  }
  .menu-card {
    padding: 24px 20px;
  }
  .menu-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}
