body {
  background: #000;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.barriecito-regular {
  font-family: "Barriecito", system-ui;
  font-weight: 400;
  font-style: normal;
}

.container1 {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 10vh;
  z-index: 10;
}

.container1-1 {
  width: 20%;
  text-align: left;
  font-size: 10vh;
  font-weight: bold;
  color: rgb(5, 0, 1);
  font-family: "Barriecito", system-ui;
  background: rgb(21, 147, 91);
}

.container1-2 {
  width: 40%;
  display: flex;
  flex-direction: row; 
  gap: 1rem;
  justify-content: center;
  align-items: center;
  background: rgb(255, 87, 41);
}

.info {
  font-size: 2vh;
  text-align: middle;
  color: rgb(5, 0, 1);
  font-family: "Barriecito", system-ui;
}

.container1-3 {
  width: 40%;
  text-align: left;
  font-size: 10vh;
  font-weight: bold;
  color: rgb(5, 0, 1);
  font-family: "Barriecito", system-ui;
  background: rgb(21, 147, 91);
}

/* ------------------------------------------------------------ */

.container2 {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 10vh;
  z-index: 10;
}

.container2-1 {
  width: 20%;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  background: rgb(255, 87, 41);
}

.names {
  font-size: 2vh;
  text-align: middle;
  color: rgb(5, 0, 1);
  font-family: "Barriecito", system-ui;
}

.container2-2 {
  width: 40%;
  text-align: left;
  font-size: 10vh;
  font-weight: bold;
  color: rgb(5, 0, 1);
  font-family: "Barriecito", system-ui;
  background: rgb(21, 147, 91);
}
.container2-3 {
  width: 40%;
  background: rgb(255, 87, 41);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

/* ------------------------------------------------------------ */

.player {
  display: flex;
  gap: 5rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 7vh;
  background: rgb(204, 204, 204);
  border: 0px solid rgb(204, 204, 204);
  z-index: 10;
}

button {
    font-family: "Barriecito", system-ui;
  background: none;
  border: 0px solid rgb(204, 204, 204);
  color: rgb(0, 0, 0);
  font-size: 5vh;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: rgb(0, 0, 0);
  color: rgb(204, 204, 204);
}

/* ------------------------------------------------------------ */
/* https://leanrada.com/notes/pure-css-halftone/ */

.container3 {
  height: 80vh;
  filter: brightness(0.8);
}

.halftone-background {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  filter: brightness(0.8) blur(0.5px) contrast(999) saturate(0);
}

.halftone-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(5px at center, black, white);
  background-size: 5px 5px;
  mix-blend-mode: screen;
}

.container3 img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  object-fit: cover;
}

/* ------------------------- Chat ------------------------- */
.chat {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 3vh 5vh;
  background: rgba(0, 0, 0, 0.7);
  border-top: 2px solid rgb(204, 204, 204);
}

.chat-header {
  font-family: "Barriecito", system-ui;
  color: rgb(204, 204, 204);
  font-size: 5vh;
}


.chat-log {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 25vh;
  max-height: 40vh;
  overflow-y: auto;
  padding: 10px 5vh;
}

.chat-row {
  font-family: "Barriecito", system-ui;
  color: rgb(204, 204, 204);
  margin: 4px 0;
  word-break: break-word;
  font-size: 3vh;
}

.chat-row.system {
  color: rgb(255, 187, 0);
}

.chat-row.error {
  color: rgb(255, 92, 92);
}

.chat-form {
  display: flex;
  gap: 8px;
}

.name-form {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  font-family: "Barriecito", system-ui;
  font-size: 16px;
  padding: 8px 10px;
  border: 3px solid rgba(204, 204, 204, 0.6);
  background: rgba(0, 0, 0, 0.2);
  color: rgb(204, 204, 204);
}

.name-input {
  flex: 1;
  font-family: "Barriecito", system-ui;
  font-size: 16px;
  padding: 8px 10px;
  border: 3px solid rgba(204, 204, 204, 0.6);
  background: rgba(0, 0, 0, 0.2);
  color: rgb(204, 204, 204);
}

.chat-send {
  font-family: "Barriecito", system-ui;
  font-size: 5vh;
  padding: 8px 12px;
  background: rgb(21, 147, 91);
  color: rgb(5, 0, 1);
}

.name-set {
  font-family: "Barriecito", system-ui;
  font-size: 16px;
  padding: 8px 12px;
  background: rgb(255, 87, 41);
  color: rgb(5, 0, 1);
}

/* Alternating message colors */
.chat-row.message:nth-child(odd) {
  color: rgb(255, 87, 41);
}
.chat-row.message:nth-child(even) {
  color: rgb(21, 147, 91);
}

/* ------------------------- Responsive (Mobile/Tablet) ------------------------- */
@media (max-width: 900px) {
  body {
    overflow: hidden;
  }

  .container1,
  .container2 {
    flex-direction: column;
    height: auto;
    z-index: 10;
  }

  .container1-1,
  .container1-2,
  .container1-3,
  .container2-1,
  .container2-2,
  .container2-3 {
    width: 100%;
  }

  .container1-1,
  .container1-3,
  .container2-2 {
    font-size: 3vh;
    text-align: center;
  }

  .container1-2,
  .container2-1,
  .container2-3 {
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
    flex-wrap: wrap;
  }

  .info,
  .names {
    font-size: 2.2vh;
  }

  .player {
    gap: 2rem;
    height: 5vh;
    z-index: 10;
  }

  button {
    font-size: 4vh;
  }

  .container3 {
    height: 60vh;
  }

  .chat {
    padding: 2vh 3vh;
  }

  .chat-header {
    font-size: 4vh;
  }

  .chat-send {
    font-size: 4vh;
  }

  .chat-row {
    font-size: 2.6vh;
  }

  .chat-log {
    bottom: 30vh;
    padding: 10px 3vh;
  }
}

@media (max-width: 600px) {
  .container1-1,
  .container1-3,
  .container2-2 {
    font-size: 6.5vh;
  }

  .info,
  .names {
    font-size: 1.9vh;
  }

  button {
    font-size: 3.2vh;
  }

  .player {
    height: 7vh;
    gap: 1.2rem;
  }

  .chat-header {
    font-size: 3.2vh;
  }

  .chat-send {
    font-size: 3.2vh;
  }

  .chat-row {
    font-size: 2.2vh;
  }

  .chat-log {
    bottom: 28vh;
  }
}