body {
  background: linear-gradient(135deg, #3a5c2c 0%, #b6a16b 100%); /* Zelda forest green to gold */
  font-family: 'Press Start 2P', 'Courier New', Courier, monospace;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.chat-container {
  background: #f4ecd8; /* parchment-like */
  border: 4px solid #4e6e36; /* deep green border */
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(60,60,60,0.18);
  /* max-width: 420px; */
  /* width:  95vw; */
  width: 60%;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 24px 32px 20px 32px; /* ADDED: padding for inner spacing */
  box-sizing: border-box;       /* ADDED: ensures padding doesn't overflow */
}

.chat-title {
  font-size: 1.5rem;
  color: #bfa544; /* gold */
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 2px;
  text-shadow: 1px 2px 0 #4e6e36;
}

.name-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  justify-content: center;
}

.name-row input {
  font-family: inherit;
  font-size: 1rem;
  padding: 6px 10px;
  border: 2px solid #4e6e36;
  border-radius: 6px;
  background: #e6e2c3;
  outline: none;
  width: 20rem;
  color: #2d3a1a;
}

.name-row button {
  font-family: inherit;
  font-size: 1rem;
  padding: 6px 16px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, #bfa544 0%, #4e6e36 100%);
  color: #fffbe6;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(60,60,60,0.10);
  transition: background 0.1s;
  text-shadow: 1px 1px 0 #4e6e36;
}

.name-row button:hover {
  background: linear-gradient(90deg, #e6d47a 0%, #3a5c2c 100%);
  color: #fffbe6;
}

.chat-thread {
  background: #e6e2c3;
  border: 2px solid #bfa544;
  border-radius: 10px;
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 10px 8px;
  font-size: 0.98rem;
  font-family: inherit;
  color: #2d3a1a;
  box-shadow: 0 2px 8px rgba(60,60,60,0.08);
}

.chat-message {
  margin-bottom: 8px;
  line-height: 1.4;
}

.chat-message .name {
  color: #4e6e36;
  font-weight: bold;
  margin-right: 6px;
  text-shadow: 1px 1px 0 #bfa544;
}

.input-row {
  display: flex;
  flex-direction: column; /* CHANGED: stack vertically */
  gap: 8px;
  align-items: stretch;   /* CHANGED: stretch to container width */
  margin-top: 2px;
}

.input-row input[type="text"] {
  flex: none;             /* CHANGED: don't grow, full width */
  width: 100%;            /* ADDED: fill container */
  margin-bottom: 6px;     /* ADDED: space below input */
  font-family: inherit;
  font-size: 1rem;
  padding: 7px 10px;
  border: 2px solid #4e6e36;
  border-radius: 6px;
  background: #e6e2c3;
  outline: none;
  color: #2d3a1a;
}

.input-row button {
  width: 100%;            /* ADDED: button fills width */
  font-family: inherit;
  font-size: 1rem;
  padding: 7px 18px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(90deg, #bfa544 0%, #4e6e36 100%);
  color: #fffbe6;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(60,60,60,0.10);
  transition: background 0.1s;
  text-shadow: 1px 1px 0 #4e6e36;
}

.input-row button:hover {
  background: linear-gradient(90deg, #e6d47a 0%, #3a5c2c 100%);
  color: #fffbe6;
}
@media (max-width: 600px) {
  .chat-container {
    padding: 12px 2vw 8px 2vw;
    margin-top: 18px;
    width: 98vw;
    box-sizing: border-box; /* ADDED: ensure padding works on mobile */
  }
  .chat-title {
    font-size: 1.1rem;
  }
  .input-row button, .input-row input[type="text"] {
    width: 100%; /* ADDED: full width on mobile */
  }
}

.invite-link-text {
    margin-top:18px;
    text-align:center;
    font-family:inherit;
    color:#fff;
    font-size:0.5rem;
    font-weight: normal;
}
