/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #121212;
}

body.dark-mode {
  background-color: #121212;
  color: #e1e1e1;
}

/* Contacts container styles */
.contacts-container {
  width: 100%;
  max-width: 400px;
  background-color: #1e1e1e;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.contacts-header {
  padding: 15px;
  background-color: #242424;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 15px;
}

.back-button {
  background: none;
  border: none;
  color: #e1e1e1;
  font-size: 18px;
  cursor: pointer;
  padding: 5px;
}

.back-button:hover {
  color: #dd2a7b;
}

.gradient-text {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  padding: 10px 35px 10px 15px;
  border: none;
  border-radius: 8px;
  background-color: #333;
  font-size: 14px;
  outline: none;
  color: #e1e1e1;
}

.search-box input::placeholder {
  color: #999;
}

.search-box i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
}

.contacts-list {
  height: 500px;
  overflow-y: auto;
}

/* Contact item styles */
.contact {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid #333;
}

.contact:hover {
  background-color: #2a2a2a;
}

.contact-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  border: 2px solid transparent;
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4) border-box;
}

.contact-info {
  flex: 1;
}

.contact-name {
  font-size: 16px;
  font-weight: 500;
  color: #e1e1e1;
  margin-bottom: 3px;
  background: linear-gradient(45deg, #f58529, #dd2a7b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-last-message {
  font-size: 14px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-time {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}