/* SIDEBAR */
.sidebar {
  width: 280px;
  max-height: 100vh;
  overflow-y: auto;
  background: linear-gradient(to bottom right,#180d5b,#4c00a8,#6f47ff);
  border-right: 1px solid rgba(164,160,255,.5);
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow-x: hidden;
  z-index: 1;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(30px);
  opacity: .8;
  z-index: -1;
}
.sidebar h2 {
  font-size: 24px;
  margin-bottom: 2px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
  padding: 10px 5px;
}

/* CONTACTOS */
.contact-list {
  list-style: none;
  margin-top: 6px;
}
.contact {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 16px;
  padding: 7px 8px;
  margin-bottom: 8px;
  background-color: rgba(164,160,255,.15);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(125,63,207,.2);
}
.contact-avatar {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(164,160,255,.6);
}
.contact:hover {
  background-color: rgba(164,160,255,.25);
  transform: translateY(-1px);
}
.contact.active {
  background-color: #7d3fcf;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(125,63,207,.4);
}

/* BOTN AADIR CONTACTO */
.add-contact {
  font-size: 16px;
  padding: 10px;
  background: linear-gradient(to right,#a4a0ff,#7d3fcf);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  margin: 6px 0;
  color: #fff;
  font-weight: 500;
  border: none;
  transition: all .2s ease;
  box-shadow: 0 1px 6px rgba(0,0,0,.15);
}
.add-contact:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(164,160,255,.5);
}

/* CUENTA DE USUARIO */
.account {
  font-size: 16px;
  padding: 10px 12px;
  background-color: rgba(164,160,255,.15);
  border-radius: 8px;
  margin-top: auto;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(125,63,207,.2);
  font-weight: 500;
}
.account:hover {
  background-color: rgba(164,160,255,.25);
  transform: translateY(-1px);
}

/* SCROLLBAR PERSONALIZADA */
.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(164,160,255,.3);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(164,160,255,.5);
}

/* Firefox */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: rgba(164,160,255,.3) transparent;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .sidebar { width: 280px; padding: 12px; }
  .sidebar h2 { font-size: 22px; }
  .contact { font-size: 15px; padding: 8px 10px; }
  .contact-avatar { width: 36px; height: 36px; }
}
@media (max-width: 768px) {
  .sidebar { width: 250px; }
  .sidebar h2 { font-size: 20px; padding: 8px 5px; }
  .contact { font-size: 14px; margin-bottom: 6px; }
  .add-contact, .account { font-size: 14px; margin: 10px 0; }
}
@media (max-width: 480px) {
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(164,160,255,.3);
    padding: 10px;
  }
  .sidebar h2 { text-align: center; font-size: 18px; }
  .contact-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: 8px;
  }
  .contact {
    flex: 0 0 auto;
    width: 200px;
    margin-bottom: 0;
  }
  .add-contact { margin: 8px 0; }
}
