body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: calc(var(--footer-height) + 10px);
  background-color: #3b3a30;
  font-family: "Press start 2P";
  color: #e8e2c8;
}

nav {
  background-color: #4a4a42;
  height: 50 px;
  text-align: center;
}

nav ul {
  margin: 0px;
  padding: 5px 0px 5px 30px;
}

nav li {
  display: inline;
  margin-right: 40px;
}

nav li a {
  color: #e8e2c8;
}

nav li a:hover,
nav li a.current {
  color: #8b1e1e;
}

#interactions {
  margin: 0px;
  padding: 5px 0px 5px 30px;
}

#interactions ul {
  display: flex;
  justify-content: center;
  gap: 45px;
  margin: 0;
  padding: 0;
}

#interactions li {
  display: inline;
  margin-right: 40px;
}

#lobby {
  width: 700px;
  margin: 50px auto;
  padding: 30px;
  border: 2px solid black;
  background-color: #4a4a42;
}

#lobby h1 {
  text-align: center;
}

#playerLobby {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px 100px;
  margin: 40px 50px;
}

.player {
  display: flex;
  align-items: center;
  gap: 15px;
}

.player-name {
  flex: 1;
  border: 2px solid black;
  padding: 10px;
  text-align: center;
  background-color: white;
}

.ready-status {
  width: 25px;
  height: 25px;
  border: 2px solid black;
  background-color: white;
}

.player.ready .ready-status {
  background-color: green;
}

#welcome {
  text-align: center;
}

#welcomeMessage {
  background-color: #6e6101;
  border: 5px solid black;
  padding: 5px;
  width: 75%;
  margin: 0 auto;
  text-align: center;
}

#playOptions {
  margin: 0 auto;
  text-align: center;
  padding: 30px;
}

#playOptions button {
  background-color: #6e6101;
  font-family: "Press start 2P";
  margin-right: 50px;
  padding: 15px;
  border-radius: 0px;
  border: 2px solid black;
  cursor: pointer;
  color: #e8e2c8;

  box-shadow: 4px 4px 0px black;
  transition:
    transform 0.05s,
    box-shadow 0.05s;
}

#playOptions button:hover {
  background-color: white;
  color: #8b1e1e;
}

#interactions button {
  background-color: #6e6101;
  font-family: "Press start 2P";

  padding: 15px;
  border-radius: 0px;
  border: 2px solid black;
  cursor: pointer;
  color: #e8e2c8;

  box-shadow: 4px 4px 0px black;
  transition:
    transform 0.05s,
    box-shadow 0.05s;
}

#interactions button:hover {
  background-color: white;
  color: #8b1e1e;
}

footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  min-height: 44px;
  padding: 12px 18px;
  border-top: 2px solid #171713;
  background: #292923;
}

:root {
  --footer-height: 44px;
}

#copy {
  padding: 0;
}

.has-chat {
  padding-right: 340px;
}

.has-chat footer {
  right: 320px;
}

.chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 320px;
  height: auto;
  bottom: var(--footer-height);
  padding: 16px;
  border-left: 3px solid #171713;
  background: #292923;
  box-shadow: -6px 0 18px rgba(0, 0, 0, 0.35);
  font-family: Arial, sans-serif;
}

.chat-title {
  margin: 0 0 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 18px;
}

.chat-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.chat-tab,
.chat-form button {
  border: 1px solid #0f0f0d;
  background: #4a4a42;
  color: #e8e2c8;
  cursor: pointer;
  font-weight: 700;
}

.chat-tab {
  padding: 10px 6px;
}

.chat-tab.active {
  background: #8b1e1e;
}

.chat-recipient {
  margin-top: 12px;
}

.chat-recipient label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.chat-recipient select,
.chat-form input {
  width: 100%;
  border: 1px solid #777263;
  background: #151512;
  color: #e8e2c8;
}

.chat-recipient select {
  padding: 8px;
}

.chat-messages {
  flex: 1;
  overflow-y: scroll;
  scrollbar-color: #8b1e1e #1b1b18;
  scrollbar-width: thin;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #4a4a42;
  background: #1b1b18;
  list-style: none;
}

.chat-messages::-webkit-scrollbar {
  width: 10px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #1b1b18;
}

.chat-messages::-webkit-scrollbar-thumb {
  border: 2px solid #1b1b18;
  background: #8b1e1e;
}

.chat-messages li {
  margin-bottom: 9px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.chat-status {
  margin: 0 0 8px;
  color: #c9c2aa;
  font-size: 12px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.chat-form input,
.chat-form button {
  padding: 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 800px) {
  .has-chat {
    padding-right: 0;
    padding-bottom: calc(var(--footer-height) + 420px);
  }

  .has-chat footer {
    right: 0;
  }

  .chat-panel {
    top: auto;
    bottom: var(--footer-height);
    width: 100%;
    height: 410px;
    border-top: 3px solid #171713;
    border-left: 0;
  }
}
