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

/* Chat Layout */
.chat-container {
  display: flex;
  height: calc(100vh - 103px);
  background: #5e7594;
  color: white;
  font-family: "Roboto", serif;
}

.chat-sidebar {
  width: 320px;
  background: #4a5f7a;
  border-right: 2px solid #353d49;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.chat-header {
  padding: 20px;
  border-bottom: 2px solid #353d49;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #3d4f66;
}

.chat-header h2 {
  margin: 0;
  color: white;
  font-size: 20px;
  font-weight: 700;
}

.chat-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  background: #353d49;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 16px;
  position: relative;
}

.friends-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #4a5f7a;
  min-width: 18px;
}

.action-btn:hover {
  transform: scale(1.06);
  background: #2f2b2b;
  border-radius: 6px;
}

.action-btn:active {
  transform: scale(0.94);
  border-radius: 10px;
}

.chat-search {
  padding: 15px 20px;
  border-bottom: 1px solid #353d49;
  background: #4a5f7a;
}

.chat-search input {
  width: 100%;
  padding: 12px 16px;
  background: #5e7594;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-family: "Roboto", serif;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.chat-search input:focus {
  outline: none;
}

.chat-search input::placeholder {
  color: #b8c5d1;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
  background: #4a5f7a;
  overflow-x: hidden;
}

.user-info-bar {
  padding: 15px 20px;
  border-top: 2px solid #353d49;
  background: #3d4f66;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #353d49;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #b5cae0;
  border: 2px solid #b5cae0;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-details span:first-child {
  font-weight: 600;
  font-size: 14px;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 12px;
  color: #4caf50;
}

.copy-btn {
  background: #353d49;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: #2f2b2b;
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.chat-item {
  padding: 15px 20px;
  border-bottom: 1px solid #3d4f66;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-item:hover {
  background: #3d4f66;
  transform: translateX(5px);
}

.chat-item.active {
  background: #3d4f66;
}

.chat-avatar {
  position: relative;
}

.avatar-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #353d49;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: #b5cae0;
  border: 2px solid #b5cae0;
}

.chat-item.active .avatar-circle {
  background: #353d49;
  color: #b5cae0;
  border-color: #353d49;
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #4a5f7a;
  background: #4caf50;
}

.online-indicator.offline {
  background: #666;
}

.chat-item-content {
  flex: 1;
  min-width: 0;
}

.chat-item-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-preview {
  font-size: 13px;
  color: #b8c5d1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.chat-time {
  font-size: 12px;
  color: #b8c5d1;
}

.unread-badge {
  background: #ff4444;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #5e7594;
  overflow: hidden; /* Prevent horizontal scroll */
  max-width: 100%;
}

.chat-welcome {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #5e7594;
}

.welcome-content {
  text-align: center;
  max-width: 400px;
  padding: 40px;
  background: #4a5f7a;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.welcome-icon {
  font-size: 80px;
  color: #b5cae0;
  margin-bottom: 20px;
}

.welcome-content h2 {
  margin-bottom: 10px;
  color: white;
  font-weight: 700;
}

.welcome-content p {
  color: #b8c5d1;
  margin-bottom: 30px;
  line-height: 1.5;
}

.chat-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-info {
  padding: 17px;
  border-bottom: 2px solid #353d49;
  display: flex;
  align-items: center;
  gap: 15px;
  background: #4a5f7a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chat-details {
  flex: 1;
}

.chat-details h3 {
  margin: 0 0 5px 0;
  font-size: 18px;
  color: #b5cae0;
  font-weight: 700;
}

.chat-details span {
  color: #b8c5d1;
  font-size: 14px;
}

.menu-btn {
  background: #353d49;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
  position: relative;
}

.menu-btn:hover {
  background: #2f2b2b;
  transform: scale(1.06);
  border-radius: 6px;
}

.menu-btn:active {
  transform: scale(0.94);
  border-radius: 10px;
}

.chat-menu {
  position: relative;
}

.chat-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #3d4f66;
  border: 2px solid #353d49;
  border-radius: 8px;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  margin-top: 5px;
}

.menu-option {
  width: 100%;
  background: none;
  border: none;
  color: white;
  padding: 12px 16px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.menu-option:hover {
  background: #4a5f7a;
}

.menu-option:first-child {
  border-radius: 6px 6px 0 0;
}

.menu-option:last-child {
  border-radius: 0 0 6px 6px;
}

.menu-option:only-child {
  border-radius: 6px;
}

/* Leave group option styling */
#leaveGroupOption {
  color: #ff6b6b;
}

#leaveGroupOption:hover {
  background: #4a5f7a;
  color: #ff5252;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden; /* Prevent horizontal scroll */
  padding: 20px;
  background: #5e7594;
  max-width: 100%;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 80%;
}

.message.own {
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #353d49;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #b5cae0;
  flex-shrink: 0;
  border: 2px solid #b5cae0;
}

.message-content {
  background: #4a5f7a;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid #353d49;
}

.message.own .message-content {
  background: #b5cae0;
  color: #3d4041;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.message-sender {
  font-weight: 600;
  color: #b5cae0;
}

.message.own .message-sender {
  color: #353d49;
}

.message-time {
  color: #b8c5d1;
}

.message.own .message-time {
  color: #2f2b2b;
}

.message-text {
  line-height: 1.4;
  font-family: "Roboto", serif;
}

.typing-indicator {
  padding: 10px 20px;
  color: #b8c5d1;
  font-style: italic;
  font-size: 14px;
}

.message-input-container {
  padding: 20px;
  border-top: 2px solid #353d49;
  background: #4a5f7a;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.message-input {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #5e7594;
  border: 2px solid #353d49;
  border-radius: 25px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.message-input:focus-within {
  border-color: #b5cae0;
  box-shadow: 0 0 10px rgba(241, 167, 39, 0.3);
}

.message-input input {
  flex: 1;
  background: none;
  border: none;
  color: white;
  font-size: 15px;
  padding: 8px 12px;
  outline: none;
  font-family: "Roboto", serif;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message-input input::placeholder {
  color: #b8c5d1;
}

.character-counter {
  text-align: right;
  font-size: 12px;
  color: #95a5a6;
  margin-top: 5px;
  padding-right: 10px;
}

.send-btn {
  background: #353d49;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.send-btn:hover:not(:disabled) {
  background: #2f2b2b;
  transform: scale(1.06);
  border-radius: 6px;
}

.send-btn:active:not(:disabled) {
  transform: scale(0.94);
  border-radius: 10px;
}

.send-btn:disabled {
  background: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #4a5f7a;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease;
  border: 2px solid #353d49;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 20px;
  border-bottom: 2px solid #353d49;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #3d4f66;
}

.modal-header h3 {
  margin: 0;
  color: #b5cae0;
  font-weight: 700;
}

.modal-close {
  background: #353d49;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #2f2b2b;
  transform: scale(1.06);
  border-radius: 6px;
}

.modal-close:active {
  transform: scale(0.94);
  border-radius: 10px;
}

.modal-body {
  padding: 20px;
}

.friends-tabs,
.chat-type-tabs {
  display: flex;
  border-bottom: 2px solid #353d49;
  margin-bottom: 20px;
  background: #3d4f66;
  border-radius: 8px 8px 0 0;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  color: #b8c5d1;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  position: relative;
  font-family: "Roboto", serif;
  font-weight: 500;
}

.tab-btn.active {
  color: #b5cae0;
  border-bottom-color: #b5cae0;
  background: #4a5f7a;
}

.tab-btn:hover {
  color: white;
  background: #4a5f7a;
}

.badge {
  background: #ff4444;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  margin-left: 5px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #b5cae0;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: #5e7594;
  border: 2px solid #353d49;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-family: "Roboto", serif;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #b5cae0;
  box-shadow: 0 0 5px rgba(241, 167, 39, 0.3);
}

.form-group input::placeholder {
  color: #b8c5d1;
}

.add-friend-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.add-friend-form input {
  width: 99%;
  padding: 12px 16px;
  background: #5e7594;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-family: "Roboto", serif;
  transition: all 0.2s ease;
  box-sizing: border-box;
  color: white;
  flex: 1;
}

.add-friend-form input:focus {
  outline: none;
  box-shadow: 0 0 5px rgba(241, 167, 39, 0.3);
}
.add-friend-form input::placeholder {
  color: #b8c5d1;
}
.friend-item,
.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border: 2px solid #353d49;
  border-radius: 8px;
  margin-bottom: 10px;
  background: #3d4f66;
  transition: all 0.2s ease;
}

.friend-item:hover,
.request-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.friend-actions {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: "Roboto", serif;
  font-weight: 500;
}

.btn-sm:hover {
  transform: scale(1.06);
  border-radius: 6px;
}

.btn-sm:active {
  transform: scale(0.94);
  border-radius: 10px;
}

.btn-primary {
  background: #353d49;
  color: white;
}

.btn-primary:hover {
  background: #2f2b2b;
}

.btn-success {
  background: #4caf50;
  color: white;
}

.btn-success:hover {
  background: #45a049;
}

.btn-danger {
  background: #f44336;
  color: white;
}

.btn-danger:hover {
  background: #da190b;
}

/* Member tags for group creation */
.member-tag {
  display: inline-flex;
  align-items: center;
  background: #b5cae0;
  color: #353d49;
  padding: 6px 12px;
  border-radius: 12px;
  margin: 2px;
  font-size: 12px;
  font-weight: 600;
}

.member-tag .remove {
  margin-left: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s ease;
}

.member-tag .remove:hover {
  color: #ff4444;
}

/* Member counter styling */
#memberCount {
  font-weight: normal;
  transition: color 0.3s ease;
}

/* Notification Styles */
.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  max-width: 350px;
}

.notification {
  background: #4a5f7a;
  border: 2px solid #353d49;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: notificationSlideIn 0.3s ease;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification:hover {
  transform: translateX(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.notification-title {
  font-weight: 600;
  color: #b5cae0;
  font-size: 14px;
}

.notification-time {
  color: #b8c5d1;
  font-size: 12px;
}

.notification-message {
  color: white;
  font-size: 13px;
  line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 768px) {
  .chat-container {
    height: calc(100vh - 80px);
    flex-direction: column;
  }

  .chat-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 2px solid #353d49;
    max-height: 50vh;
    min-height: 200px;
  }

  .chat-main {
    flex: 1;
    min-height: 0;
  }

  .chat-header {
    padding: 15px;
  }

  .chat-header h2 {
    font-size: 18px;
  }

  .action-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .friends-notification-badge {
    width: 16px;
    height: 16px;
    font-size: 9px;
    top: -3px;
    right: -3px;
  }

  .chat-item {
    padding: 12px 15px;
  }

  .user-info-bar {
    padding: 12px 15px;
  }

  .user-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .user-details span:first-child {
    font-size: 13px;
  }

  .user-status {
    font-size: 11px;
  }

  .copy-btn {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .avatar-circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .chat-item-name {
    font-size: 14px;
  }

  .chat-item-preview {
    font-size: 12px;
  }

  .welcome-content {
    padding: 30px 20px;
    margin: 20px;
  }

  .welcome-icon {
    font-size: 60px;
  }

  .welcome-content h2 {
    font-size: 20px;
  }

  .chat-info {
    padding: 12px 15px;
  }

  .chat-details h3 {
    font-size: 16px;
  }

  .messages-container {
    padding: 15px;
  }

  .message {
    max-width: 90%;
  }

  .message-avatar {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .message-content {
    padding: 10px 14px;
    border-radius: 16px;
  }

  .message-input-container {
    padding: 15px;
  }

  .message-input {
    border-radius: 20px;
    padding: 6px 10px;
  }

  .message-input input {
    font-size: 14px;
    padding: 6px 10px;
  }

  .send-btn {
    width: 35px;
    height: 35px;
  }

  .modal-content {
    width: 95%;
    margin: 10px;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-body {
    padding: 15px;
  }

  .form-group input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .chat-container {
    height: calc(100vh - 60px);
  }

  .navbar {
    padding: 8px 15px;
  }

  .navbar a {
    padding: 8px 10px;
    font-size: 12px;
  }

  .chat-sidebar {
    min-height: 150px;
  }

  .chat-header {
    padding: 10px 15px;
  }

  .chat-header h2 {
    font-size: 16px;
  }

  .action-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .friends-notification-badge {
    width: 14px;
    height: 14px;
    font-size: 8px;
  }

  .chat-item {
    padding: 10px 15px;
    gap: 10px;
  }

  .avatar-circle {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }

  .welcome-content {
    padding: 20px 15px;
    margin: 15px;
  }

  .welcome-icon {
    font-size: 50px;
  }

  .welcome-content h2 {
    font-size: 18px;
  }

  .welcome-content p {
    font-size: 14px;
  }

  .messages-container {
    padding: 10px;
  }

  .message {
    gap: 8px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .message-content {
    padding: 8px 12px;
    border-radius: 14px;
  }

  .message-header {
    font-size: 11px;
  }

  .message-text {
    font-size: 14px;
  }

  .message-input-container {
    padding: 10px;
  }

  .message-input input {
    font-size: 13px;
  }

  .send-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  /* Make modals full screen on small phones */
  .modal-content {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }

  .modal-header {
    position: sticky;
    top: 0;
    background: #4a5f7a;
    z-index: 10;
  }

  /* Improve touch targets */
  .tab-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-sm {
    min-height: 36px;
    padding: 8px 12px;
  }

  .friend-item,
  .request-item {
    padding: 12px;
  }
}

/* Scrollbar Styling */
.chat-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
  width: 10px;
}

.chat-list::-webkit-scrollbar-track,
.messages-container::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
  background: #5e7594;
  border-radius: 3px;
  box-shadow: inset 0 0 5px rgba(65, 61, 61, 0.5);
}

.chat-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
  background: #353d49;
  border-radius: 2px;
  transition: background 0.1s ease;
}

.chat-list::-webkit-scrollbar-thumb:hover,
.messages-container::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
  background: #2f2b2b;
}

/* Loading States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #b8c5d1;
  font-family: "Roboto", serif;
}

.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid #353d49;
  border-top: 2px solid #b5cae0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Additional fixes for visual consistency */
* {
  box-sizing: border-box;
}

button {
  font-family: "Roboto", serif;
}

input,
textarea,
select {
  font-family: "Roboto", serif;
}

/* Ensure proper z-index layering */
.chat-sidebar {
  z-index: 10;
}

.chat-main {
  z-index: 5;
}

.modal {
  z-index: 1000;
}

.notification-container {
  z-index: 2000;
}

/* Group Members Modal */
.group-member-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #3a4a5c;
  transition: background-color 0.2s ease;
}

.group-member-item:hover {
  background-color: #3a4a5c;
}

.group-member-item:last-child {
  border-bottom: none;
}

.member-avatar {
  position: relative;
  margin-right: 12px;
}

.member-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4a5f7a;
}

.status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #2c3e50;
}

.status-indicator.online {
  background-color: #27ae60;
}

.status-indicator.offline {
  background-color: #7f8c8d;
}

.member-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.member-username {
  font-weight: 500;
  color: white;
  font-size: 14px;
  margin-bottom: 2px;
}

.member-status {
  font-size: 12px;
  color: #95a5a6;
  text-transform: capitalize;
}

/* Group Members Modal Header */
#groupMembersModal .modal-header {
  padding: 20px;
  border-bottom: 1px solid #3a4a5c;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#groupMembersModal .modal-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  font-weight: 500;
}

#groupMembersModal .close {
  background: none;
  border: none;
  color: #95a5a6;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

#groupMembersModal .close:hover {
  background-color: #3a4a5c;
  color: white;
}

#groupMembersList {
  max-height: 400px;
  overflow-y: auto;
}

#groupMembersList::-webkit-scrollbar {
  width: 8px;
}

#groupMembersList::-webkit-scrollbar-track {
  background: #2c3e50;
}

#groupMembersList::-webkit-scrollbar-thumb {
  background: #4a5f7a;
  border-radius: 4px;
}

#groupMembersList::-webkit-scrollbar-thumb:hover {
  background: #5a6f8a;
}
