@font-face {
  font-family: "SeldaPixel";
  src: local("Silkscreen"), local("Tiny5"), local("Pixelify Sans");
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #020604;
  color: #fff6df;
  font-family: "SeldaPixel", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.stream-mode .stream-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 45%, rgba(24, 84, 48, 0.42), rgba(2, 6, 4, 0.96) 70%);
}

body.stream-mode .game-wrap {
  width: 100vw;
  height: 100vh;
  padding: 0;
}

body.stream-mode #game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

body.stream-mode .hidden-hook {
  display: none !important;
}

.stream-hud {
  position: absolute;
  border: 1px solid rgba(159, 122, 49, 0.72);
  background: rgba(3, 13, 8, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.07), 0 0 0 2px rgba(0, 0, 0, 0.46), 0 18px 60px rgba(0, 0, 0, 0.38);
}

.stream-hud {
  top: 18px;
  right: 18px;
  width: min(340px, calc(100vw - 36px));
  padding: 14px;
}

.brand {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(159, 122, 49, 0.38);
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  image-rendering: pixelated;
}

.brand span,
.target-card span,
.stats-grid span,
.player-list span {
  display: block;
  color: #4ee07a;
  font-size: 11px;
  line-height: 1.3;
  text-transform: uppercase;
}

.brand strong,
.target-card strong {
  display: block;
  margin-top: 3px;
  color: #fff6df;
  font-size: 18px;
  line-height: 1.1;
  text-shadow: 1px 1px 0 #000, 2px 2px 0 #000;
}

.target-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(78, 224, 122, 0.34);
  background: rgba(0, 0, 0, 0.32);
}

.target-card small {
  display: block;
  margin-top: 8px;
  color: #c9c0a3;
  font-size: 12px;
  line-height: 1.4;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.stats-grid div,
.player-list button {
  border: 1px solid rgba(159, 122, 49, 0.44);
  background: rgba(1, 7, 4, 0.72);
}

.stats-grid div {
  padding: 9px;
}

.stats-grid strong {
  display: block;
  margin-top: 4px;
  color: #fff6df;
  font-size: 18px;
}

.player-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  margin-top: 12px;
  overflow: hidden;
}

.player-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
  padding: 9px;
  color: #fff6df;
  font: inherit;
  text-align: left;
}

.player-list button.active {
  border-color: #4ee07a;
  box-shadow: inset 0 0 0 1px rgba(78, 224, 122, 0.2);
}

.player-list em {
  color: #d7b157;
  font-style: normal;
  font-size: 12px;
}

.stream-audio {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid rgba(159, 122, 49, 0.44);
  background: rgba(1, 7, 4, 0.72);
}

.stream-audio button {
  width: 34px;
  height: 30px;
  border: 1px solid rgba(78, 224, 122, 0.55);
  background: rgba(3, 13, 8, 0.88);
  color: #4ee07a;
  font: inherit;
  cursor: pointer;
}

.stream-audio input {
  width: 100%;
  accent-color: #4ee07a;
}

body.stream-mode .stream-chat {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 396px));
  max-height: 260px;
  display: grid;
  border: 1px solid rgba(159, 122, 49, 0.72);
  background: rgba(3, 13, 8, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 246, 223, 0.07), 0 0 0 2px rgba(0, 0, 0, 0.46), 0 18px 60px rgba(0, 0, 0, 0.38);
  color: #fff6df;
  z-index: 5;
}

body.stream-mode.chat-minimized .stream-chat {
  width: 260px;
  max-height: 48px;
  overflow: hidden;
}

body.stream-mode .stream-chat .chat-head,
body.stream-mode .stream-chat .chat-form {
  border-color: rgba(159, 122, 49, 0.42);
}

body.stream-mode .stream-chat .chat-messages {
  min-height: 92px;
  max-height: 150px;
}

@media (max-width: 760px) {
  .stream-hud {
    left: 12px;
    right: 12px;
    width: auto;
  }

  body.stream-mode .stream-chat {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .player-list {
    display: none;
  }
}
