@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

* {
  font-family: "Poppins", sans-serif;
}

/* width */
::-webkit-scrollbar {
  width: 7px;
}

/* Track */
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px grey;
  border-radius: 10px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #5cb85c;
  border-radius: 10px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #4cae4c;
}

body {
  background-color: #1a1e24;
  color: #f0f0f0;
  font-size: 16px;
  line-height: 1.6;
  transform: "scale(0.8)";
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

p,
a {
  font-weight: 300;
}

.avatar__md {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.avatar__sm {
  height: 30px;
  width: 30px;
  object-fit: cover;
  border-radius: 50%;
}

#nav {
  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #000000;
  background-color: rgba(38, 38, 37, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(92, 184, 92, 0.2);
  transition: all 0.3s ease;
  text-decoration: none;
  padding: 16px 5%;
  z-index: 999;
}

#logo {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 0;
  margin: 0;
  color: #5cb85c;
  transition: all 0.3s ease;
}

#logo:hover {
  transform: scale(1.05);
}

#logo img {
  height: 42px;
}

#nav a {
  text-decoration: none;
}

#nav__links {
  display: flex;
  align-items: center;
  column-gap: 2em;
}

.nav__link {
  color: #f0f0f0;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease-in-out;
  padding-bottom: 1px;
  font-weight: 500;
}

@media (max-width: 520px) {
  #nav__links {
    column-gap: 3em;
  }
}

.nav__link:hover {
  color: #5cb85c;
  text-decoration: none;
  border-color: #5cb85c;
}

#create__room__btn {
  display: block;
  background: linear-gradient(45deg, #5cb85c, #4cae4c);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(92, 184, 92, 0.3);
  padding: 8px 24px;
  font-size: 14px;
  border-radius: 5px;
}

#create__room__btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(92, 184, 92, 0.4);
}

.nav--list {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#members__button,
#chat__button {
  display: none;
  cursor: pointer;
  background: transparent;
  border: none;
}

#members__button:hover svg > path,
#chat__button:hover svg,
.nav__link:hover svg {
  fill: #845695;
}

.nav__link svg {
  width: 0;
  height: 0;
}

@media (max-width: 640px) {
  #members__button {
    display: block;
  }

  .nav__link svg {
    width: 1.5rem;
    height: 1.5rem;
  }
  .nav__link,
  #create__room__btn {
    font-size: 0;
    border: none;
  }

  #create__room__btn {
    padding: 0;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #create__room__btn:hover {
    transform: translateY(-3px) scale(1.1);
    background-color: transparent;
  }
}

/* Quy tắc mới cho phần hiển thị tên người tham gia */
.participant-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background-color: #2c3e50;
  padding: 10px 15px;
  border-radius: 8px;
  margin: 4px;
  display: inline-block;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.participant-name:hover {
  background-color: #34495e;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Danh sách người tham gia */
.participants-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Thanh cuộn tùy chỉnh cho danh sách */
.participants-list::-webkit-scrollbar {
  width: 6px;
}

.participants-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.participants-list::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Điều chỉnh cho màn hình nhỏ */
@media (max-width: 640px) {
  .participant-name {
    font-size: 14px;
    padding: 8px 12px;
  }

  .participants-list {
    max-height: 300px;
    padding: 15px;
  }
}

#room-name {
  font-weight: bold;
  color: #5cb85c;
}

#camera-btn.active {
  background-color: #ffffff;
}

#mic-btn.active {
  background-color: #ffffff;
}

#screen-btn.active {
  background-color: #e4e4e4;
}
