*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;

  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100%;

  position: relative;

  background: url(../img/NN-particlesJS-bg.png);
  background-size: cover;
  background-position: center;

  font-family: Roboto, sans-serif;
  color: white;
}

/* Background */
#particles-js {
  width: 100%;
  height: 100%;

  z-index: -1;

  position: absolute;
  inset: 0;

  background-color: #000;
}

#particles-js canvas {
  display: block; /* Removes overflow */
}

.winner_container {
  position: absolute;
  inset: 0;

  text-align: center;

  background-color: rgba(0, 0, 0, 0.8);

  z-index: 1000;

  /* display: grid;
  opacity: 1; */

  display: none;
  opacity: 0;

  place-items: center;
}

.winner_container h1 {
  text-align: center;

  font-size: clamp(2rem, 6vw, 10rem);
  font-family: inherit;

  padding-bottom: 2rem;
}

.winner_container h2 {
  text-align: center;

  text-transform: uppercase;

  font-size: clamp(1rem, 3vw, 6rem);
  font-family: inherit;
}

.winner_container h3 {
  text-align: center;

  /* text-transform: uppercase; */

  font-size: clamp(0.75rem, 2.5vw, 4.5rem);
  font-family: inherit;
}

.winner_container .close-btn {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  background: transparent;
  border: none;
  color: white;

  font-size: clamp(2rem, 3vw, 3rem);

  cursor: pointer;
  padding: 0;
  margin: 0;
}

.content {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.25rem;
}

.info {
  margin: 1.5rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.middle_container {
  flex-basis: 50%;
}

.middle_container > h1 {
  font-size: clamp(2rem, 5vw, 8rem);
  font-family: inherit;
  font-weight: lighter;
  text-align: center;
}

.middle_container > h1 > img {
  height: clamp(2rem, 3.75vw, 8rem);
}

.middle_container > h3 {
  font-size: clamp(0.75rem, 2vw, 3rem);
  font-family: inherit;
  text-align: center;

  /* margin-bottom: 4rem; */
  margin-top: 0.5rem;
}

.left_container,
.right_container {
  flex-basis: 25%;
}

.left_container {
  text-align: left;
}

.right_container {
  text-align: right;
}

.team_name {
  font-size: clamp(1rem, 2.5vw, 6rem);
  margin-bottom: 0.5rem;

  word-break: break-all;

  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.left_container .team_name::after,
.right_container .team_name::before {
  content: "";
  position: static;
  width: clamp(1rem, 1.5vw, 4rem);
  height: clamp(1rem, 1.5vw, 4rem);
  border-radius: 50%;
  background-color: white;
}

.left_container .team_name::after {
  background-color: var(--snake-player1-color);
}

.right_container .team_name::before {
  background-color: var(--snake-player2-color);
}

.left_container .items {
  flex-direction: row; /* default */
}

.right_container .items {
  flex-direction: row-reverse; /* reverse */
}

.team_info > h3 {
  font-size: clamp(0.75rem, 1.5vw, 4rem);
  font-weight: bold;
}

.team_info > h4 {
  font-size: clamp(0.5rem, 1vw, 3rem);
  font-weight: bold;

  margin-block: 0.5em;
}

.items {
  min-height: clamp(1rem, 1.875vw, 4.25rem);
  margin: 0.25em;

  display: inline-flex;
  align-items: center;
  gap: 0.75em;
}

.items .item {
  height: clamp(1rem, 3vw, 3rem);
  width: auto;

  filter: grayscale(100%);
}

.debug-only {
  display: none;
}

.finals-only {
  display: none;
}

.connection_status {
  text-align: center;
  margin-block: 0.5em;
}

.connection_fail {
  color: rgb(154, 23, 23);
}

.connection_success {
  color: rgb(95, 162, 95);
}

.connection_pinging {
  color: rgb(203, 203, 125);
}

/* Manual connection */
button {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #45a049;
}

.board {
  flex: 1;
  display: grid;
  place-items: center;
}
