* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  height: 100vh;
}

.navbar {
  background-color: #a3b18a;
  color: white;
  padding: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.navigation-bar {
  display: flex;
  justify-content: space-around;
  gap: 3rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navigation-bar a {
  color: #FFFFFF;
  text-decoration: none;
}

.navigation-bar a:hover {
  color: #593d3b; /* Optional hover color */
}

.logo {
  padding: 2px;
  width: 120px;
  height: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#logoutBtn {
  padding: 0.5rem 1rem;
  background-color: white;
  color: #a3b18a;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#logoutBtn:hover{
  color: white;
  background-color: #4f7b56;
}

#logoutBtn:active {
  transform: scale(0.95);
}

.room-container {
  display: flex;
  height: 92vh;
  padding: 20px;
  gap: 20px;
}

.room-list {
  width: 250px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.room-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.room-btn {
  padding: 12px;
  border: 2px solid #a3b18a;
  border-radius: 6px;
  background: white;
  color: #a3b18a;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 6em;
}

.room-btn:hover {
  background: #a3b18a;
  color: white;
}

.room-btn.active {
  background: #a3b18a;
  color: white;
}

.active-room {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.room-header {
  margin-bottom: 20px;
}

.room-tools {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.content-container {
  display: flex;
  gap: 20px;
  height: calc(100% - 80px);
}

.whiteboard-container {
  flex: 1;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.room-tools,
.content-container {
  display: none;
}

.room-tools.active {
  display: flex;
}

.content-container.active {
  display: flex;
}

#whiteboard {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.chat-container {
  width: 300px;
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: white; /* Make sure background is visible */
  min-height: 200px; /* Ensure there's space to show messages */
}

.message {
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 80%;
  word-break: break-word;
}

.message.sent {
  background: #a3b18a;
  color: white;
  align-self: flex-end;
}

.message.received {
  background: #f0f0f0;
  align-self: flex-start;
}

.chat-input {
  display: flex;
  padding: 10px;
  gap: 10px;
  border-top: 1px solid #ddd;
}

#messageInput {
  flex: 1;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

#sendMessage {
  padding: 8px 16px;
  background: #a3b18a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.active-users-list {
  margin-top: auto;
}

.active-users-list h3 {
  margin-bottom: 10px;
}

#activeUsersList {
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
}

#activeUsersList li {
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
}

#toolSelect {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

#colorPicker {
  padding: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 4px;
}

#brushSize {
  width: 100px;
  accent-color: #a3b18a;
}

@media (max-width: 1024px) {
  .content-container {
    flex-direction: column;
  }

  .chat-container {
    width: 100%;
    height: 300px;
  }
}

@media (max-width: 768px) {
  .room-container {
    flex-direction: column;
  }

  .room-list {
    width: 100%;
  }
}
