body {
  font-family: "Poppins", sans-serif;
  background: #000;
  color: #333;
  margin: 0;
  padding: 20px;
}
#navbar {
  position: fixed;
  left: 0;
  height: 5rem;
  display: flex;
}
#mainContent {
  margin-top: 4rem;
  padding: 20px;
}
#container {
  display: flex;
  gap: 20px;
  height: 70vh;
}
h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  margin-top: 20px;
  text-transform: uppercase;
  text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.6);
  color: #ffd700;
  text-align: center;
}
#userList {
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
  padding: 20px;
}
#chatSection {
  backdrop-filter: blur(12px);
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  flex-direction: column;
  padding: 20px;
}
#chatSection.active {
  display: flex;
  flex-direction: column;
}
#placeholder {
  display: block;
}
#placeholder.active {
  display: none;
}
#userList {
  width: 30%;
  float: left;
  height: 70vh;
  overflow-y: auto;
  margin-right: 20px;
}
.user-item {
  background: #f1f3f6;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.user-item:hover {
  background: #dfe6e9;
}
.user-item.active {
  background: #74b9ff;
  color: white;
  font-weight: 600;
}
#chatMessages {
  flex: 1;
  background: #fafafa;
  border-radius: 12px;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  margin-bottom: 10px;
  word-wrap: break-word;
}
.bubble.admin {
  background: rgba(116, 185, 255, 0.85);
  backdrop-filter: blur(6px);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.bubble.user {
  background: #e0e0e0;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
#inputSection {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
#adminMessage {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ccc;
  outline: none;
  font-size: 14px;
}
#sendBtn {
  background: #0984e3;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
#sendBtn:hover {
  background: #74b9ff;
}
.badge {
  background: #e84118;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  padding: 4px 8px;
  float: right;
  font-weight: bold;
}
.typing-dots {
  display: none;
  gap: 3px;
}
.typing-dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(45deg, #ff3f34, #ff9f1a, #32ff7e);
  animation: bounce 0.8s infinite ease-in-out;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots.active {
  display: flex;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0) scale(0.8);
  }
  40% {
    transform: translateY(-6px) scale(1.1);
  }
}

/* MOBILE STYLING */
@media (max-width: 768px) {
  #container,
  #mainContent {
    padding: 10px;
  }
  #userList {
    width: 100%;
    float: none;
    margin-right: 0;
    height: 200px; /* smaller stack height */
  }
  #chatSection {
    width: 100%;
    height: 400px;
    padding: 10px;
  }
  #chatMessages {
    max-height: 300px; /* ensure scrollable */
  }
  #inputSection {
    flex-direction: column;
    gap: 8px;
  }
  #adminMessage,
  #sendBtn {
    width: 100%;
  }
  .bubble {
    max-width: 90%; /* more room for text */
    font-size: 14px;
    padding: 10px;
  }
}
