/* components/RoomList/RoomList.css */
.room-list-container {
  width: 100%;
  background-color: #f8f9fa;
  border-right: 1px solid #e9ecef;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.room-list-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e9ecef;
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-list-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #212529;
}

/* 添加房间按钮样式 */
.add-room-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #228be6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.add-room-button:hover:not(:disabled) {
  background-color: #1971c2;
  transform: scale(1.05);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.add-room-button:active:not(:disabled) {
  transform: scale(0.95);
}

.add-room-button:disabled {
  background-color: #a0d0ff;
  cursor: not-allowed;
}

/* 其余样式保持不变 */
.room-list-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.room-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 8px;
  margin: 0 8px;
}

.room-item:hover {
  background-color: #e9ecef;
}

.room-item.selected {
  background-color: #e7f5ff;
  position: relative;
}

.room-item.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #228be6;
  border-radius: 4px 0 0 4px;
}

.room-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  margin-right: 14px;
}

.room-info {
  flex: 1;
  min-width: 0;
}

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

.room-name {
  font-weight: 600;
  color: #212529;
  font-size: 15px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-time {
  font-size: 11px;
  color: #868e96;
  flex-shrink: 0;
  margin-left: 8px;
}

.room-preview {
  font-size: 13px;
  color: #868e96;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 自定义滚动条样式 */
.room-list-scrollable::-webkit-scrollbar {
  width: 100%;
  }
  
  .room-list-scrollable::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
  }
  
  .room-list-scrollable::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
  }
  
  .room-list-scrollable::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
  }
  
  .room-item-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  margin: 0 8px;
  }
  
  .room-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  background-color: white;
  position: relative;
  border-radius: 8;
  z-index: 2;
  }
  
  .room-item.sliding {
  transform: translateX(-80px);
  }
  
  .slide-button {
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e9ecef;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.3s ease;
  z-index: 3;
  }
  
  .slide-button:hover {
  background-color: #dee2e6;
  opacity: 1;
  }
  
  .delete-container {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding-right: 16px;
  z-index: 1;
  }
  
  .delete-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5e5e, #ff2c2c);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 82, 82, 0.4);
  transition: all 0.3s ease;
  }
  
  .delete-button:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(255, 82, 82, 0.6);
  }
  
  .delete-button:active {
  transform: scale(0.95);
  }
  
  /* 调整选中状态的样式，使其在容器上 */
  .room-item-container.selected .room-item {
  background-color: #e7f5ff;
  }
  
  .room-item-container.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background-color: #228be6;
  border-radius: 4px 0 0 4px;
  z-index: 3;
  }
  
  /* 添加房间输入框样式 */
  .add-room-input-container {
  padding: 12px 16px;
  background-color: white;
  border-bottom: 1px solid #e9ecef;
  position: relative;
  }
  
  .add-room-input {
  width: 90%;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
  }
  
  .add-room-input:focus {
  outline: none;
  border-color: #228be6;
  box-shadow: 0 0 0 2px rgba(34, 139, 230, 0.2);
  }
  
  .add-room-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  gap: 8px;
  }
  
  .cancel-add-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  }
  
  .cancel-add-button:hover {
  background-color: #f1f3f5;
  }
  
  .confirm-add-button {
  background-color: #228be6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  }
  
  .confirm-add-button:hover {
  background-color: #1971c2;
  }
  
  .confirm-add-button:active {
  transform: scale(0.98);
  }
  
  .add-room-error {
  color: #e03131;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
  }